Skip to content

CI - deflake Isolated pytest Ubuntu#6603

Merged
pavoljuhas merged 6 commits intoquantumlib:mainfrom
pavoljuhas:fix-ci-daily
May 16, 2024
Merged

CI - deflake Isolated pytest Ubuntu#6603
pavoljuhas merged 6 commits intoquantumlib:mainfrom
pavoljuhas:fix-ci-daily

Conversation

@pavoljuhas
Copy link
Copy Markdown
Collaborator

@pavoljuhas pavoljuhas commented May 15, 2024

Problem: test_isolated_packages.py is still flaky and can fail on
parallel builds of a local cirq_core wheel.

Solution: Use per-worker copy of the cirq-core sources so that parallel
builds do not have conflicting build files.

Follow-up to #6593

@CirqBot CirqBot added the size: S 10< lines changed <50 label May 15, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 97.81%. Comparing base (cf86dda) to head (0cbc728).

Files Patch % Lines
dev_tools/notebooks/notebook_test.py 25.00% 3 Missing ⚠️
dev_tools/packaging/isolated_packages_test.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6603      +/-   ##
==========================================
- Coverage   97.81%   97.81%   -0.01%     
==========================================
  Files        1061     1061              
  Lines       91656    91659       +3     
==========================================
+ Hits        89657    89658       +1     
- Misses       1999     2001       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…otebook test

Cirq sources may be included in importlib.metadata.distributions.
We exclude them from the check if pytest virtual environment changed.
Avoid conflict between parallel builds of the cirq-core wheel.
seaborn-0.12.0 is the first version compatible with the current
colormap API in the matplotlib.
@pavoljuhas
Copy link
Copy Markdown
Collaborator Author

@pavoljuhas pavoljuhas marked this pull request as ready for review May 16, 2024 07:30
@pavoljuhas pavoljuhas requested review from a team, cduck and vtomole as code owners May 16, 2024 07:30
@pavoljuhas pavoljuhas requested a review from maffoo May 16, 2024 07:30
@pavoljuhas pavoljuhas merged commit bf67f29 into quantumlib:main May 16, 2024
@pavoljuhas pavoljuhas deleted the fix-ci-daily branch May 16, 2024 19:53
jselig-rigetti pushed a commit to jselig-rigetti/Cirq that referenced this pull request May 28, 2024
Problem: `test_isolated_packages.py` is still flaky and can fail on
parallel builds of a local `cirq_core` wheel.

Solution: Use per-worker copy of the cirq-core sources so that parallel
builds do not have conflicting build files.

Follow-up to quantumlib#6593
@pavoljuhas pavoljuhas mentioned this pull request May 29, 2024
32 tasks
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
Problem: `test_isolated_packages.py` is still flaky and can fail on
parallel builds of a local `cirq_core` wheel.

Solution: Use per-worker copy of the cirq-core sources so that parallel
builds do not have conflicting build files.

Follow-up to quantumlib#6593
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2025
Problem: The CI test "Isolated pytest Ubuntu" may still fail when
cirq-core in the repository is copied with intermediate build files.

Solution: Use a dedicated copy of cirq-core sources for installation in
each module test including when testing cirq-core itself.

Also use `logging` instead of `print` in the `cloned_env` fixture as
`logging.info` is easier to recover from parallel pytest runs
(run pytest with the `--log-level=info` option).

Follow-up to #6603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants