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 feature to set artifact retention period #903

Closed
DuncanCasteleyn opened this issue Sep 28, 2023 · 6 comments
Closed

Add feature to set artifact retention period #903

DuncanCasteleyn opened this issue Sep 28, 2023 · 6 comments
Milestone

Comments

@DuncanCasteleyn
Copy link

DuncanCasteleyn commented Sep 28, 2023

Currently it does not seem possible to to set the artifact retention period on artifacts produced by this action, it would save storage cost if an option were added to set the retention period for artifacts produced by this action.

I'm referring specifically to a feature that is available in the official upload artifact action.

@bigdaz
Copy link
Member

bigdaz commented Oct 13, 2023

Thanks for the report, and for the PR. In general it would be nice to avoid adding another configuration option for this.

I think the ideal behaviour would be to remove the dependency graph artifact once it has been successfully uploaded to the Dependency Submission API. This would avoid the need for a user to configure anything and avoid storing the artifact unnecessarily.
We could also set the default retention much lower (1 day). I'm not sure there's a use case where users would want to generate-and-preserve the dependency graph JSON, but there's nothing stopping them from saving the files separately in that case.

@DuncanCasteleyn
Copy link
Author

Thanks for the report, and for the PR. In general it would be nice to avoid adding another configuration option for this.

I think the ideal behaviour would be to remove the dependency graph artifact once it has been successfully uploaded to the Dependency Submission API. This would avoid the need for a user to configure anything and avoid storing the artifact unnecessarily. We could also set the default retention much lower (1 day). I'm not sure there's a use case where users would want to generate-and-preserve the dependency graph JSON, but there's nothing stopping them from saving the files separately in that case.

Then I will set it permanently to 1

@DuncanCasteleyn DuncanCasteleyn changed the title Add feature to set artifact retention period Set artifact retention period to 1 day Oct 16, 2023
@DuncanCasteleyn
Copy link
Author

Hi @bigdaz

Could you take a look at the PR and merge it if all good, we would like to use this, but also keep using the official action.

@bigdaz
Copy link
Member

bigdaz commented Nov 9, 2023

@DuncanCasteleyn After spending a bit of time looking at this, I wasn't comfortable simply defaulting to 1 day (even though that was my initial suggestion 🤦🏼 ).

I've pushed #953 which makes this configurable as you originally asked. I'll put out a v2.10.0 release with this functionality soon.

@bigdaz
Copy link
Member

bigdaz commented Nov 9, 2023

Pending a release, you can use the action with the latest changes. Use either gradle/gradle-build-action@main or gradle/gradle-build-action@9bca466e2722baf9e77b4f929bbe0af18848791f.

@DuncanCasteleyn
Copy link
Author

Thanks, this will save us some trouble and cost in the future.

@DuncanCasteleyn DuncanCasteleyn changed the title Set artifact retention period to 1 day Add feature to set artifact retention period Nov 9, 2023
@bigdaz bigdaz added this to the 2.10.0 milestone Nov 27, 2023
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 a pull request may close this issue.

2 participants