question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot run west update if manifest does not belong to user

See original GitHub issue

Hello,

I’m using a container image with the tools to build a zephyr application from github action (https://github.com/SiemaApplications/zephyr-action/) I use this action alongside actions/cache. I (recently) noticed that when running west update (or other commands parsing the manifest) the command fails with the following message:

root@30c604986fc5:/src# west list
Traceback (most recent call last):
  File "/usr/local/bin/west", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/west/app/main.py", line 786, in main
    app.run(argv or sys.argv[1:])
  File "/usr/local/lib/python3.8/dist-packages/west/app/main.py", line 109, in run
    self.run_command(argv)
  File "/usr/local/lib/python3.8/dist-packages/west/app/main.py", line 337, in run_command
    self.handle_builtin_manifest_load_err(args)
  File "/usr/local/lib/python3.8/dist-packages/west/app/main.py", line 195, in handle_builtin_manifest_load_err
    p, f = self.mle.project, self.mle.filename
AttributeError: 'ManifestImportFailed' object has no attribute 'filename'

I tracked the issue, and here is what I found:

  • does not happen with West version: v0.12.0
  • happens with West version: v0.13.1
  • happens if user running west list command does not own the manifest.

In my case, when running github action, the cache files (mainly west modules, including zephyr) restored belongs to docker user (id 1001), however in my container image I am running with the user root (id 0). If i launch my container manually with -u $(id -u):$(id -g) then everything belongs to the user running the west list command and that works fine.

I don’t really know if this behavior is intended or not. As far as I am concerned, I don’t really like the idea of having part of the files belonging to a user (docker) and another part belonging to another one (root) so I’ll run a pre-entrypoint so the user running west from the container will own everything.

Best regards, Nicolas.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mbolivar-nordiccommented, May 11, 2022

No matter what, west list should definitely not be bombing out with an exception like that. We’ll need to fix that at least. I will need to think about the larger issue about ownership, though.

0reactions
nvincent-vosslohcommented, Jul 21, 2022

This is looking good on my side, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

West Manifests - Zephyr Project Documentation
West Manifests ¶. This page contains detailed information about west's multiple repository model, manifest files, and the west manifest ...
Read more >
[feature] allow west to report if any of the cloned repositories is ...
For a manifest that does not use import: that only uses SHAs in its revision: values, like upstream zephyr/west.yml, the request seems clear....
Read more >
Troubleshoot Cloud Run issues
This page shows you how to resolve issues with Cloud Run. For other issues not listed below, check to see if they may...
Read more >
Workspaces — Zephyr Project Documentation
The west update command essentially runs git fetch YOUR_PROJECT_URL when a project's manifest-rev branch must be updated to a newly fetched ...
Read more >
Use an Input Manifest File - Amazon SageMaker
The manifest file must be in the same AWS Region as the data files, but it doesn't need to be in the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found