Current state of Snapcraft's upload-metadata

Topic to discuss on potential improvements to the user experience of upload-metadata

We create a snap with these simple contents

name: candycane
base: core18
version: '0.1'
summary: Single-line elevator pitch for your amazing snap
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: stable
confinement: strict

apps:
  candycane:
    command: candy

parts:
  candycane:
    source: .
    plugin: dump

We upload to the store

$ snapcraft upload candycane_0.1_amd64.snap
Preparing to upload 'candycane_0.1_amd64.snap'.
You are required to register this snap before continuing. Refer to 'snapcraft help register' for more options.
Would you like to register 'candycane' with the Snap Store? [y/N]: y
Pushing 'candycane_0.1_amd64.snap' [===========================================================] 100%
Processing...|                                                                                       
Ready to release!
Revision 1 of 'candycane' created.
$ snapcraft release candycane 1 edge
Track    Arch    Channel    Version    Revision
latest   amd64   stable     -          -
		 candidate  -          -
		 beta       -          -
		 edge       0.1        1
The 'edge' channel is now open.

Let’s see what the store processed

$ snap info candycane
name:      candycane
summary:   Single-line elevator pitch for your amazing snap
publisher: Sergio Schvezov (sergiusens)
store-url: https://snapcraft.io/candycane
license:   unset
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.
snap-id: U4E4kYV0S1sdTKbBlOhWSZbcoODZ9Dul
channels:
  latest/stable:    –                      
  latest/candidate: –                      
  latest/beta:      –                      
  latest/edge:      0.1 2020-05-13 (1) 4kB -

Let’s make this nicer (by only uploading metadata), first change the snapcraft.yaml to:

name: candycane
base: core18
version: '0.1'
summary: candy is no good
description: |
  Avoid me!

After building we upload-metadata:

$ snapcraft upload-metadata candycane_0.1_amd64.snap
Uploading metadata from 'candycane_0.1_amd64.snap'
The metadata has been uploaded

And check the results

snap info candycane
name:      candycane
summary:   candy is no good
publisher: Sergio Schvezov (sergiusens)
store-url: https://snapcraft.io/candycane
license:   unset
description: |
  Avoid me!
snap-id: U4E4kYV0S1sdTKbBlOhWSZbcoODZ9Dul
channels:
  latest/stable:    –                      
  latest/candidate: –                      
  latest/beta:      –                      
  latest/edge:      0.1 2020-05-13 (1) 4kB -

Let’s change something store side, so that

$ snap info candycane
name:      candycane
summary:   candy IS good
publisher: Sergio Schvezov (sergiusens)
store-url: https://snapcraft.io/candycane
license:   unset
description: |
  Eat me!
snap-id: U4E4kYV0S1sdTKbBlOhWSZbcoODZ9Dul
channels:
  latest/stable:    –                      
  latest/candidate: –                      
  latest/beta:      –                      
  latest/edge:      0.1 2020-05-13 (1) 4kB -

And try to upload the metadata from the snap again:

$ snapcraft upload-metadata candycane_0.1_amd64.snap
Uploading metadata from 'candycane_0.1_amd64.snap'
Metadata not uploaded!
Conflict in 'description' field:
    In snapcraft.yaml: 'Avoid me!\n'
    In the Store:      'Eat me!'
Conflict in 'summary' field:
    In snapcraft.yaml: 'candy is no good'
    In the Store:      'candy IS good'
You can repeat the upload-metadata command with --force to force the local values into the Store

We force as the Snap Store obviously has incorrect data:

$ snapcraft upload-metadata candycane_0.1_amd64.snap --force
Uploading metadata from 'candycane_0.1_amd64.snap'
The metadata has been uploaded

Binary data can also be uploaded, icon was tested but I found an issue on conflict resolution that needs solving (and root causing).