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

Add script for workflow version increment #2374

Merged

Conversation

RyanL1997
Copy link
Collaborator

@RyanL1997 RyanL1997 commented Jan 4, 2023

Signed-off-by: Ryan Liang [email protected]

Description

Add script for workflow version increment

  • Category (Enhancement)

Issues Resolved

Is this a backport? If so, please add backport PR # and/or commits #
2.x, 2.4

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

@RyanL1997 RyanL1997 requested a review from a team January 4, 2023 22:11
@RyanL1997 RyanL1997 added backport 2.x backport to 2.x branch backport 2.4 labels Jan 4, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2374 (9612cf0) into main (67e4176) will decrease coverage by 0.06%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #2374      +/-   ##
============================================
- Coverage     61.09%   61.03%   -0.07%     
+ Complexity     3271     3268       -3     
============================================
  Files           260      260              
  Lines         18363    18363              
  Branches       3250     3250              
============================================
- Hits          11219    11207      -12     
- Misses         5559     5566       +7     
- Partials       1585     1590       +5     
Impacted Files Coverage Δ
...org/opensearch/security/rest/TenantInfoAction.java 77.94% <0.00%> (-10.30%) ⬇️
...urity/ssl/transport/SecuritySSLNettyTransport.java 62.36% <0.00%> (-4.31%) ⬇️
...earch/security/ssl/util/SSLConnectionTestUtil.java 93.18% <0.00%> (-2.28%) ⬇️
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 57.46% <0.00%> (-1.50%) ⬇️
...search/security/transport/SecurityInterceptor.java 75.38% <0.00%> (-0.77%) ⬇️
...nsearch/security/dlic/rest/api/AuditApiAction.java 68.08% <0.00%> (+4.25%) ⬆️
...ecurity/configuration/StaticResourceException.java 25.00% <0.00%> (+25.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

peternied
peternied previously approved these changes Jan 4, 2023
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Nicely done!

@cwperks
Copy link
Member

cwperks commented Jan 5, 2023

@RyanL1997 Is it possible to accomplish the same version increment automation by adding .github/workflows/plugin_install.yml in this block https://github.com/opensearch-project/security/blob/main/build.gradle#L643-L648? I'm wondering if adding a new ant.replaceregexp is necessary.

@RyanL1997
Copy link
Collaborator Author

@RyanL1997 Is it possible to accomplish the same version increment automation by adding .github/workflows/plugin_install.yml in this block https://github.com/opensearch-project/security/blob/main/build.gradle#L643-L648? I'm wondering if adding a new ant.replaceregexp is necessary.

Hi @cwperks, thanks for the comment! I was actually thinking the same yesterday and I found that this line (https://github.com/opensearch-project/security/blob/main/build.gradle#L643) is doing the matching and replacing. It seems like this the content is not the one we want, so I think we may need another ant.replaceregexp to specify the content we want for plugin_install.yml to match and replace.

DarshitChanpura
DarshitChanpura previously approved these changes Jan 5, 2023
@DarshitChanpura
Copy link
Member

@cwperks Can you please merge this once your comment has been resolved?

@cwperks
Copy link
Member

cwperks commented Jan 6, 2023

@RyanL1997 How did you test the change? When I add the file into the existing section and run

./gradlew updateVersion -DnewVersion=3.1.0

I get the same output when running the change in this PR. The difference is that the first block removes -SNAPSHOT and the block in this PR will keep it in.

@RyanL1997 RyanL1997 dismissed stale reviews from DarshitChanpura and peternied via e81979f January 6, 2023 17:08
@RyanL1997
Copy link
Collaborator Author

Hi @cwperks, I have updated this and add the workflow directory to the original ant.replaceregexp . Here are the screenshots of the local testing:
Screenshot 2023-01-06 at 9 17 41 AM

Screenshot 2023-01-06 at 9 17 00 AM

@peternied peternied merged commit be7beb9 into opensearch-project:main Jan 6, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 6, 2023
* Add script for workflow version increment

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit be7beb9)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 6, 2023
* Add script for workflow version increment

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit be7beb9)
RyanL1997 pushed a commit that referenced this pull request Jan 6, 2023
* Add script for workflow version increment

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit be7beb9)
RyanL1997 pushed a commit that referenced this pull request Jan 6, 2023
* Add script for workflow version increment

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit be7beb9)
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
…pensearch-project#2386)

* Add script for workflow version increment

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit be7beb9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch backport 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants