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

[Backport 2.x] Gradle Check Optimization #13787

Merged
merged 1 commit into from
May 23, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 5441d55 from #13786.

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>
Copy link
Contributor

❌ Gradle check result for cddb3cf: ABORTED

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for cddb3cf: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for cddb3cf: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for cddb3cf: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@prudhvigodithi
Copy link
Contributor

The gradle check failure here is expected as the new field post_merge_action is not present (inferred as null {"post_merge_action":"") in 2.x branch until this PR is merged, here is the failure link https://build.ci.opensearch.org/job/gradle-check/39103/console. We should force merge this.
Thanks to @peterzhuamazon for confirming this.
Screenshot 2024-05-22 at 3 50 01 PM

@peterzhuamazon
Copy link
Member

The gradle check failure here is expected as the new field post_merge_action is not present (inferred as null {"post_merge_action":"") in 2.x branch until this PR is merged, here is the failure link https://build.ci.opensearch.org/job/gradle-check/39103/console. We should force merge this. Thanks to @peterzhuamazon for confirming this. Screenshot 2024-05-22 at 3 50 01 PM

Second to this, as the code is using pull_request_target event so all the workflow files changes are coming from the current merged 2.x branch head commit, not from fork.

Thanks.

@prudhvigodithi
Copy link
Contributor

@peternied can we go ahead and merge this?

@prudhvigodithi
Copy link
Contributor

Adding @andrross @dblock as well to please take a look.

@jed326
Copy link
Collaborator

jed326 commented May 23, 2024

Think we need someone from @opensearch-project/admin to help merge as maintainers are not able to override checks anymore.

@prudhvigodithi
Copy link
Contributor

Thanks @jed326 I will take care of it.

@prudhvigodithi prudhvigodithi merged commit 03c13cb into 2.x May 23, 2024
20 of 30 checks passed
@github-actions github-actions bot deleted the backport/backport-13786-to-2.x branch May 23, 2024 05:02
@prudhvigodithi prudhvigodithi mentioned this pull request May 23, 2024
9 tasks
@peternied
Copy link
Member

@prudhvigodithi @jed326 - It looks like the gradle check wasn't handling the case where the data was missing gracefully. This seems like a miss in the jenkins library change.

Most importantly - Is merging code unblocked in other pull requests targeting 2.x / 1.x branches? Do they need to rebase/merge from main?

For follow up can we update the jenkins library to catch and handle these issues better?

groovy.lang.MissingPropertyException: No such property: post_merge_action for class: groovy.lang.Binding
	at groovy.lang.Binding.getVariable(Binding.java:63)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:285)
	at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:375)

@prudhvigodithi
Copy link
Contributor

Hey @peternied, yes open PR's still needs to rebased. The ideal way was to 1st merge all the gradle change backport PR's from core repo and then the Jenkinsfile change (PR: opensearch-project/opensearch-build#4719) that handles the new fields, then it would not throw the error as No such property: post_merge_action as the jenkins build would continue to builds with just the old fields. Now the jenkins change was merged before the backports hence ended up in this error. Once the backports are merged we should not see this error as moving forward the post_merge_action field is mandatory (either true/false) in all runs.
@peterzhuamazon

@peternied
Copy link
Member

@prudhvigodithi Could you comment on all opens PRs that need to rebase so those authors know how to get the check to pass again / avoid troubleshooting that failure?

@prudhvigodithi
Copy link
Contributor

Sure, before that let me see if using pull_request_target: there is a better way to always get the latest workflow file from the source repo branch, if we have a way like this then simple re-run of the gradle check on the open PR should solve the problem, no need to rebase.

@reta reta added backport 2.14 Backport to 2.14 branch labels Jun 3, 2024
@opensearch-trigger-bot
Copy link
Contributor Author

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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/backport-2.14
# Create a new branch
git switch --create backport/backport-13787-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 03c13cbec0f553d47e24739806f010095481fea5
# Push it to GitHub
git push --set-upstream origin backport/backport-13787-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.14

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

2 similar comments
@opensearch-trigger-bot
Copy link
Contributor Author

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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/backport-2.14
# Create a new branch
git switch --create backport/backport-13787-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 03c13cbec0f553d47e24739806f010095481fea5
# Push it to GitHub
git push --set-upstream origin backport/backport-13787-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.14

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

@opensearch-trigger-bot
Copy link
Contributor Author

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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/backport-2.14
# Create a new branch
git switch --create backport/backport-13787-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 03c13cbec0f553d47e24739806f010095481fea5
# Push it to GitHub
git push --set-upstream origin backport/backport-13787-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport/backport-13787-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>
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 2.14 Backport to 2.14 branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants