-
Notifications
You must be signed in to change notification settings - Fork 867
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
Start using Gradle Enterprise instance #4663
Conversation
settings.gradle.kts
Outdated
@@ -28,13 +29,13 @@ dependencyResolutionManagement { | |||
val isCI = System.getenv("CI") != null | |||
val skipBuildscan = System.getenv("SKIP_BUILDSCAN").toBoolean() | |||
gradleEnterprise { | |||
server = "https://ge.opentelemetry.io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously scan was published only when building from ci but this check is now removed. Does this mean that scan is uploaded even for local builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is Gradle's suggestion, yes. The goal is to better understand builds (especially build failures) on local machines. If we are concerned about privacy we may change that to publish scans only on failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's too surprising if OSS builds phone home without an opt-in. Eventually someone will notice and complain hard :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will change to publish only on CI or if opted in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
(+1 to @laurit's question above)
settings.gradle.kts
Outdated
id("com.github.burrunan.s3-build-cache") version "1.2" | ||
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.2.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A tag representing the operating system
A tag representing how the build was invoked, be that from your IDE (IDEA, Eclipse, Android Studio) or from the command-line
A tag representing builds run on CI, together with a set of tags, links and custom values specific to the CI server running the build
For Git repositories, information on the commit id, branch name, status, and whether the checkout is dirty or not
I'm not sure what "tag representing OS" means here, but it seems a bit scary for an OSS project, naturally we will be publishing scans from local corp laptops sometimes to troubleshoot builds. This plugin smells like it's intended for corporate, not OSS use.
Can we leave it out for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but I will also ask Gradle people to comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuraaga As publish from local machine now require opt-in, do you still want to remove this plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably OK (I'm guessing OS tag is just "mac" type of string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will add Mac OS X
to your builds (amongst other tags). it is very useful to debug issues to know if a build came from Mac or windows for example because line endings or encoding may cause issues.
Here is an example of what that tagging looks like on the JUnit Gradle Enterprise OSS instance: https://ge.junit.org/s/katto6gtipkwe#info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.2.1" | |
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.5" |
settings.gradle.kts
Outdated
id("com.github.burrunan.s3-build-cache") version "1.2" | ||
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.2.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably OK (I'm guessing OS tag is just "mac" type of string)
settings.gradle.kts
Outdated
buildScan { | ||
termsOfServiceUrl = "https://gradle.com/terms-of-service" | ||
termsOfServiceAgree = "yes" | ||
publishAlwaysIf(isCI || publishBuildscan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publishAlwaysIf(isCI || publishBuildscan) | |
publishAlways() | |
publishIfAuthenticated() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@runningcode Do we need both always
and ifAuthenticated
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, its undocumented but this is the recommended set up for OSS projects.
@iNikem is this expected prior to merging this PR?
|
Unfortunately. As our GE instance is public, it is recommended (by Gradle folks and, probably, common sense) to allow only authenticated users to publish build scans. This means only builds initiated by our repo (and not PRs from forks, because GH secrets are not passed to them) and maintainers who wish to configure authentication for their local machines. This limits the benefits of GE, but we don't know a way around that. We could continue to publish build scan for all other builds to |
got it. I think that's ok since all of the non-PR builds will still give us plenty of builds to track flaky tests across. and we'll still get the gradle cache benefits for PRs and local builds.
this is a good question. we currently recommend reviewing the gradle scan for troubleshooting PR build failures: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CONTRIBUTING.md#troubleshooting-pr-build-failures for this PR, can you keep publishing PR build scans to |
Current state:
|
Oh I didn't know this would only work with explicit opt-in via adding credentials. In that case we can have the scan published automatically if you'd like, it's not implicit phone home like I thought before. |
My initial version was "publish always" :) But turned out, it could not work :) So yes, only if authenticated. |
* Start using Gradle Enterprise instance * Require opt-in to publish build scan from local machine * Publish build scan only if authenticated * Switch to GE cache
No description provided.