Closed sergiusens closed 1 year ago
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.
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
Relevant log output