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

Fix flaky nodejs dependency #2927

Merged
merged 1 commit into from
Mar 20, 2023
Merged

Fix flaky nodejs dependency #2927

merged 1 commit into from
Mar 20, 2023

Conversation

IgnatBeresnev
Copy link
Member

@IgnatBeresnev IgnatBeresnev commented Mar 16, 2023

Both unit and integration tests became extremely flaky because they are unable to find the node dependency, even though it can be downloaded manually.

org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.nodejs:node:16.13.0.
Searched in the following locations:
  - https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.gz
Required by:
    project :plugins:base:frontend

download.set(true)
distBaseUrl.set(null as String?) // Strange cast to avoid overload ambiguity
Copy link
Member Author

Choose a reason for hiding this comment

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

Documentation says to set that param to null if download is set to true and if the project is using centralized repositories (like we are), but I'm not sure why exactly.

https://github.com/node-gradle/gradle-node-plugin/blob/3.5.1/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration

Also not sure it helps, but the tests in this PR passed the first time around, while they failed consistently in another branch - might be luck though

Copy link
Contributor

Choose a reason for hiding this comment

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

there was a Node.js issue yesterday that should be resolved now

https://status.nodejs.org/

image

nodejs/nodejs.org#5149

But yes, setting distBaseUrl to null is a good idea 👍 Gradle Plugins shouldn't have the ability to randomly add repos... but that's another topic.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, that's what it was...

A number of other builds at JetBrains were suffering from that, so the dependency has been cached. Good thing you extracted the repository - it was quite easy to change it to cache-reditor 👍

@IgnatBeresnev IgnatBeresnev marked this pull request as ready for review March 16, 2023 22:01
@IgnatBeresnev IgnatBeresnev merged commit e66f9d8 into master Mar 20, 2023
@IgnatBeresnev IgnatBeresnev deleted the fix-node-plugin branch March 20, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants