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

Move gradle-check code to its own scripts and upload codecov #3742

Conversation

peterzhuamazon
Copy link
Member

Signed-off-by: Peter Zhu [email protected]

Description

Move gradle-check code to its own scripts.
It is not easy to keep updating all the branches with any workflow changes in code.
Therefore, move the gradle check code to its own scripts.
This also attempt to upload codecoverage xml to codecov if gradle check success.

Issues Resolved

opensearch-project/opensearch-build#2193

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.

@peterzhuamazon peterzhuamazon changed the title Move gradle-check code to its own scripts Move gradle-check code to its own scripts and upload codecov Jun 29, 2022
@peterzhuamazon peterzhuamazon marked this pull request as ready for review June 29, 2022 21:57
@peterzhuamazon peterzhuamazon requested review from a team and reta as code owners June 29, 2022 21:57
@peterzhuamazon
Copy link
Member Author

Note: Gradle Check is failing due to core code change, not due to my PR changes here.

@peterzhuamazon peterzhuamazon self-assigned this Jun 29, 2022
@peterzhuamazon peterzhuamazon added enhancement Enhancement or improvement to existing feature or request backport 1.x backport 2.x Backport to 2.x branch backport 2.0 Backport to 2.0 branch backport 2.1 labels Jun 29, 2022
- name: Checkout opensearch-build repo
uses: actions/checkout@v2
with:
repository: opensearch-project/opensearch-build
Copy link
Member

Choose a reason for hiding this comment

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

Instead of having dependency on the build repo. Can we do something suggested here: #3717 (comment)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, that workflow have not been maintained for over 3 years and it is in 0.0.1 version.
I will not use that for production purposes.

Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also that one is for API token not the same as generic webhook, where we can pass a lot of information between github and Jenkins.

I dont see a dependency on opensearch-build is an issue the jenkinsfile is in opensearch-build already.

Copy link
Member

@owaiskazi19 owaiskazi19 Jun 29, 2022

Choose a reason for hiding this comment

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

Can we have the scripts present in OpenSearch repo? Also, a good practice to mark the conversation resolved by the reviewer can be find here

Copy link
Member Author

Choose a reason for hiding this comment

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

The point to present it in opensearch-build repo is so that you dont need to backport to every single branch whenever there is a tiny change.

Remember you have more than 10+ branches need gradle check.

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 for raising this issues tho, but I believe this is the best way to get gradle check start running.
We can always improve in later PRs.

Thanks.

Copy link
Member

@dreamer-89 dreamer-89 Jun 30, 2022

Choose a reason for hiding this comment

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

@peterzhuamazon : Thanks for your effort in pulling up this change.

Regarding location of gradle script, I think it logically belongs to OpenSearch repository. Once the change is stabilized (green runs on main), we can backport this to remaining branches. Going forward; there wouldn't be work needed for future branches cut from main (or release branches).

@dblock @reta WDYT ?

Copy link
Collaborator

@reta reta Jun 30, 2022

Choose a reason for hiding this comment

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

@dreamer-89 that's a good point, I have seen both (central repo for build scripts and replicating build scripts across many branches). I think having build material along each branch is the best option when build scripts are trivial or non-existent (like pure Github actions let say). When build scripts are non-trivial (I think this is our case at least now), keeping them centralized at some place (build repository / library) serves better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @reta @dreamer-89

Yes that is the reason why I keep the script in build repo for now.
All the existing actions on market are either not meeting our needs, or too old without any maintenance.
We can improve this later by either forking one of the existing actions, or write a new one to replace.

Right now, like you suggested, it is best to leave it in build repo for now.

Thanks.

@dreamer-89 dreamer-89 requested a review from dblock June 30, 2022 00:30
@peterzhuamazon peterzhuamazon merged commit 3681ac7 into opensearch-project:main Jun 30, 2022
@peterzhuamazon peterzhuamazon deleted the opensearch-gradle-check-fix2 branch June 30, 2022 00:50
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 30, 2022
* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 30, 2022
* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 30, 2022
* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 30, 2022
* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)
CEHENKLE pushed a commit that referenced this pull request Jun 30, 2022
…3747)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>
CEHENKLE pushed a commit that referenced this pull request Jun 30, 2022
…3746)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>
CEHENKLE pushed a commit that referenced this pull request Jun 30, 2022
…3745)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>
CEHENKLE pushed a commit that referenced this pull request Jun 30, 2022
…3744)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>
imRishN pushed a commit to imRishN/OpenSearch that referenced this pull request Jul 3, 2022
…rch-project#3742)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
mch2 pushed a commit to mch2/OpenSearch that referenced this pull request Jul 5, 2022
…rch-project#3742) (opensearch-project#3744)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>
mch2 added a commit that referenced this pull request Jul 6, 2022
* [Backport 1.x] Add gradle check test for github workflows (Testing again) (#3724)

* [Backport 1.x] Add gradle check test for github workflows (Testing again)

* [Backport 1.x] Add gradle check test for github workflows (Testing again)

Signed-off-by: Peter Zhu <[email protected]>

* Remove linter

Signed-off-by: Peter Zhu <[email protected]>

* Update github action gradle-check to use pull_request_target for accessing token (#3728) (#3730)

* Check out gradle

Signed-off-by: Peter Zhu <[email protected]>

* Tweak titles

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 4f7bf08)

Co-authored-by: Peter Zhu <[email protected]>

* Move gradle-check code to its own scripts and upload codecov (#3742) (#3744)

* Move gradle-check to script, add codecov, add comments

Signed-off-by: Peter Zhu <[email protected]>

* Add more improvements on comments handling

Signed-off-by: Peter Zhu <[email protected]>

* Add more comments

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 3681ac7)

Co-authored-by: Peter Zhu <[email protected]>

Co-authored-by: Peter Zhu <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x backport 2.x Backport to 2.x branch backport 2.0 Backport to 2.0 branch backport 2.1 enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants