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

Cache Charm Builds #78

Merged
merged 4 commits into from
Apr 25, 2024
Merged

Cache Charm Builds #78

merged 4 commits into from
Apr 25, 2024

Conversation

mateoflorido
Copy link
Member

@mateoflorido mateoflorido commented Apr 23, 2024

Overview

This pull request introduces a caching mechanism for charms. If there are no changes in the source of the charm or its dependencies, the workflow restores the cached charms. This reduces integration test times by around 80%. This is particularly useful when tweaking the testing suite or other files that are not dependent on the charm sources.

@mateoflorido mateoflorido force-pushed the KU-684/caching-charms branch 4 times, most recently from 6da3007 to 997e66e Compare April 24, 2024 00:08
@mateoflorido mateoflorido force-pushed the KU-684/caching-charms branch from 997e66e to c6bd307 Compare April 24, 2024 00:11
Copy link
Contributor

github-actions bot commented Apr 24, 2024

Everyone contributing to this PR have now signed the CLA. Thanks!

@mateoflorido mateoflorido marked this pull request as ready for review April 24, 2024 15:56
@mateoflorido mateoflorido requested a review from a team as a code owner April 24, 2024 15:56
@addyess
Copy link
Contributor

addyess commented Apr 24, 2024

so, what happens if one of the deps in requirements.txt changes? The hash would still match right? How do we pick up new changes of python dependencies?

@mateoflorido mateoflorido force-pushed the KU-684/caching-charms branch from 3569059 to 7611260 Compare April 24, 2024 17:46
@mateoflorido
Copy link
Member Author

so, what happens if one of the deps in requirements.txt changes? The hash would still match right? How do we pick up new changes of python dependencies?

No, we are hashing the .py, .yaml and the requirements.txt files in the source folder. If we change any deps in the requirements file, the hash won't match and the charms will be rebuilt.

@mateoflorido mateoflorido force-pushed the KU-684/caching-charms branch from 4ebe88d to 3b7038a Compare April 24, 2024 19:13
Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

Hopefully dependabot will help out here updating these packages.
I dunno if it knows how to update the git+https packages

@mateoflorido mateoflorido changed the title [WIP] Cache Charm Builds Cache Charm Builds Apr 25, 2024
@mateoflorido mateoflorido merged commit d5ddc02 into main Apr 25, 2024
34 checks passed
@mateoflorido mateoflorido deleted the KU-684/caching-charms branch April 25, 2024 13:03
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