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

Add gradle access token to main build #5151

Merged
merged 3 commits into from
Sep 7, 2023

Conversation

jrhee17
Copy link
Contributor

@jrhee17 jrhee17 commented Aug 29, 2023

Motivation:

I'm seeing the following exception in our build:

https://github.com/line/armeria/actions/runs/6006711692/job/16291663362#step:9:809

Could not store entry fe26c95786e078f1daa3109effc3534a in remote build cache
java.lang.RuntimeException: Storing entry at 'https://ge.armeria.dev/cache/fe26c95786e078f1daa3109effc3534a' response status 403: Forbidden
	at com.gradle.enterprise.agent.b.a.b.a(SourceFile:125)
	at com.gradle.scan.plugin.internal.dep.org.apache.http.impl.cli

We should either:

  • Only enable build cache uploads from our post job
  • Allow build cache uploads for all builds in our CI. Note that if an access token is present, build scans will also be uploaded from our main CI. (and also uploaded from our postjob)
    • Pull requests don't have access to secrets, so added an empty check

I'm thinking there's no reason not to upload build caches from our main build as well since we can better populate our build cache with different flags/parameters, but let me know if anyone has a different opinion.

Modifications:

  • Added the GRADLE_ENTERPRISE_ACCESS_KEY environment variable
  • Push build cache only when GRADLE_ENTERPRISE_ACCESS_KEY is available

Result:

  • No more warning logs in our CI builds

@jrhee17 jrhee17 added this to the 1.26.0 milestone Aug 29, 2023
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.01% 🎉

Comparison is base (863e27c) 74.25% compared to head (e0a7f03) 74.26%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5151      +/-   ##
============================================
+ Coverage     74.25%   74.26%   +0.01%     
- Complexity    19825    19827       +2     
============================================
  Files          1699     1699              
  Lines         73046    73046              
  Branches       9357     9357              
============================================
+ Hits          54239    54250      +11     
+ Misses        14371    14368       -3     
+ Partials       4436     4428       -8     

see 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jrhee17 jrhee17 marked this pull request as ready for review August 29, 2023 06:14
@jrhee17 jrhee17 marked this pull request as draft August 29, 2023 06:14
@jrhee17 jrhee17 marked this pull request as ready for review August 29, 2023 06:29
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

👍 👍 👍

@jrhee17 jrhee17 merged commit b6e0659 into line:main Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants