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 #449

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

prudhvigodithi
Copy link
Contributor

@prudhvigodithi prudhvigodithi commented Jul 11, 2022

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: #443

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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>
Signed-off-by: pgodithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Contributor Author

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #449 (94943fd) into main (6130d6f) will decrease coverage by 1.31%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #449      +/-   ##
============================================
- Coverage     74.63%   73.31%   -1.32%     
+ Complexity     1006      986      -20     
============================================
  Files           141      141              
  Lines          4565     4565              
  Branches        504      504              
============================================
- Hits           3407     3347      -60     
- Misses          841      904      +63     
+ Partials        317      314       -3     
Impacted Files Coverage Δ
...ch/replication/task/index/IndexReplicationState.kt 51.66% <0.00%> (-15.00%) ⬇️
...ication/action/setup/TransportSetupChecksAction.kt 59.52% <0.00%> (-14.29%) ⬇️
...ication/seqno/RemoteClusterRetentionLeaseHelper.kt 80.00% <0.00%> (-11.67%) ⬇️
...tion/repository/RemoteClusterMultiChunkTransfer.kt 90.24% <0.00%> (-9.76%) ⬇️
.../replication/metadata/store/ReplicationMetadata.kt 62.96% <0.00%> (-8.65%) ⬇️
...ication/action/stop/StopIndexReplicationRequest.kt 50.00% <0.00%> (-5.00%) ⬇️
...ion/action/resume/ResumeIndexReplicationRequest.kt 50.00% <0.00%> (-5.00%) ⬇️
...tlin/org/opensearch/replication/util/Extensions.kt 65.47% <0.00%> (-4.77%) ⬇️
...n/index/ReplicateIndexClusterManagerNodeRequest.kt 50.00% <0.00%> (-4.17%) ⬇️
...ication/action/setup/ValidatePermissionsRequest.kt 62.50% <0.00%> (-4.17%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6130d6f...94943fd. Read the comment docs.

@ankitkala
Copy link
Member

Security tests are failing. Security plugin has to updated before this PR can be merged.

println "Setting version to ${newVersion}."
// String tokenization to support -SNAPSHOT
ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true)
Copy link
Member

Choose a reason for hiding this comment

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

We also have BWC tests where we test the upgrade with previous major version(i.e. opensearch_previous_version).

This method should also upgrade the opensearch_previous_version if there is a major version bump for opensearch.version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @ankitkala Once the cross-cluster-replication is aligned to core repo branching (Related issue), since main will be the next major version, so do you think it has to be part of version increment?
@bbarani

Copy link
Member

@ankitkala ankitkala Jul 19, 2022

Choose a reason for hiding this comment

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

@prudhvigodithi Regarding the migration to core, we're yet to figure out how to completely move to core. Most likely, we'll still require a separate plugin (to start with) and eventually would move completely to core.

But anyways, the BWC tests are not specific to CCR plugin. Don't have to necessarily do in this PR but still we should sort that part out. What do you think?

Copy link
Contributor Author

@prudhvigodithi prudhvigodithi Jul 19, 2022

Choose a reason for hiding this comment

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

Hey @ankitkala are we on the same page? :), I mean CCR to align with core branching strategy, CCR can still be a separate plugin but uses same as core branching strategy, main will be the next major version, <major version>.x branch (example 2.x) will be next minor version and 2.1 or 2.2 branches will be for hotfix/patch versions.
If we follow this way opensearch_previous_version can be maintained as per branch for BWC tests alone.

Copy link
Member

Choose a reason for hiding this comment

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

My bad. Please ignore my comment around "move to core".

I got what you mean with the branching strategy. Basically we only modify the opensearch_previous_version when we move to a new major version.
But if we're planning to use this automation for major version bump as well, then we should be handling this IMHO. Otherwise its just one more thing plugin owners need to remember. As an alternative, if you want to keep that as a checklist item in every new major release, that is fine as well.
Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Added a tracking issue for this: opensearch-project/opensearch-build#2373

@bbarani
Copy link
Member

bbarani commented Jul 26, 2022

@ankitkala Can you please review this PR soon?

@ankitkala ankitkala merged commit db5029a into opensearch-project:main Jul 27, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 27, 2022
* Version increment automation

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

* Version increment automation: task rename updateVersion

Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit db5029a)
@ankitkala
Copy link
Member

@ankitkala Can you please review this PR soon?

@bbarani I've merged the PR. I've opened an issue for tracking BWC related changes: opensearch-project/opensearch-build#2373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants