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] ./gradlew bwcTest is broken #1855

Closed
owaiskazi19 opened this issue Jan 6, 2022 · 10 comments · Fixed by #1877
Closed

[BUG] ./gradlew bwcTest is broken #1855

owaiskazi19 opened this issue Jan 6, 2022 · 10 comments · Fixed by #1877
Assignees
Labels
backwards-compatibility bug Something isn't working Build Libraries & Interfaces good first issue Good for newcomers hacktoberfest Global event that encourages people to contribute to open-source. Priority-Low

Comments

@owaiskazi19
Copy link
Member

Describe the bug

* What went wrong:
Could not determine the dependencies of task ':qa:full-cluster-restart:v1.1.1#upgradedClusterTest'.
> Could not resolve all task dependencies for configuration ':qa:full-cluster-restart:opensearch_distro_extracted_testclusters-qa-full-cluster-restart-v1.1.1-0-1.1.1-'.
   > Could not resolve opensearch-distribution:opensearch:1.1.1.
     Required by:
         project :qa:full-cluster-restart
      > Could not resolve opensearch-distribution:opensearch:1.1.1.
         > Could not get resource 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.1/opensearch-min-1.1.1-linux-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.1/opensearch-min-1.1.1-linux-x64.tar.gz'. Received status code 403 from server: Forbidden
      > Could not resolve opensearch-distribution:opensearch:1.1.1.
         > Could not get resource 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.1/opensearch-min-1.1.1-linux-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.1/opensearch-min-1.1.1-linux-x64.tar.gz'. Received status code 403 from server: Forbidden

To Reproduce
Steps to reproduce the behavior:

  1. Run ./gradlew bwcTest on main

Expected behavior
BWC Test should work fine.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@dblock
Copy link
Member

dblock commented Jan 6, 2022

It's failing to find a 1.1.1 build. I believe 1.1.1 will never be released (opensearch-project/opensearch-build#870), therefore probably the easiest fix is to remove it from the list everywhere?

@owaiskazi19
Copy link
Member Author

owaiskazi19 commented Jan 18, 2022

Came across the below after running ./gradlew bwcTest on main

Execution failed for task ':qa:mixed-cluster:v1.0.0#mixedClusterTest'.
> `cluster{:qa:mixed-cluster:v1.0.0}` failed to wait for cluster health yellow after 40 SECONDS
    IO error while waiting cluster
    503 Service Unavailable


Detailed logs: mixed-cluster-logs.txt
Reopening the issue.

@owaiskazi19 owaiskazi19 reopened this Jan 18, 2022
@CEHENKLE
Copy link
Member

@owaiskazi19 Hey! it looks like that stack trace is pointing to another issue, other than the one that's described here. Is BWC still always broken? It seems not, since gradle check is passing? Perhaps we should add the flaky label?

@dreamer-89
Copy link
Member

dreamer-89 commented Jan 25, 2022

It seems like some issue specifically with bwcTest task. I am also able to replicate it when running on main branch. It needs deep dive on how bwcTest is getting resolved.

➜  OpenSearch git:(main) ./gradlew bwcTest
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :qa:os
Cannot add task 'destructiveDistroTest.docker' as a task with that name already exists.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':qa:full-cluster-restart:v1.2.3#upgradedClusterTest'.
> Could not resolve all task dependencies for configuration ':qa:full-cluster-restart:opensearch_distro_extracted_testclusters-qa-full-cluster-restart-v1.2.3-1-1.2.3-'.
   > Could not resolve opensearch-distribution:opensearch:1.2.3.
     Required by:
         project :qa:full-cluster-restart
      > Could not resolve opensearch-distribution:opensearch:1.2.3.
         > Could not get resource 'https://artifacts.opensearch.org/releases/core/opensearch/1.2.3/opensearch-min-1.2.3-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/releases/core/opensearch/1.2.3/opensearch-min-1.2.3-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden
      > Could not resolve opensearch-distribution:opensearch:1.2.3.
         > Could not get resource 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.2.3/opensearch-min-1.2.3-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.2.3/opensearch-min-1.2.3-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 39s
14 actionable tasks: 1 executed, 13 up-to-date

@owaiskazi19
Copy link
Member Author

@owaiskazi19 Hey! it looks like that stack trace is pointing to another issue, other than the one that's described here. Is BWC still always broken? It seems not, since gradle check is passing? Perhaps we should add the flaky label?

As @dreamer-89 mentioned above. That's the catch where bwcTest is passing with gradle check but not when run separately.

@dbwiddis
Copy link
Member

dbwiddis commented Jul 22, 2022

I'm running into this issue trying to do ./gradlew check on anomaly-detection:

* What went wrong:
Execution failed for task ':integTest'.
> Could not resolve all files for configuration ':opensearch_distro_extracted_testclusters--integTest-0-2.1.0-SNAPSHOT-'.
   > Could not resolve opensearch-distribution-snapshot:opensearch:2.1.0-SNAPSHOT.
     Required by:
         project :
      > Could not resolve opensearch-distribution-snapshot:opensearch:2.1.0-SNAPSHOT.
         > Could not get resource 'https://artifacts.opensearch.org/snapshots/core/opensearch/2.1.0-SNAPSHOT/opensearch-min-2.1.0-SNAPSHOT-darwin-x64-latest.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/snapshots/core/opensearch/2.1.0-SNAPSHOT/opensearch-min-2.1.0-SNAPSHOT-darwin-x64-latest.tar.gz'. Received status code 403 from server: Forbidden

Completely separately from gradle, I get a 403 error in my browser trying to visit any of the paths at https://artifacts.opensearch.org/snapshots/core/opensearch.

@navneet1v
Copy link
Contributor

navneet1v commented Jul 22, 2022

I'm running into this issue trying to do ./gradlew check on anomaly-detection:

* What went wrong:
Execution failed for task ':integTest'.
> Could not resolve all files for configuration ':opensearch_distro_extracted_testclusters--integTest-0-2.1.0-SNAPSHOT-'.
   > Could not resolve opensearch-distribution-snapshot:opensearch:2.1.0-SNAPSHOT.
     Required by:
         project :
      > Could not resolve opensearch-distribution-snapshot:opensearch:2.1.0-SNAPSHOT.
         > Could not get resource 'https://artifacts.opensearch.org/snapshots/core/opensearch/2.1.0-SNAPSHOT/opensearch-min-2.1.0-SNAPSHOT-darwin-x64-latest.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/snapshots/core/opensearch/2.1.0-SNAPSHOT/opensearch-min-2.1.0-SNAPSHOT-darwin-x64-latest.tar.gz'. Received status code 403 from server: Forbidden

Completely separately from gradle, I get a 403 error in my browser trying to visit any of the paths at https://artifacts.opensearch.org/snapshots/core/opensearch.

The issue is happening because there is no Snapshot available for macbook(darwin here) or it is not getting published. Try to run the same command in a linux environment to fix this error.

This issue is tracked here: opensearch-project/opensearch-build#2216

Alternative

#3637 (comment)

@dbwiddis
Copy link
Member

Thanks, @navneet1v! The workaround probably would have worked except my local build is 3.0.0-SNAPSHOT and I went down the road of trying to simply change the version in the bulid file, but that broke other things.

But using an ubuntu VM works for now and if there's a longer term plan to enable darwin builds that works.

@navneet1v
Copy link
Contributor

Thanks, @navneet1v! The workaround probably would have worked except my local build is 3.0.0-SNAPSHOT and I went down the road of trying to simply change the version in the bulid file, but that broke other things.

But using an ubuntu VM works for now and if there's a longer term plan to enable darwin builds that works.

On the long term plan I am not aware of you can try following the opensearch-project/opensearch-build#2216, @saratvemulapalli can provide details on this.

@owaiskazi19 owaiskazi19 added the hacktoberfest Global event that encourages people to contribute to open-source. label Oct 5, 2022
@owaiskazi19 owaiskazi19 self-assigned this Feb 9, 2023
@owaiskazi19
Copy link
Member Author

Tested ./gradlew bwcTest on linux environment and it passes successfully

[2.5.1] BUILD SUCCESSFUL in 3m 49s
 [2.5.1] 169 actionable tasks: 163 executed, 6 from cache

> Task :qa:mixed-cluster:v2.6.0#mixedClusterTest
Test cluster endpoints are: [::1]:42817,127.0.0.1:36913,[::1]:43889,127.0.0.1:44875,[::1]:32915,127.0.0.1:35743,[::1]:32971,127.0.0.1:34223
Upgrading one node to create a mixed cluster
Upgrade complete, endpoints are: [::1]:34587,127.0.0.1:33279,[::1]:43889,127.0.0.1:44875,[::1]:32915,127.0.0.1:35743,[::1]:32971,127.0.0.1:34223
Upgrading another node to create a mixed cluster
Upgrading complete, endpoints are: [::1]:34587,127.0.0.1:33279,[::1]:39195,127.0.0.1:35345,[::1]:32915,127.0.0.1:35743,[::1]:32971,127.0.0.1:34223

BUILD SUCCESSFUL in 59m 49s
290 actionable tasks: 280 executed, 10 up-to-date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-compatibility bug Something isn't working Build Libraries & Interfaces good first issue Good for newcomers hacktoberfest Global event that encourages people to contribute to open-source. Priority-Low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants