Comments (6)
Great catch @nsklikas ! This has bitten us as well and we were really wondering why this happened. This happened when we updated the charm's resource to a previously used resource (in order to work around a juju bug temporarily) and while the publish succeeded, silently it kept using the previous image, since, as you highlight, this was the latest resource version ( the CI run)
from charming-actions.
It looks like this is more a charmcraft behaviour rather than the action's
Why? AFAICT charhmcraft provides you with all the info you need to do this properly.
The charmhub behavior changed some time in the past. It used to be that whenever you uploaded an image it would get a new revision, regardless if it was already uploaded. At the time the charmhub team refused to fix it, claiming it that this was the intended behavior. Now it looks like they have changed without any warning (?).
But this is the action's problem, I tried to explain it in the description. If you try to upload the same image multiple times, you will always get the same revision
The action must parse parse the charmcraft output and use the revision number that is in the command's output, rather that always using the latest revision.
Am I missing something?
from charming-actions.
fwiw, data-platform-workflows release_charm.yaml does not seem to be affected
here's how it works, perhaps a similar approach would help here: https://github.com/canonical/data-platform-workflows/blob/58f047f7eebbde23770e7058d3f62f88ce7fe0dd/python/cli/data_platform_workflows_cli/craft_tools/release.py#L182
(or, if there's interest in moving the charm/snap/rock workflows in data-platform-workflows into a shared repo—again, happy to help with that)
from charming-actions.
looking at our release history, this change appears to have happened on charmcraft/charmhub between 2023-10-28 and 2023-11-01
incrementing every release in 2023-10:
https://github.com/canonical/postgresql-k8s-operator/releases/tag/rev159
https://github.com/canonical/postgresql-k8s-operator/releases/tag/rev160
https://github.com/canonical/postgresql-k8s-operator/releases/tag/rev161
2023-11-01 release doesn't increment:
https://github.com/canonical/postgresql-k8s-operator/releases/tag/rev165
from charming-actions.
and downloading charm rev 165 and 161 & inspecting manifest.yaml shows
# ubuntu@j34-1:~$ cat 165/manifest.yaml
analysis:
attributes:
- name: language
result: python
- name: framework
result: operator
bases:
- architectures:
- amd64
channel: '22.04'
name: ubuntu
charmcraft-started-at: '2023-10-31T22:37:44.128831Z'
charmcraft-version: 2.4.1
# ubuntu@j34-1:~$ cat 161/manifest.yaml
analysis:
attributes:
- name: language
result: python
- name: framework
result: operator
bases:
- architectures:
- amd64
channel: '22.04'
name: ubuntu
charmcraft-started-at: '2023-10-28T13:59:41.367818Z'
charmcraft-version: 2.4.1
so change was probably on charmhub, not charmcraft
from charming-actions.
It looks like this is more a charmcraft
behaviour rather than the action's. If you manually try to create a new revision of the resource that was already uploaded, charmcraft will just not allow it.
EDIT: I meant to say charmhub, it won't allow to upload a resource that was already uploaded, so there will not be a new revision of it.
from charming-actions.
Related Issues (20)
- Enable build charm(s) with cache and reusable charm files to speed up CI runs HOT 3
- Create a new tag for actions with node16 HOT 1
- release-libraries does not work on major version bump HOT 1
- [upload-charm] Add input for specifying retry strategy
- [upload-charm] Upload multiple charms
- Upload-charm action fails to upload logs when packing in destructive mode
- Support charmcraft shared caching HOT 1
- Make `channel` support workflow_dispatch
- Dependency Dashboard
- If destructive-mode is disabled, we need to run `lxd init --auto` HOT 1
- `upload-charm` action in 2.6.2 fails to create a release HOT 2
- The channel action does not accept manual workflow triggers
- [check-libraries] "Libraries: Out of sync" is not changed to "Libraries: OK" when PR received libs update HOT 1
- [upload-charm] Upload all series/bases of the charm HOT 1
- [release-libraries] silently keeps library non-published if LIBPATCH is too high (it needs to be consecutive)
- allow publish charm on feature branches HOT 2
- [check-libraries] Detect library changes on PR without LIBPATCH bump HOT 1
- Library publishing workflow doesn't like LIBAPI changes
- New Action for uploading file resources
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from charming-actions.