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

Default --no-interactive to on when CI=true #232

Closed
djmattyg007 opened this issue Aug 19, 2022 · 5 comments · Fixed by #245
Closed

Default --no-interactive to on when CI=true #232

djmattyg007 opened this issue Aug 19, 2022 · 5 comments · Fixed by #245

Comments

@djmattyg007
Copy link

By setting --no-interactive to on when the environment variable CI is true, we can help avoid situations where a CI pipeline accidentally blocks waiting for user input when none will arrive. This will help prevent precious compute resources from being wasted.

@Secrus
Copy link
Member

Secrus commented Aug 30, 2022

I like the idea, but I am hesitant. Is the CI variable present in all CI/CD systems? I would like to avoid adding a big list of variables that could potentially break someone's setup.

@djmattyg007
Copy link
Author

I’ve never heard of a CI system that doesn’t set that environment variable to true.

@neersighted
Copy link
Member

I’ve never heard of a CI system that doesn’t set that environment variable to true.

There are certainly plenty that don't do it automatically, but it certainly is a common convention. Most users of environments where it is not set implicitly will set it manually @Secrus, so I do not see the harm (though Poetry should probably grow a 'using Poetry in CI' FAQ entry that mentions this).

@branchvincent
Copy link
Member

Thanks for the suggestion!

I think we should go a step further and default --no-interaction when stdin is not a tty, since that will cover more cases than just CI.

See #245

@djmattyg007
Copy link
Author

@branchvincent @Secrus I don’t think the implemented solution necessarily solves the problem I reported. Some CI systems (like Buildkite) allocate a TTY by default because they want processes to output colour. However they still set the CI environment variable to true.

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.

4 participants