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

[upload charm] Upload fails for "already_exists" #52

Closed
sed-i opened this issue Jul 21, 2022 · 3 comments
Closed

[upload charm] Upload fails for "already_exists" #52

sed-i opened this issue Jul 21, 2022 · 3 comments
Labels

Comments

@sed-i
Copy link
Contributor

sed-i commented Jul 21, 2022

Bug Description

Errors on upload-charm:

Error: Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}
Error: HttpError: Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}

To Reproduce

Rerun this job:
https://github.com/canonical/alertmanager-k8s-operator/runs/7455137256?check_suite_focus=true

Environment

GH runner.

Relevant log output

Run canonical/charming-actions/upload-charm@1.0.0
/usr/bin/sudo snap install charmcraft --classic --channel latest/edge
charmcraft (edge) 2.0.0+6.g7563ce5 from Canonical** installed
/snap/bin/charmcraft pack --destructive-mode --quiet
/usr/bin/docker pull ubuntu/prometheus-alertmanager:0.23-22.04_beta
0.23-22.04_beta: Pulling from ubuntu/prometheus-alertmanager
bdc5a07a7dd2: Pulling fs layer
aa9fa10e633d: Pulling fs layer
e5dd500af9cc: Pulling fs layer
676141a7b9c0: Pulling fs layer
3c2910da3d19: Pulling fs layer
5fdd3cbd15aa: Pulling fs layer
78b2bc159136: Pulling fs layer
3c2910da3d19: Waiting
5fdd3cbd15aa: Waiting
78b2bc159136: Waiting
676141a7b9c0: Waiting
e5dd500af9cc: Verifying Checksum
e5dd500af9cc: Download complete
bdc5a07a7dd2: Verifying Checksum
bdc5a07a7dd2: Download complete
3c2910da3d19: Verifying Checksum
3c2910da3d19: Download complete
676141a7b9c0: Verifying Checksum
676141a7b9c0: Download complete
78b2bc159136: Verifying Checksum
78b2bc159136: Download complete
5fdd3cbd15aa: Verifying Checksum
5fdd3cbd15aa: Download complete
aa9fa10e633d: Verifying Checksum
aa9fa10e633d: Download complete
bdc5a07a7dd2: Pull complete
aa9fa10e633d: Pull complete
e5dd500af9cc: Pull complete
676141a7b9c0: Pull complete
3c2910da3d19: Pull complete
5fdd3cbd15aa: Pull complete
78b2bc159136: Pull complete
Digest: sha256:8f30b70d39053bf979ba646c1444287d71f7ece2342dea518106a6077197cd15
Status: Downloaded newer image for ubuntu/prometheus-alertmanager:0.23-22.04_beta
docker.io/ubuntu/prometheus-alertmanager:0.23-22.04_beta
/snap/bin/charmcraft upload-resource --quiet alertmanager-k8s alertmanager-image --image ubuntu/prometheus-alertmanager:0.23-22.04_beta
/snap/bin/charmcraft resource-revisions alertmanager-k8s alertmanager-image
Revision    Created at              Size
15          2022-07-21T18:08:50Z    515B
14          2022-07-20T15:27:02Z    515B
13          2022-07-15T11:48:59Z    515B
12          2022-07-06T15:54:06Z    515B
11          2022-07-05T23:27:14Z    515B
10          2022-07-03T20:54:42Z    515B
9           2022-06-30T09:06:59Z    515B
8           2022-06-28T03:41:22Z    515B
7           2022-05-30T21:35:04Z    515B
6           2022-04-28T20:38:02Z    515B
5           2022-03-24T14:04:40Z    515B
4           2022-03-22T15:37:00Z    515B
3           2022-03-17T20:09:33Z    515B
2           2022-03-16T21:47:46Z    515B
1           2021-07-21T18:28:17Z    515B
/snap/bin/charmcraft upload --quiet --release latest/edge /home/runner/work/alertmanager-k8s-operator/alertmanager-k8s-operator/alertmanager-k8s_ubuntu-20.04-amd64.charm --resource=alertmanager-image:15
Error: Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}
Error: HttpError: Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}
    at /home/runner/work/_actions/canonical/charming-actions/1.0.0/dist/upload-charm/index.js:7440:21
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Total size of all the files uploaded is 9165 bytes
Finished uploading artifact charmcraft-logs. Reported size is 9165 bytes. There were 0 items that failed to upload
Artifact upload result: {"artifactName":"charmcraft-logs","artifactItems":["/home/runner/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220721-175635.208482.log","/home/runner/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220721-180804.853589.log","/home/runner/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220721-180853.491465.log","/home/runner/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220721-180855.218908.log"],"size":9165,"failedItems":[]}

Additional context

No response

@sed-i sed-i added Status: Triage Type: Bug Something isn't working labels Jul 21, 2022
@simskij
Copy link
Member

simskij commented Aug 8, 2022

Asked the Charmhub team (cc @Roadmaster) for a clarification of what conditions triggers this, as it's something we've started seeing recently. And just to add; I've seen this myself, both locally and in CI, so there definitely is something going on here.

@simskij
Copy link
Member

simskij commented Sep 7, 2022

This is not an issue anymore in 2.0.0

@simskij simskij closed this as completed Sep 7, 2022
@alnvdl-work
Copy link

alnvdl-work commented Apr 19, 2024

For anyone stumbling into this in the future: this error message can appear if you are releasing more than one charm in the same repo.

The solution to avoid this error is to use different tag-prefixes for different charms, as documented here: https://github.com/canonical/charming-actions/tree/main/release-charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants