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

Add support for CIRCLE_NODE_{TOTAL,INDEX} environment variables #136

Closed
wants to merge 2 commits into from

Conversation

brettlangdon
Copy link
Member

Fixes #47

I am not convinced having this be the default behavior is the best? Should we require a cli switch to say to use these env variables, or maybe an env variable to disable this behavior?

can we think of a case when someone would not want this? only thing I can think of is if you are using some other tooling to split tests envs that you give to riot, like https://github.com/DataDog/dd-trace-py/blob/8ded786edb6e0b3d7b2e079ae58a0d9ab87ffd05/.circleci/config.yml#L130

@brettlangdon brettlangdon requested a review from a team as a code owner April 29, 2021 17:23
ci_node_index = os.environ["CIRCLE_NODE_INDEX"]

if ci_node_total and ci_node_index:
venvs = list(_iter_venvs())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally thinking we might want to do venvs = sorted(_iter_venvs()) to ensure the results are consistent, but would it be weird that the ordering of the venvs changes based on whether you use parallelism or not?

@brettlangdon brettlangdon deleted the circleci.parallelism branch April 18, 2022 13:23
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 this pull request may close these issues.

Support CircleCI env variables for parallelism
1 participant