Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging for version increment automation #608

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

prudhvigodithi
Copy link
Contributor

Signed-off-by: pgodithi pgodithi@amazon.com

Description

This is the staging PR for to execute workflows that auto raise the version increment PR's
Example: prudhvigodithi#1

Issues Resolved

Part of: opensearch-project/opensearch-build#1375
From solution: opensearch-project/opensearch-build#1375 (comment)
Related issue: #605

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: pgodithi <pgodithi@amazon.com>
@prudhvigodithi prudhvigodithi requested a review from a team July 10, 2022 13:09
@opensearch-trigger-bot opensearch-trigger-bot bot added backport 2.x infra Changes to infrastructure, testing, CI/CD, pipelines, etc. labels Jul 10, 2022
@prudhvigodithi prudhvigodithi added backport 2.0 backport 2.1 and removed infra Changes to infrastructure, testing, CI/CD, pipelines, etc. labels Jul 10, 2022
@prudhvigodithi prudhvigodithi changed the title taging for version increment automation Staging for version increment automation Jul 10, 2022
@prudhvigodithi
Copy link
Contributor Author

Sample PR
anomaly-detection main : OpenSearch main
prudhvigodithi#2

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2022

Codecov Report

Merging #608 (4130328) into main (f630c8f) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #608      +/-   ##
============================================
- Coverage     79.07%   79.05%   -0.03%     
+ Complexity     4213     4209       -4     
============================================
  Files           296      296              
  Lines         17686    17686              
  Branches       1880     1880              
============================================
- Hits          13986    13981       -5     
- Misses         2805     2806       +1     
- Partials        895      899       +4     
Flag Coverage Δ
plugin 79.05% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rch/ad/transport/AnomalyResultTransportAction.java 80.13% <0.00%> (-0.69%) ⬇️
...opensearch/ad/indices/AnomalyDetectionIndices.java 71.93% <0.00%> (-0.38%) ⬇️
...ain/java/org/opensearch/ad/model/ModelProfile.java 70.90% <0.00%> (ø)

Signed-off-by: pgodithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

Renaming to task updateVersion following opensearch-project/opensearch-plugin-template-java#32.

@amitgalitz
Copy link
Member

@prudhvigodithi does this also handle moving main to 3.0.0-SNAPSHOT for example?

@prudhvigodithi
Copy link
Contributor Author

Hey @amitgalitz , following the discussion, main once inclined with Core, the task updateVersion is called against the version of the core. Please review the PR when you get a chance.
Thank you

@bbarani
Copy link
Member

bbarani commented Jul 26, 2022

@amitgalitz @sean-zheng-amazon can you please review this PR soon?

@amitgalitz
Copy link
Member

amitgalitz commented Jul 26, 2022

@prudhvigodithi Once merged will this autochange AD main to whatever Opensearch main is at? for now 3.0.0-SNAPSHOT?

@amitgalitz
Copy link
Member

Its not letting me re-run the whitesource check for some reason

@prudhvigodithi
Copy link
Contributor Author

@prudhvigodithi Once merged will this autochange AD main to whatever Opensearch main is at? for now 3.0.0-SNAPSHOT?

Hey @amitgalitz once PR is merged the gradle project should output the task updateVersion, now using this task once the Plugins branches are in align with core, then the workflow will call the task updateVersion to raise an auto increment version PR.
Thank you

@amitgalitz
Copy link
Member

@prudhvigodithi Once merged will this autochange AD main to whatever Opensearch main is at? for now 3.0.0-SNAPSHOT?

Hey @amitgalitz once PR is merged the gradle project should output the task updateVersion, now using this task once the Plugins branches are in align with core, then the workflow will call the task updateVersion to raise an auto increment version PR. Thank you

got it, so once this is merged, next step is to make sure we align plugin branches with core?

@prudhvigodithi
Copy link
Contributor Author

got it, so once this is merged, next step is to make sure we align plugin branches with core?

Right @amitgalitz, then the workflow will be triggered to compare to execute updateVersion task, which is part of this PR.

@amitgalitz
Copy link
Member

@prudhvigodithi have you had whitesource check failures on any of the other repos with this PR?

@amitgalitz amitgalitz requested a review from ohltyler July 26, 2022 22:13
@ohltyler
Copy link
Member

got it, so once this is merged, next step is to make sure we align plugin branches with core?

Right @amitgalitz, then the workflow will be triggered to compare to execute updateVersion task, which is part of this PR.

@prudhvigodithi I'm concerned with aligning plugin branches with core. The outlined strategy is to have different branching strategies between plugins and core.

@prudhvigodithi
Copy link
Contributor Author

got it, so once this is merged, next step is to make sure we align plugin branches with core?

Right @amitgalitz, then the workflow will be triggered to compare to execute updateVersion task, which is part of this PR.

@prudhvigodithi I'm concerned with aligning plugin branches with core. The outlined strategy is to have different branching strategies between plugins and core.

Hey @ohltyler the document should be updated, opensearch-project/opensearch-plugins#142 (comment)

Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@prudhvigodithi
Copy link
Contributor Author

Hey Can we please merge this PR and backport to all release branches :)
Thank you
@bbarani

@ohltyler ohltyler merged commit eb7bd07 into opensearch-project:main Aug 1, 2022
@opensearch-trigger-bot
Copy link

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-608-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eb7bd07774658c7e0216e5436cfc613b15547d3d
# Push it to GitHub
git push --set-upstream origin backport/backport-608-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-608-to-1.x.

@opensearch-trigger-bot
Copy link

The backport to 1.3 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-608-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eb7bd07774658c7e0216e5436cfc613b15547d3d
# Push it to GitHub
git push --set-upstream origin backport/backport-608-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3

Then, create a pull request where the base branch is 1.3 and the compare/head branch is backport/backport-608-to-1.3.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 1, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
@opensearch-trigger-bot
Copy link

The backport to 2.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.0 2.0
# Navigate to the new working tree
cd .worktrees/backport-2.0
# Create a new branch
git switch --create backport/backport-608-to-2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eb7bd07774658c7e0216e5436cfc613b15547d3d
# Push it to GitHub
git push --set-upstream origin backport/backport-608-to-2.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.0

Then, create a pull request where the base branch is 2.0 and the compare/head branch is backport/backport-608-to-2.0.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 1, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
@ohltyler
Copy link
Member

ohltyler commented Aug 1, 2022

@prudhvigodithi the backports failed for some branches due to merge conflicts for build.gradle. Can you help manually resolve?

prudhvigodithi added a commit that referenced this pull request Aug 2, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
prudhvigodithi added a commit that referenced this pull request Aug 2, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

Hey @ohltyler
For 2.x and 2.1 backports I have fixed the DCO error
#621
#622
For 1.x series I have raised a new PR #624
Please check.
Thank you

amitgalitz pushed a commit that referenced this pull request Aug 3, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
amitgalitz pushed a commit that referenced this pull request Aug 3, 2022
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit eb7bd07)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
@amitgalitz amitgalitz added the infra Changes to infrastructure, testing, CI/CD, pipelines, etc. label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x backport 1.3 backport 2.x backport 2.0 backport 2.1 infra Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants