canonical / snapcraft-rocks

Sources for Snapcraft as OCI images, maintained by the Starcraft team
GNU General Public License v3.0
4 stars 2 forks source link

Run YAML validity/schema linters before `snapcraft` #58

Open abitrolly opened 4 days ago

abitrolly commented 4 days ago

To avoid strange errors, because of typos and general inability to remember documentation, it would be nice to run YAML structure linters before snapcraft.

Docs mention that snapcraft runs embedded linters https://snapcraft.io/docs/linters but they don't catch some low level errors like absent base: key (https://github.com/canonical/snapcraft-rocks/issues/57#issuecomment-2370937598).

EDIT: And troubleshooting such silly mistakes can steal a lot of time.

abitrolly commented 4 days ago

This issue in #57 was caused by older version of snapcraft producing parts/hello-part/state/pull that newer version could not load.

The best architecture is to have a mechanism to version build environment and migrate it.

tigarmo commented 2 days ago

There are two issues here:

1) The lack of base is, and should be, handled by Snapcraft itself. The problem is the default run of the image doesn't show Snapcraft's output easily, which is the more pressing issue I think. 2) That second one is also a bug in Snapcraft, or craft-parts. I don't think it's a bug here.

abitrolly commented 2 days ago

@tigarmo I've got an issue fatigue today. Maybe mods on the payroll can move or reticket it to the relevant repos?