canonical / charmcraft

Collaborate, build and publish charmed operators for Kubernetes, Linux and Windows.
Apache License 2.0
66 stars 71 forks source link

charmcraft revisions <bundle> fails with "Name juju-qa-bundle-test not found in the charm namespace" #851

Open hmlanigan opened 2 years ago

hmlanigan commented 2 years ago

$ charmcraft revisions juju-qa-bundle-test Store operation failed:

However I'm working on a bundle

$ cat charmcraft.yaml type: bundle parts: bundle: prime: ["bundle.yaml", "README.md"] charmhub: api-url: https://api.charmhub.io storage-url: https://storage.snapcraftcontent.com

Remembered about the cache, tried to clean:

$ charmcraft clean Cannot read the metadata.yaml file: FileNotFoundError(2, 'No such file or directory') Full execution log: 'charmcraft-20220830-190538.160272.log'

Switched to a charm directory and was able to successfully run charmcraft clean. Switched back to the bundle directory then:

$ charmcraft revisions juju-qa-bundle-test Revision Version Created at Status 2 2 2021-03-26T19:22:11Z released 1 1 2021-03-22T17:57:22Z approved

facundobatista commented 2 years ago

Hello! Thanks for the report!

Two details in the process:

So, let's focus on the real problem: why it first failed and then worked ok?

Some questions:

Thanks!

hmlanigan commented 2 years ago

This bundle is owned by a group, of which I am a member.

Not much time passed between the failed and successful charmcraft revisions calls. About how long it took me to run the command again.

No, I did nothing with authentication the entire time.

facundobatista commented 2 years ago

The only thing that occurs to me that can explain Charmhub returning a "not found" error first and succeeding later is that or they changed/fixed something regarding the collaborators list, or that it was just a glitch of the service (downtime of one of the parts, etc.).

We could try to to expose another glitch in the servers if you put a loop into charmcraft revisions juju-qa-bundle-test, say execute it a thousand times, see if we have any failure.

But regarding charmcraft there's nothing to do... I'd close this issue, with your ok. Thanks!

jameinel commented 2 years ago

In my case, it wasn't a team bundle, but a personal one.

charmcraft revisions jam-snappass-bundle2 was returning the same: resource-not-found: Name jam-snappass-bundle2 not found in the charm namespace Full execution log...

And then I ran charmcraft clean in my ubuntu-lite directory. (A charm directory, unrelated to the bundle.) And then it started working.

Maybe it is a case of old information from a different version of charmcraft?

John =:->

On Wed, Aug 31, 2022 at 4:15 PM Facundo Batista @.***> wrote:

The only thing that occurs to me that can explain Charmhub returning a "not found" error first and succeeding later is that or they changed/fixed something regarding the collaborators list, or that it was just a glitch of the service (downtime of one of the parts, etc.).

We could try to to expose another glitch in the servers if you put a loop into charmcraft revisions juju-qa-bundle-test, say execute it a thousand times, see if we have any failure.

But regarding charmcraft there's nothing to do... I'd close this issue, with your ok. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/canonical/charmcraft/issues/851#issuecomment-1233376791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABRQ7KDFYIJ376NKNCBZNLV364MJANCNFSM6AAAAAAQAWE45Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

facundobatista commented 2 years ago

I don't think so.

When you issue charmcraft revisions mypackage, Charmcraft does not interact with any project or directory or local file, just builds the URL of a query to Charmhub, and then present the response (successful or an error).

Probably the best we can do is for you to ping me at the moment when/if this happen again, and try to trace it to the servers...

lengau commented 9 months ago

Does this have to do with the charmhub configuration in various charmcraft.yaml files? Changing directories and maybe talking to different stores? Would it help if we included which store endpoint Charmcraft is talking to in the error output?