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

fix(upload-charm): Use resource revision from upload-resource command #147

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

orfeas-k
Copy link
Contributor

@orfeas-k orfeas-k commented Jul 10, 2024

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 ran charmcraft upload-resource followed by charmcraft 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 to False, given that this is a different use-case and its behavior wasn't altered by the aforementioned Charmhub change (it was just using the latest 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.

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.
@orfeas-k orfeas-k merged commit 46fe0c6 into main Jul 10, 2024
3 checks passed
@orfeas-k orfeas-k deleted the orfeas-k/kf-5952-fix-upload-charm-resource-revision branch July 10, 2024 10:13
taurus-forever referenced this pull request in canonical/mysql-router-k8s-operator Sep 17, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[canonical/charming-actions](https://redirect.github.com/canonical/charming-actions)
| action | patch | `2.6.0` -> `2.6.3` |

---

### Release Notes

<details>
<summary>canonical/charming-actions
(canonical/charming-actions)</summary>

###
[`v2.6.3`](https://redirect.github.com/canonical/charming-actions/releases/tag/2.6.3)

[Compare
Source](https://redirect.github.com/canonical/charming-actions/compare/2.6.2...2.6.3)

#### What's Changed

- fix(upload-bundle): Implement the same functionality without using
`juju-bundle` by
[@&#8203;mvlassis](https://redirect.github.com/mvlassis) in
[https://github.com/canonical/charming-actions/pull/151](https://redirect.github.com/canonical/charming-actions/pull/151)

#### New Contributors

- [@&#8203;mvlassis](https://redirect.github.com/mvlassis) made their
first contribution in
[https://github.com/canonical/charming-actions/pull/151](https://redirect.github.com/canonical/charming-actions/pull/151)

**Full Changelog**:
canonical/charming-actions@2.6.2...2.6.3

###
[`v2.6.2`](https://redirect.github.com/canonical/charming-actions/releases/tag/2.6.2)

[Compare
Source](https://redirect.github.com/canonical/charming-actions/compare/2.6.1...2.6.2)

#### What's Changed

- fix(upload-charm): Use resource revision from upload-resource command
by [@&#8203;orfeas-k](https://redirect.github.com/orfeas-k) in
[https://github.com/canonical/charming-actions/pull/147](https://redirect.github.com/canonical/charming-actions/pull/147)

#### New Contributors

- [@&#8203;orfeas-k](https://redirect.github.com/orfeas-k) made their
first contribution in
[https://github.com/canonical/charming-actions/pull/147](https://redirect.github.com/canonical/charming-actions/pull/147)

**Full Changelog**:
canonical/charming-actions@2.6.1...2.6.2

###
[`v2.6.1`](https://redirect.github.com/canonical/charming-actions/releases/tag/2.6.1)

[Compare
Source](https://redirect.github.com/canonical/charming-actions/compare/2.6.0...2.6.1)

#### What's Changed

- Support charms using charmcraft extensions by
[@&#8203;weiiwang01](https://redirect.github.com/weiiwang01) in
[https://github.com/canonical/charming-actions/pull/142](https://redirect.github.com/canonical/charming-actions/pull/142)

#### New Contributors

- [@&#8203;weiiwang01](https://redirect.github.com/weiiwang01) made
their first contribution in
[https://github.com/canonical/charming-actions/pull/142](https://redirect.github.com/canonical/charming-actions/pull/142)

**Full Changelog**:
canonical/charming-actions@2.6.0...2.6.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 1am and before 3am every
weekday" in timezone Etc/UTC, Automerge - At any time (no schedule
defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/canonical/mysql-router-k8s-operator).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM4LjU5LjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

[upload-charm] always uses the latest revision of the resource
2 participants