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

Parallel installation of snapcraft not passed to LXD instance #4927

Closed
farshidtz opened this issue Jul 18, 2024 · 4 comments · Fixed by #5085
Closed

Parallel installation of snapcraft not passed to LXD instance #4927

farshidtz opened this issue Jul 18, 2024 · 4 comments · Fixed by #5085
Labels
bug Actual bad behavior that don't fall into maintenance or documentation triaged

Comments

@farshidtz
Copy link
Member

Bug Description

It may be useful to install two versions of snapcraft for testing changes to snapcraft itself. In this case, I am working on a new extension and the parallel installation of snapcraft isn't passed to LXD.

Unrelated issue: #4683

To Reproduce

After building snapcraft, install it in parallel to the existing stable snapcraft:

$ sudo snap install --classic --dangerous --name=snapcraft_env ./snapcraft_8.3.0.post10+git8442928db_amd64.snap
snapcraft_env 8.3.0.post10+git8442928db installed

Then try to build a snap that uses this the newly developed extension:

$ SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v
Starting snapcraft, version 8.3.0.post10+git8442928db                                                                             
Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-095346.533496.log'                              
*EXPERIMENTAL* extension 'env-injector' enabled                                                                                   
Launching managed ubuntu 24.04 instance...                                                                                        
Starting instance                                                                                                                 
Starting snapcraft, version 8.3.1                                                                                                 
Logging execution to '/tmp/snapcraft.log'                                                                                         
Starting snapcraft, version 8.3.1                                                                                                 
Logging execution to '/tmp/snapcraft.log'                                                                                         
Extension 'env-injector' does not exist                                                                                           
Failed to execute snapcraft in instance.                                                                  

Environment

Ubuntu 23.10

snapcraft.yaml

# Refer to https://github.com/canonical/snapcraft/pull/4925 for the extension

name: envtester
base: core24
version: 'demo'
summary: Demonstration of env-exporter program
description: |
  envtester is a demo snap to show the env-exporter program use cases

grade: stable
confinement: strict

apps:
  myapp:
    daemon: simple
    environment:
     env_alias: myapp
    extensions:
      - env-injector
    command: run.sh

parts:
  myapp:
    source: .
    plugin: dump

# also need to create run.sh

Relevant log output

-

Additional context

I could not try with multipass as the provider, as I get some strange error, unrelated to the parallel installation:

SNAPCRAFT_BUILD_ENVIRONMENT=multipass SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v
Starting snapcraft, version 8.3.0.post10+git8442928db                                                                             
Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-105347.585930.log'                              
*EXPERIMENTAL* extension 'env-injector' enabled                                                                                   
Launching managed ubuntu 24.04 instance...                                                                                        
Incompatible base detected: Expected OS version '24.04', found '24.10'.                                                           
Recommended resolution: Clean incompatible instance and retry the requested operation. 
@mr-cal
Copy link
Collaborator

mr-cal commented Aug 14, 2024

Upstream bug: canonical/craft-application#411

@mr-cal
Copy link
Collaborator

mr-cal commented Aug 14, 2024

Thanks for the report, I can reproduce this.

The latter issue with Multipass is due to them a lack of the snapcraft:24.04 alias. They've fixed the issue in latest/edge for multipass.

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

Thank you for reporting us your feedback!

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

This message was autogenerated

@mr-cal
Copy link
Collaborator

mr-cal commented Oct 4, 2024

Fixed via #5085 and #5087

@mr-cal mr-cal closed this as completed Oct 4, 2024
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

Successfully merging a pull request may close this issue.

2 participants