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

Make west init more impodent #27

Open
gonzolively opened this issue Jan 17, 2025 · 3 comments
Open

Make west init more impodent #27

gonzolively opened this issue Jan 17, 2025 · 3 comments

Comments

@gonzolively
Copy link

gonzolively commented Jan 17, 2025

Background: We have a unique scenario where our organization hosts a repository that is synced to another repository (identical name/code/etc) in an open-source project. This open-source project uses a physical build machine, as it was donated by some of our community members.

Problem: The problem we're having is that our workflow file specifies the action-zephyr-setup@v1 action, but because we're using a physical build machine, we get an error essentially saying the project has already been initialized (see error below), which is true because the build state persists on this machine.

Error:

Run west init -l application --mf west.yml
  west init -l application --mf west.yml
  west update -o=--depth=1 -n
  shell: bash --noprofile --norc -e -o pipefail {0}
FATAL ERROR: already initialized in /__w/ocre-runtime/ocre-runtime, aborting.
  Hint: if you do not want a workspace there, 
  remove this directory and re-run this command:
  /__w/ocre-runtime/ocre-runtime/.west

Proposed Solution: We could add a cleanup step before this action to ensure that the project is not initialized however, it would be nicer/cleaner if this action provided an option to clean the workspace beforehand or ignore if a workspace is already initialized.

@fabiobaltieri
Copy link
Member

Proposed Solution: We could add a cleanup step before this action to ensure that the project is not initialized however, it would be nicer/cleaner if this action provided an option to clean the workspace beforehand or ignore if a workspace is already initialized.

It's really not up to the action to prepare the workspace, if you have that initialized by a previous run that's honestly not a great design, you are basically not having isolation between runs. Having an option to skip the initialization may make sense if you have a solid use case for it but from what you describe you really should setup the system to start clean or add a clean step before the action in the workflow, maybe just a git clean -fxd or something would be enough.

@gonzolively
Copy link
Author

Hey @fabiobaltieri , yeah I agree. For some reason it looks like these steps are not running in our build container, which is the real issue. Will continue digging on my side to see what the fix is here.

@fabiobaltieri
Copy link
Member

Of course, feel free to reporting your findings here, may be useful for user users as well.

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

No branches or pull requests

2 participants