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

Sync GitHub workflows from main branch #13790

Merged
merged 1 commit into from
May 23, 2024

Conversation

prudhvigodithi
Copy link
Contributor

@prudhvigodithi prudhvigodithi commented May 23, 2024

Description

While working on this failed backport #13786 (comment), I have noticed majority of the existing workflows are either not backported, synced or updated, I have tried to find what ever I can and updated through this PR.

Related Issues

Part of: #3713

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.

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@prudhvigodithi
Copy link
Contributor Author

I see the same reason why the gradle checks are failing.
#13787 (comment)

@prudhvigodithi prudhvigodithi added the backport 1.3 Backport to 1.3 branch label May 23, 2024
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta
Copy link
Collaborator

reta commented May 23, 2024

@prudhvigodithi do you need to rabase? (incorporating #13787 (comment))

@prudhvigodithi
Copy link
Contributor Author

@prudhvigodithi do you need to rabase? (incorporating #13787 (comment))

This has to be force merged @reta and existing PR's (to execute gradle check) should be rebased.
Thanks

@reta
Copy link
Collaborator

reta commented May 23, 2024

This has to be force merged @reta and existing PR's (to execute gradle check) should be rebased.

This has to be force merged @reta and existing PR's (to execute gradle check) should be rebased.

The lastest build still fails with:

Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f9e7ab7d-86da-45c5-94f4-d8c8729de4f7
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)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:379)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)

@prudhvigodithi
Copy link
Contributor Author

prudhvigodithi commented May 23, 2024

The lastest build still fails with:

Ya thats because I'm trying to test (re-run the gradle check) with old open PR's to see if there is any way to avoid rebase for folks who have the PR open :). For any PR's that created after this was merged (example on main and 2.x line #13793) will have no issues with the gradle check and jenkins build.

@prudhvigodithi
Copy link
Contributor Author

@reta just added assemble.yml and copy-linked-issue-labels.yml that are marked as mandatory from repo settings, please check.

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta
Copy link
Collaborator

reta commented May 23, 2024

@prudhvigodithi sorry about that:

* Where:
Build file '/home/runner/work/OpenSearch/OpenSearch/buildSrc/build.gradle' line: 78


* What went wrong:
A problem occurred evaluating project ':buildSrc'.
> At least Java 11 is required to build opensearch gradle tools

it seems like 8 is no go :( my apologies

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@prudhvigodithi
Copy link
Contributor Author

prudhvigodithi commented May 23, 2024

Updated to only 11 @reta, also for assemble task to work on windows, do we need to backport this PR #1412 ? As I see the run passed https://github.com/opensearch-project/OpenSearch/actions/runs/9181040634/job/25246840531?pr=13754 skipped the following tasks

:distribution:docker:buildArm64DockerImage
:distribution:docker:buildDockerImage
:distribution:docker:buildPpc64leDockerImage

@dblock @bbarani

@prudhvigodithi
Copy link
Contributor Author

Also FYI @bbarani @dblock @reta for now I have created 2 new branch protection rules for 1.3 and 1.x (once we have the finalized list we have a regex as 1.*), this should take care of only checks limited to only 1.x series. Coming to the Minimum approval count and copy-issue-labels, the conditions used are pull_request_review and pull_request_target, so these workflows expects a workflow file from source repo and not fork and they should start working once we merge this PR.

Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@prudhvigodithi
Copy link
Contributor Author

Updated to only 11 @reta, also for assemble task to work on windows, do we need to backport this PR #1412 ? As I see the run passed https://github.com/opensearch-project/OpenSearch/actions/runs/9181040634/job/25246840531?pr=13754 skipped the following tasks

:distribution:docker:buildArm64DockerImage
:distribution:docker:buildDockerImage
:distribution:docker:buildPpc64leDockerImage

@dblock @bbarani

I was able to handle this within the assemble workflow, the assemble workflows is green now.

@reta
Copy link
Collaborator

reta commented May 23, 2024

Chatted with @prudhvigodithi , the Gradle check fails with because the original branch (1.x) does not have the ENV variable populated.

Error when executing always post condition:
Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 362f15cc-7542-4a54-a0b6-4af2707ce3d5
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)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:379)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:355)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
	at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
	at WorkflowScript.run(WorkflowScript:172)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:73)
	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)

@prudhvigodithi prudhvigodithi merged commit 943870a into opensearch-project:1.x May 23, 2024
11 of 12 checks passed
@prudhvigodithi
Copy link
Contributor Author

Thanks @reta will wait for a backport PR for 1.3, else I will create it manually.

@prudhvigodithi prudhvigodithi added backport 1.3 Backport to 1.3 branch and removed backport 1.3 Backport to 1.3 branch labels May 23, 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-13790-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 943870a644b10abdb25492a538c2925272adae0a
# Push it to GitHub
git push --set-upstream origin backport/backport-13790-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-13790-to-1.3.

@prudhvigodithi
Copy link
Contributor Author

Added the backport workflow but since this still failed to backport raised a manual backport PR #13804.

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.

2 participants