Git Product home page Git Product logo

Comments (6)

orfeas-k avatar orfeas-k commented on September 27, 2024 1

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.

nsklikas avatar nsklikas commented on September 27, 2024 1

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
image

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.

carlcsaposs-canonical avatar carlcsaposs-canonical commented on September 27, 2024 1

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.

carlcsaposs-canonical avatar carlcsaposs-canonical commented on September 27, 2024 1

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.

carlcsaposs-canonical avatar carlcsaposs-canonical commented on September 27, 2024 1

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.

DnPlas avatar DnPlas commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.