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

[BUG] 'Increment Version' workflow doesn't add new 1.x BWC Version for 2.0 and 2.x branches #3218

Open
tlfeng opened this issue May 6, 2022 · 12 comments
Assignees
Labels
bug Something isn't working CI CI related

Comments

@tlfeng
Copy link
Collaborator

tlfeng commented May 6, 2022

Describe the bug
The GitHub Action workflow https://github.com/opensearch-project/OpenSearch/blob/2.0.0-rc1/.github/workflows/version.yml doesn't create Pull Requests to add new version number to "Version.java" and .ci/bwcVersions for 2.0 and 2.x branches.

Take adding version number 1.3.3 for example, it only create PRs for main, 1.x and 1.3 version:
https://github.com/opensearch-project/OpenSearch/search?q=%5BAUTO%5D+1.3.3&type=issues
The situation is the same when adding version number 1.3.2:
https://github.com/opensearch-project/OpenSearch/search?q=%5BAUTO%5D+1.3.2&type=issues

Gradle check will fail for changes to 2.0 and 2.x branches, if not adding the new 1.x version to 2.x branches.
For exmaple: #3208 (comment)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':distribution:bwc:bugfix:buildBwcLinuxTar'.
> Building 1.3.2 didn't generate expected file /var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/distribution/bwc/bugfix/build/bwc/checkout-1.3/distribution/archives/linux-tar/build/distributions/opensearch-min-1.3.2-SNAPSHOT-linux-x64.tar.gz

To Reproduce
No need to reproduce: push a tag in the format of ..*
https://github.com/opensearch-project/OpenSearch/blob/2.0.0-rc1/.github/workflows/version.yml#L6

Expected behavior
Pull Request is created automatically to add new version number to 2.0 and 2.x branches.

Additional context
The 'Increment Version' GHA workflow is introduced by PR #1816

@tlfeng tlfeng added bug Something isn't working untriaged CI CI related labels May 6, 2022
@tlfeng tlfeng changed the title [BUG] 'Increment Version' workflow doesn't add new BWC Version for 2.0 and 2.x branches [BUG] 'Increment Version' workflow doesn't add new Version for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng changed the title [BUG] 'Increment Version' workflow doesn't add new Version for 2.0 and 2.x branches [BUG] 'Increment Version' workflow doesn't add new BWC Version for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng mentioned this issue May 6, 2022
5 tasks
@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request and removed bug Something isn't working untriaged labels May 6, 2022
@tlfeng tlfeng changed the title [BUG] 'Increment Version' workflow doesn't add new BWC Version for 2.0 and 2.x branches [FEATURE] 'Increment Version' workflow doesn't add new BWC Version for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng changed the title [FEATURE] 'Increment Version' workflow doesn't add new BWC Version for 2.0 and 2.x branches Enhance 'Increment Version' workflow to add new 1.x BWC Version for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng changed the title Enhance 'Increment Version' workflow to add new 1.x BWC Version for 2.0 and 2.x branches Enhance 'Increment Version' workflow to add new 1.x version into BWC Versions list for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng changed the title Enhance 'Increment Version' workflow to add new 1.x version into BWC Versions list for 2.0 and 2.x branches Enhance 'Increment Version' workflow to add new 1.x version into BWC versions list for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng added bug Something isn't working and removed enhancement Enhancement or improvement to existing feature or request labels May 6, 2022
@tlfeng tlfeng changed the title Enhance 'Increment Version' workflow to add new 1.x version into BWC versions list for 2.0 and 2.x branches [BUG] 'Increment Version' workflow doesn't add new 1.x BWC Version for 2.0 and 2.x branches May 6, 2022
@tlfeng tlfeng mentioned this issue May 6, 2022
5 tasks
@dblock
Copy link
Member

dblock commented May 6, 2022

Yeah, not sure it's worth fixing. https://github.com/opensearch-project/OpenSearch/blob/main/.github/workflows/version.yml

@peterzhuamazon
Copy link
Member

@tlfeng this would fail the main branch gradle check:

> Task :distribution:bwc:minor:buildBwcLinuxTar FAILED
 [2.1.0] 
 [2.1.0] FAILURE: Build failed with an exception.
 [2.1.0] 
 [2.1.0] * What went wrong:
 [2.1.0] Execution failed for task ':buildSrc:reaper:compileJava'.
 [2.1.0] > Could not create service of type UserHomeScopedCompileCaches using UserHomeScopeServices.createCompileCaches().
 [2.1.0]    > Timeout waiting to lock Java compile cache (/home/ec2-user/.gradle/caches/7.4.2/javaCompile). It is currently in use by another Gradle instance.
 [2.1.0]      Owner PID: 8658
 [2.1.0]      Our PID: 20754
 [2.1.0]      Owner Operation: 
 [2.1.0]      Our operation: 
 [2.1.0]      Lock file: /home/ec2-user/.gradle/caches/7.4.2/javaCompile/javaCompile.lock
 [2.1.0] 
 [2.1.0] * Try:
 [2.1.0] 2 actionable tasks: 2 executed
 [2.1.0] > Run with --stacktrace option to get the stack trace.
 [2.1.0] > Run with --info or --debug option to get more log output.
 [2.1.0] > Run with --scan to get full insights.
 [2.1.0] 
 [2.1.0] * Get more help at https://help.gradle.org
 [2.1.0] 
 [2.1.0] BUILD FAILED in 2m 9s
Output for /var/jenkins/workspace/gradle_check/search/distribution/bwc/minor/build/bwc/checkout-2.x/gradlew:

This does not happen in 2.0 which uses gradle 7.3.3, the issued main branch is using gradle 7.4.2.

Thanks.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Jun 24, 2022

Hi @reta ever since gradle upgrade to 7.4.2 I have seen such issue above on 3.0.0/main when running gradle check.
This does not happen in 2.0 branch with 7.3.3 gradle.

Running ./gradlew check -Dtests.coverage=true --no-daemon --no-scan.

Thanks.

@CEHENKLE
Copy link
Member

Hey @dreamer-89 Would you mind picking this up? I understand this is one of the blocking issues to help get coverage out which I know we're all keen to see

@dreamer-89
Copy link
Member

Hey @dreamer-89 Would you mind picking this up? I understand this is one of the blocking issues to help get coverage out which I know we're all keen to see

Looking into this.

@dreamer-89
Copy link
Member

[2.1.0] > Could not create service of type UserHomeScopedCompileCaches using UserHomeScopeServices.createCompileCaches().
[2.1.0] > Timeout waiting to lock Java compile cache (/home/ec2-user/.gradle/caches/7.4.2/javaCompile). It is currently in use by another Gradle instance.
[2.1.0] Owner PID: 8658
[2.1.0] Our PID: 20754
[2.1.0] Owner Operation:
[2.1.0] Our operation:
[2.1.0] Lock file: /home/ec2-user/.gradle/caches/7.4.2/javaCompile/javaCompile.lock
[2.1.0]

This failure is different than the one this issue is intially reported (auto update Version.java for 2.x branches). From failure trace above, seems like lock contention among different gradle processes is causing the failure.

This failure is not reproducible locally (ubuntu) with latest changes from main; which makes me think, this is related to environment/setup related issue. This is coming from opensearch-project/opensearch-build#2249

@reta
Copy link
Collaborator

reta commented Jun 24, 2022

Hi @reta ever since gradle upgrade to 7.4.2 I have seen such issue above on 3.0.0/main when running gradle check.
This does not happen in 2.0 branch with 7.3.3 gradle.

I have not seen it yet, but I will take a look, thanks @dreamer-89 for troubleshooting

@reta
Copy link
Collaborator

reta commented Jun 24, 2022

Seems to be gradle/gradle#20055

@peterzhuamazon
Copy link
Member

@reta Update: resolved if you dont use AL2/CentOS but only use Ubuntu.

@dreamer-89
Copy link
Member

Seems to be gradle/gradle#20055

Seems happening on AL2 specific instances that is what used here as well.

@reta
Copy link
Collaborator

reta commented Jun 24, 2022

Thanks a lot @peterzhuamazon !

@dreamer-89
Copy link
Member

dreamer-89 commented Sep 7, 2022

This issue appears during releases where a version bump on one branch fails the gradle check on all branches one version above. It needs prioritization. Need to update the workflow which identifies the new version tag and raises the PR. The recent one #4381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI CI related
Projects
None yet
Development

No branches or pull requests

6 participants