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

Unable to generate API summary when access key is provisioned by Develocity plugin/extension #587

Open
clayburn opened this issue Apr 3, 2024 · 2 comments

Comments

@clayburn
Copy link
Member

clayburn commented Apr 3, 2024

The API summary currently only looks for API keys in enterprise/keys.properties. As of Develocity Gradle Plugin 3.17, keys are generated and stored in develocity/keys.properties: https://docs.gradle.com/enterprise/gradle-plugin/current/#automated_access_key_provisioning

This means that users who provision a key with Develocity Gradle Plugin 3.17+ will not be able to properly generate the summary at the end of the experiments.

I assume the same is true for Maven as well.

@bmuschko
Copy link

I am experiencing something related if you do not define the API token at all. In my case, the build scans can be published but the summary cannot be produced due to permission issues. I'd suggest adding an initial verification call to the Develocity server that sends the token to check if it is valid. Only then proceed with generating the first build scan.

@erichaagdev
Copy link
Member

For now we recommend you to use the older versions of the Gradle Enterprise Gradle plugin 3.16.2 and Gradle Enterprise Maven extension 1.20.1 to run the Build Validation Scripts.

You can use the latest versions of the Develocity Gradle plugin and Develocity Maven extension for all other use cases.

Note that if Publish build scans is not granted anonymously, then an access key granting the permission is required in at least one of the following places when using these older plugin/extension versions:

For Gradle:

  • enterprise/keys.properties in the Gradle user home directory
  • GRADLE_ENTERPRISE_ACCESS_KEY environment variable

For Maven:

  • .gradle-enterprise/keys.properties in the Maven user home directory
  • GRADLE_ENTERPRISE_ACCESS_KEY environment variable

If Access build data via the API is not granted anonymously and the Performance Characteristics section of the summary is desired, or in automation scenarios, then an access key granting the permission is required in at least one of any of the above mentioned locations.

In order to verify connectivity and that everything works as expected, you can run the following command:

For Gradle:

./01-validate-incremental-building.sh -t assemble -r https://github.com/gradle/gradle-build-scan-quickstart -e -s https://develocity.example.io

For Maven:

./01-validate-local-build-caching-same-location.sh -g compile -r https://github.com/gradle/maven-build-scan-quickstart -e -s https://develocity.example.io

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

No branches or pull requests

4 participants
@bmuschko @clayburn @erichaagdev and others