Skip to content

Conversation

@prudhvigodithi
Copy link
Member

@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.

@prudhvigodithi prudhvigodithi requested a review from a team as a code owner July 11, 2022 20:19
@prudhvigodithi
Copy link
Member 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
Member 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
Member 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
Member 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

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.74%. Comparing base (e180d56) to head (13c0ad2).
⚠️ Report is 1159 commits behind head on main.

❌ Your project status has failed because the head coverage (94.74%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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
Member 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
Member 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
Member 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

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

@prudhvigodithi
Copy link
Member 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 <[email protected]>
(cherry picked from commit 69ab0d3)
prudhvigodithi added a commit that referenced this pull request Jul 27, 2022
* Version increment automation
Signed-off-by: pgodithi <[email protected]>
(cherry picked from commit 69ab0d3)
Signed-off-by: prudhvigodithi <[email protected]>
joshuali925 pushed a commit that referenced this pull request Aug 16, 2022
* Version increment automation
Signed-off-by: pgodithi <[email protected]>
(cherry picked from commit 69ab0d3)
Signed-off-by: prudhvigodithi <[email protected]>

Co-authored-by: Prudhvi Godithi <[email protected]>
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.

4 participants