store fails over valid yaml

Bug #1776304 reported by John Lenton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
Low
Daniel Manrique

Bug Description

I tried to push a snap with a valid snap.yaml (that snapd has no issues with),

https://pastebin.ubuntu.com/p/msD9tzpGmN/

but the store fails to read, or perhaps parse it (silently, see lp:1776302).

Revision history for this message
Bret Barker (noise) wrote :

See sentry issue #5276

Revision history for this message
John Lenton (chipaca) wrote :

Parsing that yaml with python-yaml as found in 14.04 I get that exact same error.
In 16.04 it works fine.

If I build python-yaml 3.11 from xenial in trusty, it works.

Bret Barker (noise)
Changed in snapstore:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
William Grant (wgrant) wrote :

Traceback (most recent call last):
  File "<stdin>", line 38, in <module>
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 93, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 69, in load
    loader = Loader(stream)
  File "/usr/lib/python2.7/dist-packages/yaml/loader.py", line 24, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 79, in __init__
    self.determine_encoding()
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 135, in determine_encoding
    self.update(1)
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x1d42e: special characters are not allowed
  in "<string>", position 133

Revision history for this message
William Grant (wgrant) wrote :

Fixed by upgrading dashboard.snapcraft.io from trusty to xenial.

Changed in snapstore:
status: Confirmed → Fix Released
Revision history for this message
Daniel Manrique (roadmr) wrote :

This has resurfaced. Pyyaml wasn't mentioned explicitly before, but was pinned to 3.13 in sca r5194; as for the dependencies branch, a python3 build of pyyaml from source was added in r29, and the python2 build of the same, way back in r22 (I presume r22, dating from 2018-08-14, is when this regressed, although date of the previous comment contradicts this). Prior to this, it's likely we were using the system wheel which is what would have made the Xenial upgrade fix things back in the day.

I checked and pyyaml 5.1, released on 2019-03-13, fixes this when installing from wheel, so perhaps we can kill this issue for good by upgrading to that.

Changed in snapstore:
status: Fix Released → Confirmed
Daniel Manrique (roadmr)
Changed in snapstore:
assignee: nobody → Daniel Manrique (roadmr)
Daniel Manrique (roadmr)
Changed in snapstore:
status: Confirmed → In Progress
Daniel Manrique (roadmr)
Changed in snapstore:
status: In Progress → Fix Released
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.