fix(upload-charm): Use resource revision from upload-resource command #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use resource revision number returned by upload-resource command when uploading a charm with resources. This replaces the previous behaviour when the action was listing resources and was using the latest available.
The issue below documents why we need this change and why this change works. In short, the root cause is that Charmhub changed its behavior at some point and running
charmcraft upload-resource
does not create a new resource revision, breaking essentially the action which previously rancharmcraft upload-resource
followed bycharmcraft resource-revisions
and was attaching the latest available to the charm.Here's an example run using the action from the PR's branch.
Closes #139
Ref canonical/bundle-kubeflow#962
Note that this PR does not touch the action's behavior where
upload-image
is set toFalse
, given that this is a different use-case and its behavior wasn't altered by the aforementioned Charmhub change (it was just using thelatest
resource revision number available without uploading anything). We contacted however the people using it (operator-workflows repo ) to give them a heads up of the change.