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

snapcraft has more strict linting unexpectedly #5017

Closed
dilyn-corner opened this issue Sep 5, 2024 · 7 comments
Closed

snapcraft has more strict linting unexpectedly #5017

dilyn-corner opened this issue Sep 5, 2024 · 7 comments
Labels
bug Actual bad behavior that don't fall into maintenance or documentation triaged

Comments

@dilyn-corner
Copy link

Bug Description

When building a snap using at least revision 12523 to build snaps which built successfully with revisions like 12503 (latest/edge versus 8.x/edge), snapcraft will now emit some error messages.

To Reproduce

Install snapcraft from latest/edge, build the snap with snapcraft.

Environment

Ubuntu 23.10, building with snapcraft --use-lxd.

snapcraft.yaml

name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core24 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
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: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil

apps:
  my-app:
    command: bash
    environment:
      foo: 1

Relevant log output

dilyn@Ares:~/test -> snapcraft 
Starting snapcraft, version 8.3.2.post71+git3508cf39
Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20240905-191836.634265.log'
Bad snapcraft.yaml content:
- input should be a valid string (in field 'apps.my-app.environment.foo')

Additional context

Quoting 1 results in successful builds (sans an error message unrelated to this issue).

@lengau
Copy link
Contributor

lengau commented Sep 6, 2024

I think this has roughly the same cause as #4978

@dilyn-corner
Copy link
Author

Makes sense -- all the revisions I have where this is working are before the pydantic 2 shift.

We can close as duplicate.

@mr-cal
Copy link
Collaborator

mr-cal commented Sep 6, 2024

Let's leave this open. Even if the fixes are entirely upstream, we should use this issue to add regression tests in snapcraft.

@mr-cal mr-cal added bug Actual bad behavior that don't fall into maintenance or documentation triaged labels Sep 6, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3329.

This message was autogenerated

@mr-cal
Copy link
Collaborator

mr-cal commented Sep 12, 2024

I got the craft-parts fix into snapcraft 8.4.0 but will need to get the craft-application fix in 8.4.1.

@mr-cal
Copy link
Collaborator

mr-cal commented Sep 16, 2024

We will need a fix in craft-grammar too: canonical/craft-grammar#49

@mr-cal
Copy link
Collaborator

mr-cal commented Sep 20, 2024

Fixed via #5051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual bad behavior that don't fall into maintenance or documentation triaged
Projects
None yet
Development

No branches or pull requests

3 participants