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 option for wheelhouse overrides #338
Conversation
To facilitate CI and testing of charms with new versions of Python dependencies, particularly those from base layers, you can now provide a wheelhouse.txt file via the `charm-build` CLI that will be applied after all others which can thus override any dependencies from lower layers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to see tests, but :LGTM: otherwise.
next_config, | ||
) | ||
if existing_tactic is not None: | ||
output_files['wheelhouse.txt'].combine(existing_tactic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we combine or just be an overwrite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, thinking about it combine makes more sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine merges the files. In fact, we end up with both versions of the files in the wheelhouse, which is also something that can happen with multiple layers referencing the same dep. It would be great to be able to resolve that up front, but that would require reimplementing much of pip's dependency resolution, so I'm disinclined to even try. It does generally do the right thing at the end, but it may be something we need to address eventually.
@marcoceppi I can look at adding / extending tests tomorrow. |
Thanks @johnsca, looks great! Should be in edge shortly. |
To facilitate CI and testing of charms with new versions of Python dependencies, particularly those from base layers, you can now provide a wheelhouse.txt file via the
charm-build
CLI that will be appliedafter all others which can thus override any dependencies from lower layers.