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

Allow passing instance of AwsCredentialsProvider to configuration #25

Merged
merged 2 commits into from
May 18, 2023

Conversation

joshfriend
Copy link
Contributor

This enables being more explicit about the provider chain to use in cases where the lookupDefaultAwsCredentials is not viable, or where you have a custom subclass of AwsCredentialsProvider you need to use.

This enables being more explicit about the provider chain to use in cases where the lookupDefaultAwsCredentials is not viable, or where you have a custom subclass of AwsCredentialsProvider you need to use
@vlsi
Copy link
Contributor

vlsi commented May 18, 2023

I am afraid passing non-trivial objects to the build cache configuration would break Gradle configuration cache (see cd5dc7f#diff-c071312d40ceebf75a3042495b63d3ef210a1dcfaf0d45d48e5053363105942aL48 ).

Could you please add a test (e.g. to

remote(com.github.burrunan.s3cache.AwsS3BuildCache) {
region = 'eu-west-1'
bucket = '$BUCKET_NAME'
prefix = 'build-cache/'
endpoint = 'localhost:${mockApp.port}'
// See https://github.com/adobe/S3Mock/issues/880
forcePathStyle = true
push = true
}
) to ensure the configuration you provide supports configuration cache?

@joshfriend
Copy link
Contributor Author

Added a very basic example to the test fixture. I think maybe just making the S3Client creation lazy in that previous commit was all that is really needed to be configuration cache compatible.

I tested some of my own builds with this and gradle reported no issues with it.

@vlsi
Copy link
Contributor

vlsi commented May 18, 2023

Great, thank you

@vlsi vlsi merged commit c837911 into burrunan:master May 18, 2023
@joshfriend joshfriend deleted the jfriend/credentials-provider branch May 18, 2023 17:31
@vlsi
Copy link
Contributor

vlsi commented May 18, 2023

Will release it shortly

@joshfriend
Copy link
Contributor Author

We've been using this with a custom AwsCredentialsProvider for a while now and it has been working well. I would like to move off of using our internally hosted fork though, can you please make a new release available?

@vlsi
Copy link
Contributor

vlsi commented Jul 10, 2023

Wow. I thought I released this. Let me check it again.

@vlsi
Copy link
Contributor

vlsi commented Jul 10, 2023

I've published 1.7 to Central and GPP. Sorry for the delay, and thanks for the reminder.

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.

2 participants