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

Merged
merged 5 commits into from
Jul 21, 2022

Conversation

prudhvigodithi
Copy link
Contributor

@prudhvigodithi prudhvigodithi commented Jul 11, 2022

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

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc 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 prudhvigodithi requested a review from a team as a code owner July 11, 2022 20:19
@prudhvigodithi
Copy link
Contributor Author

Referred old version increment PR:
#637

Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

a few comments, thanks

build.gradle Outdated
include(name: "build.gradle")
}
}
ant.replaceregexp(file:'sql-jdbc/build.gradle', match:"version '\\d+.\\d+.\\d+.\\d+'", replace:"version " + "'" + newVersion.tokenize('-')[0] + '.0' + "'", 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.

could you remove this line? sql-jdbc was accidentally bumped in previous PR, but it's a driver and the version should be independent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So @joshuali925 there is no version increment in this file sql-jdbc/build.gradle'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed in my latest commit @joshuali925

Copy link
Member

Choose a reason for hiding this comment

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

thanks. the latest sql-jdbc release is 1.1.0.1, the next one should be 1.2.0.0 or 2.0.0.0 depending on the changes, but should not be the same version as core and plugins

build.gradle Outdated
fileset(dir: projectDir) {
// Include the required files that needs to be updated with new Version
include(name: ".github/workflows/sql-workbench-test-and-build-workflow.yml")
include(name: "doctest/build.gradle")
Copy link
Member

Choose a reason for hiding this comment

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

could you also remove this? we don't have version defined in doctest/build.gradle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed in my latest commit @joshuali925

Signed-off-by: pgodithi <pgodithi@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2022

Codecov Report

Merging #684 (13c0ad2) into main (e180d56) will increase coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #684      +/-   ##
============================================
+ Coverage     94.70%   94.74%   +0.04%     
- Complexity     2825     2857      +32     
============================================
  Files           282      283       +1     
  Lines          7609     7676      +67     
  Branches        558      561       +3     
============================================
+ Hits           7206     7273      +67     
  Misses          349      349              
  Partials         54       54              
Flag Coverage Δ
query-workbench 62.76% <ø> (ø)
sql-engine 97.74% <ø> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <0.00%> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <0.00%> (ø)
...h/sql/expression/function/OpenSearchFunctions.java 100.00% <0.00%> (ø)
...arch/storage/script/filter/FilterQueryBuilder.java 100.00% <0.00%> (ø)
...ript/filter/lucene/relevance/QueryStringQuery.java 100.00% <0.00%> (ø)

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 e180d56...13c0ad2. Read the comment docs.

joshuali925
joshuali925 previously approved these changes Jul 11, 2022
Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

thanks

build.gradle Outdated
fileset(dir: projectDir) {
// Include the required files that needs to be updated with new Version
include(name: ".github/workflows/sql-workbench-test-and-build-workflow.yml")
include(name: "build.gradle")
Copy link
Member

Choose a reason for hiding this comment

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

one more question, is matching opensearch_version.tokenize('-')[0] enough on build.gradle? e.g. should patterns be more strict to avoid accidentally matching other dependency versions or this is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I can add more restrictive parsing, will push in my latest commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you please check now @joshuali925
Sample PR with new change: prudhvigodithi#2
Does this sample PR for version increment looks good?

Copy link
Member

Choose a reason for hiding this comment

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

approved, last question: i see it's hard coded to use snapshot in build.gradle + '-SNAPSHOT"', will there be a case we use x.x.x instead of x.x.x-SNAPSHOT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So until now we all build with -SNAPSHOT except during main release.
@bbarani @peterzhuamazon

Signed-off-by: pgodithi <pgodithi@amazon.com>
joshuali925
joshuali925 previously approved these changes Jul 11, 2022
Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

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

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

Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

LGTM

@penghuo penghuo merged commit 69ab0d3 into opensearch-project:main Jul 21, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 21, 2022
* Version increment automation
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit 69ab0d3)
prudhvigodithi added a commit that referenced this pull request Jul 27, 2022
* Version increment automation
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit 69ab0d3)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
joshuali925 pushed a commit that referenced this pull request Aug 16, 2022
* Version increment automation
Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit 69ab0d3)
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>

Co-authored-by: Prudhvi Godithi <pgodithi@amazon.com>
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.

None yet

4 participants