ValueError: No revision information for 1

Bug #1904212 reported by Alan Pope 🍺🐧🐱 πŸ¦„
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snap Store Server
Triaged
Medium
Unassigned
Snapcraft
Triaged
Undecided
Unassigned

Bug Description

Registered a name, got that approved by store team (3 letters long) and then tried to push all architectures in a loop. First one "failed" (but actually succeeded).

$ for f in dog_v0.1.0_*.snap; do snapcraft push $f --release=candidate; done
DEPRECATED: The 'push' set of commands have been replaced with 'upload'.
See http://snapcraft.io/docs/deprecation-notices/dn11 for more information.
Preparing to upload 'dog_v0.1.0_amd64.snap'.
After uploading, the resulting snap revision will be released to 'candidate' when it passes the Snap Store review.
Install the review-tools from the Snap Store for enhanced checks before uploading this snap.
Pushing 'dog_v0.1.0_amd64.snap' [=================================================================================================================================================================================================] 100%
Processing...|
Ready to release!
Revision 1 of 'dog' created.
Sorry, an error occurred in Snapcraft:
No revision information for 1
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: v
Traceback (most recent call last):
  File "/snap/snapcraft/5737/bin/snapcraft", line 33, in <module>
    sys.exit(load_entry_point('snapcraft==4.4.1', 'console_scripts', 'snapcraft')())
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/snapcraft/cli/store.py", line 198, in upload
    snap_revision
  File "/snap/snapcraft/5737/lib/python3.6/site-packages/snapcraft/storeapi/v2/channel_map.py", line 332, in get_revision
    raise ValueError(f"No revision information for {revision_number!r}")
ValueError: No revision information for 1
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: y
Thank you, sent.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Does "snapcraft status dog" work?

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

alan@robot:~/Source/popey/dog$ snapcraft status dog
Track Arch Channel Version Revision
latest amd64 stable - -
                  candidate v0.1.0 1
                  beta ↑ ↑
                  edge ↑ ↑
         arm64 stable - -
                  candidate v0.1.0 2
                  beta ↑ ↑
                  edge ↑ ↑
         armhf stable - -
                  candidate v0.1.0 3
                  beta ↑ ↑
                  edge ↑ ↑
         i386 stable - -
                  candidate v0.1.0 4
                  beta ↑ ↑
                  edge ↑ ↑
         ppc64el stable - -
                  candidate v0.1.0 5
                  beta ↑ ↑
                  edge ↑ ↑
         s390x stable - -
                  candidate v0.1.0 6
                  beta ↑ ↑
                  edge ↑ ↑

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

It seems that the map is potentially not complete when releasing the first revision, calling "status" results in the same code path (a call the the channel-map endpoint) and works after some time. I perceive that there might be a race in the store. We will need to work around this issue with some warnings on snapcraft's side.

Changed in snapcraft:
status: Incomplete → Triaged
Changed in snapstore-server:
assignee: nobody → Natalia Bidart (nataliabidart)
status: New → Triaged
Bret Barker (noise)
Changed in snapstore-server:
importance: Undecided → Medium
Revision history for this message
jcat (jcat) wrote :

Hi,

We also got the same error back from the store when publishing a snap, not revision 1 but 25 in this case. It's a Brand Store. Here is our output from CI:

$ snapcraft upload .dist/*.snap --release edge
Preparing to upload 'osp-test-pc_20.4.26_amd64.snap'.
After uploading, the resulting snap revision will be released to 'edge' when it passes the Snap Store review.
Install the review-tools from the Snap Store for enhanced checks before uploading this snap.
Pushing 'osp-test-pc_20.4.26_amd64.snap' [===============================] 100%
Ready to release!
Revision 25 of 'osp-test-pc' created.
Processing...|
Sorry, an error occurred in Snapcraft:
No revision information for 25
Traceback (most recent call last):
  File "/snap/snapcraft/current/bin/snapcraft", line 33, in <module>
    sys.exit(load_entry_point('snapcraft==4.3', 'console_scripts', 'snapcraft')())
  File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/cli/store.py", line 198, in upload
    snap_revision
  File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/storeapi/v2/channel_map.py", line 317, in get_revision
    raise ValueError(f"No revision information for {revision_number!r}")
ValueError: No revision information for 25
You can find the traceback in file '/tmp/tmpsq5sctfq/trace.txt'.

A working job, which include other sundry set-up, took 33 seconds, whereas this job took 52. Perhaps there is something timing out on the store side ?

When we checked, the revision had been published.

A subsequent push creating a new revision was also fine.

Cheers,
Just

Revision history for this message
Tim Howard (everactivetim) wrote :

We are seeing this issue currently on snapcraft 5.0.

Revision history for this message
Igor Ljubuncic (igorljubuncic-deactivatedaccount) wrote :

The error can be reproduced reliably as follows:

Build any snap with grade:devel.

snapcraft login
snapcraft upload --release=candidate "snap name"

Wait for the error.

...
No revision information for XX
...

Changed in snapstore-server:
assignee: Natalia Bidart (nataliabidart) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.