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

Allow user specified additional 'parallel' suffix #756

Closed
ulope opened this issue Jan 21, 2019 · 3 comments
Closed

Allow user specified additional 'parallel' suffix #756

ulope opened this issue Jan 21, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@ulope
Copy link

ulope commented Jan 21, 2019

Is your feature request related to a problem? Please describe.
I've noticed that when running coverage in parallel mode on containerized CI systems with heavy concurrency it happens sometimes that the generated suffix is not unique (depleted entropy pool would be my guess).

Describe the solution you'd like
A simple solution would be to allow the user to specify an optional additional suffix (either via cli flag or environment variable) since most CI systems already provide a unique job-id (or similar).

Describe alternatives you've considered
More elaborate schemes of automatically generating the suffix (e.g. taking a hash of the environment, incorporating date/time). But those seem either a bit too complicated or could also suffer from the same problem in high concurrency situations.

@ulope ulope added the enhancement New feature or request label Jan 21, 2019
@nedbat
Copy link
Owner

nedbat commented Jan 21, 2019

Hmm, interesting point: coverage.py uses the process id to disambiguate, but docker uses the same pids over and over. My inclination would be to have a config value that is used as the entire suffix, but I think you can do everything you need now by setting data_file with an environment variable?

[run]
data_file = .coverage_${SOMETHING_UNIQUE}

Can you give that a try and see?

@ulope
Copy link
Author

ulope commented Jan 21, 2019

Ah good idea, thanks. I'll try that.

@earonesty
Copy link

see: #802

@nedbat nedbat closed this as completed Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants