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

Gradle Check Optimization #13786

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

prudhvigodithi
Copy link
Contributor

@prudhvigodithi prudhvigodithi commented May 22, 2024

Description

Coming from #11217 (comment), this PR will ensure we have the PR number identified by commitID even for post_merge_action. This data will be used in gradle metrics dashboard OpenSearch Gradle Check Metrics.

The required jenkinsfile change PR opensearch-project/opensearch-build#4719.
The required library change PR opensearch-project/opensearch-build-libraries#427.

With this change we can get the associated PR for failed tests on post_merge_action.

Related Issues

Part of: #3713

Testing

Here is the sample workflow run for push action https://github.com/prudhvigodithi/opensearch-build/actions/runs/9163727535/job/25193476071, where the PR number (prudhvigodithi/opensearch-build#110) is displayed for push event.
Screenshot 2024-05-22 at 11 38 02 AM

Check List

  • New functionality includes testing.
  • All tests pass
  • New functionality has been documented.
  • New functionality has javadoc added
  • API changes companion pull request created.
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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: Prudhvi Godithi <pgodithi@amazon.com>
Copy link
Contributor

✅ Gradle check result for 020d7f4: SUCCESS

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.73%. Comparing base (b15cb0c) to head (020d7f4).
Report is 299 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13786      +/-   ##
============================================
+ Coverage     71.42%   71.73%   +0.31%     
- Complexity    59978    61325    +1347     
============================================
  Files          4985     5062      +77     
  Lines        282275   287907    +5632     
  Branches      40946    41692     +746     
============================================
+ Hits         201603   206530    +4927     
- Misses        63999    64316     +317     
- Partials      16673    17061     +388     

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

@prudhvigodithi
Copy link
Contributor Author

Tagging @cwperks @peternied @dblock @andrross @peterzhuamazon to please take a look.

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.

Looks good to me - any concerns before merging?

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

LGTM

@prudhvigodithi prudhvigodithi marked this pull request as ready for review May 22, 2024 21:12
@prudhvigodithi
Copy link
Contributor Author

@peternied not able to get this Pull Request Checks pass, can you please check ?

@peternied
Copy link
Member

Seems like the logs on that check spell it out, no?

Error: Found 3 errors:
   - Unable to find check list item `New functionality has been documented.` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.
   - Unable to find check list item `New functionality has javadoc added` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.
   - Unable to find check list item `Commit changes are listed out in CHANGELOG.md file (See: [Changelog](../blob/main/CONTRIBUTING.md#changelog))` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.

@prudhvigodithi
Copy link
Contributor Author

Seems like the logs on that check spell it out, no?

Error: Found 3 errors:
   - Unable to find check list item `New functionality has been documented.` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.
   - Unable to find check list item `New functionality has javadoc added` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.
   - Unable to find check list item `Commit changes are listed out in CHANGELOG.md file (See: [Changelog](../blob/main/CONTRIBUTING.md#changelog))` in the pull request description. Check list item that should be checked `[x]` or the item should be 'struck out' with `~` characters on both sides of the text.

Yes I see that but they dont even exist in my PR description, I guess I have to re-add them back with ~.

@peternied peternied merged commit 5441d55 into opensearch-project:main May 22, 2024
56 of 82 checks passed
@prudhvigodithi prudhvigodithi added backport 2.x Backport to 2.x branch backport 1.x labels May 22, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 22, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit 5441d55)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-1.x 1.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-1.x
# Create a new branch
git switch --create backport/backport-13786-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5441d55ee191ca789ba86b7e477a64eb73398c80
# Push it to GitHub
git push --set-upstream origin backport/backport-13786-to-1.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-13786-to-1.x.

@andrross
Copy link
Member

@prudhvigodithi FYI looks like you'll need to manually fix some conflicts if you want to backport this to 1.x

@prudhvigodithi prudhvigodithi added the backport 1.3 Backport to 1.3 branch label May 22, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 1.3 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-1.3 1.3
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-1.3
# Create a new branch
git switch --create backport/backport-13786-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5441d55ee191ca789ba86b7e477a64eb73398c80
# Push it to GitHub
git push --set-upstream origin backport/backport-13786-to-1.3
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-1.3

Then, create a pull request where the base branch is 1.3 and the compare/head branch is backport/backport-13786-to-1.3.

@prudhvigodithi
Copy link
Contributor Author

Ya @andrross it should be backported to 1.3 (failed as well, which I will do it manually) as 1.x is reaching EOL and active supported version is 1.3.x, please correct me if I'm wrong.

prudhvigodithi pushed a commit that referenced this pull request May 23, 2024
(cherry picked from commit 5441d55)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@prudhvigodithi
Copy link
Contributor Author

Works as expected, here is the gradle check invoked with push action https://github.com/opensearch-project/OpenSearch/actions/runs/9202472314/job/25312375443 and I can see its able to identify the PR (#13787) based on the commit with post_merge_action as true.
Screenshot 2024-05-22 at 10 05 28 PM

@andrross
Copy link
Member

@prudhvigodithi Yes, you're right! No need to backport 1.x. 1.3 is the only active branch in the 1.x line.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.14 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.14
# Create a new branch
git switch --create backport/backport-13786-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5441d55ee191ca789ba86b7e477a64eb73398c80
# Push it to GitHub
git push --set-upstream origin backport/backport-13786-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport/backport-13786-to-2.14.

1 similar comment
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.14 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.14
# Create a new branch
git switch --create backport/backport-13786-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5441d55ee191ca789ba86b7e477a64eb73398c80
# Push it to GitHub
git push --set-upstream origin backport/backport-13786-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport/backport-13786-to-2.14.

reta pushed a commit to reta/OpenSearch that referenced this pull request Jun 3, 2024
…ect#13787)

(cherry picked from commit 5441d55)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 03c13cb)
prudhvigodithi pushed a commit that referenced this pull request Jun 3, 2024
(cherry picked from commit 5441d55)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 03c13cb)

Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…ect#13787)

(cherry picked from commit 5441d55)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: kkewwei <kkewwei@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x backport 1.3 Backport to 1.3 branch backport 2.x Backport to 2.x branch backport 2.14 Backport to 2.14 branch backport-failed skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants