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

Option to leave OCI container alive for debugging after build #1320

Closed
Helveg opened this issue Oct 20, 2022 · 3 comments · Fixed by #1620
Closed

Option to leave OCI container alive for debugging after build #1320

Helveg opened this issue Oct 20, 2022 · 3 comments · Fixed by #1620

Comments

@Helveg
Copy link
Contributor

Helveg commented Oct 20, 2022

Description

When experimenting with the local setup, using cibuildwheel --platform=linux, for example, a container is created. The container is removed after the build finishes. If the build fails, there's no way to debug what caused it except for the logs. The roundtrip time of adding debug logs are pretty high for big software projects. For myself I've commented out these lines:

subprocess.run(
[self.engine, "rm", "--force", "-v", self.name],
stdout=subprocess.DEVNULL,
check=False,
)

But I could PR a proper solution if someone talks me through the requirements, and if everyone agrees this is a good addition for debugging.

Build log

No response

CI config

No response

@Helveg
Copy link
Contributor Author

Helveg commented Sep 14, 2023

@henryiii sorry to tag you, but 1 year later, and still willing to PR this ^_^

@henryiii
Copy link
Contributor

I'd be okay with an environment variable to disable the cleanup. CIBW_CONTAINER_DEBUG or something like that? @joerick, @mayeut?

@joerick
Copy link
Contributor

joerick commented Sep 18, 2023

Yeah, that would be fine. CIBW_DEBUG_KEEP_CONTAINER might make sense. IMO it doesn't have to go through all the options.py machinery, it can be a simple os.environ.get, as we don't care about reading from TOML etc. I think we could add a little section to the bottom of the options documentation page to note little extra options that are more for debugging. The other one that doesn't fit with the other options is CIBW_CACHE_PATH, that could be documented there too.

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.

3 participants