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

parts, stage and prime should only live in the managed environment #53

Closed
sergiusens opened this issue Aug 22, 2023 · 1 comment · Fixed by #74
Closed

parts, stage and prime should only live in the managed environment #53

sergiusens opened this issue Aug 22, 2023 · 1 comment · Fixed by #74

Comments

@sergiusens
Copy link
Collaborator

Bug Description

The original design is for parts, stage and prime to live inside the managed environment.

To Reproduce

Create an app using Craft Application

part yaml

N/A

Relevant log output

N/A
@tigarmo
Copy link
Contributor

tigarmo commented Sep 18, 2023

Just bumped into this issue. From what I can tell, the problem is that CraftApplication has a single "work_dir" which, in managed mode, ends up being the directory that contains the project file, mounted into the instance.

For contrast, in managed mode Rockcraft (and probably the other apps but I haven't checked) has work_dir as /root, and the directory that contains the project file, and is mounted into the instance, is the cwd.

References:

https://github.com/canonical/rockcraft/blob/main/rockcraft/lifecycle.py#L59
https://github.com/canonical/rockcraft/blob/main/rockcraft/lifecycle.py#L264

Note that utils.get_managed_environment_project_path() and utils.get_managed_environment_home_path() are two different paths: /root/project and /root respectively.

tigarmo added a commit that referenced this issue Sep 18, 2023
When running in managed mode, the work dir is _not_ the cwd: the
work dir is "/root/" and contains the lifecycle directories, while the
cwd is typically the directory containing the project file, mounted as
"/root/project/" inside the instance.

Fixes #53
tigarmo added a commit that referenced this issue Sep 18, 2023
When running in managed mode, the work dir is _not_ the cwd: the
work dir is "/root/" and contains the lifecycle directories, while the
cwd is typically the directory containing the project file, mounted as
"/root/project/" inside the instance.

Fixes #53
tigarmo added a commit that referenced this issue Sep 11, 2024
With this commit the fetch-service service is disabled by default; the way
to enable it is through a new "--use-fetch-service" command line parameter.

This new parameter is initiallly only available to the "pack" command, as
the cache-clearing that the service needs precludes the use of other
lifecycle commands, and the manifest that the application will create based
on the fetch-service's session report is only produced during packing.

Fixes #15
tigarmo added a commit that referenced this issue Sep 12, 2024
With this commit the fetch-service service is disabled by default; the way
to enable it is through a new "--use-fetch-service" command line parameter.

This new parameter is initiallly only available to the "pack" command, as
the cache-clearing that the service needs precludes the use of other
lifecycle commands, and the manifest that the application will create based
on the fetch-service's session report is only produced during packing.

Fixes #15
tigarmo added a commit that referenced this issue Sep 12, 2024
With this commit the fetch-service service is disabled by default; the way
to enable it is through a new "--use-fetch-service" command line parameter.

This new parameter is initiallly only available to the "pack" command, as
the cache-clearing that the service needs precludes the use of other
lifecycle commands, and the manifest that the application will create based
on the fetch-service's session report is only produced during packing.

Fixes #15
linostar pushed a commit to linostar/craft-application that referenced this issue Dec 4, 2024
With this commit the fetch-service service is disabled by default; the way
to enable it is through a new "--use-fetch-service" command line parameter.

This new parameter is initiallly only available to the "pack" command, as
the cache-clearing that the service needs precludes the use of other
lifecycle commands, and the manifest that the application will create based
on the fetch-service's session report is only produced during packing.

Fixes canonical#15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants