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

fixing GitHub CI #899 #918

Merged
merged 4 commits into from
Jan 18, 2024
Merged

fixing GitHub CI #899 #918

merged 4 commits into from
Jan 18, 2024

Conversation

thomasstorm
Copy link
Contributor

This PR fixes #899. The reason for the test failures in GitHub has been a race condition: the server starts in the background, and on another thread, the tests use it. The fix ensured that the server has started before the setUp() method terminates.

The checklist items below do not apply mostly, as there are no new features to be documented.

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • GitHub CI passes
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

@thomasstorm thomasstorm self-assigned this Jan 16, 2024
xcube/server/testing.py Outdated Show resolved Hide resolved
xcube/server/testing.py Show resolved Hide resolved
…dlessly if the server does not start properly
@thomasstorm thomasstorm requested a review from forman January 16, 2024 22:12
@pont-us pont-us changed the title fixing GitHub CI #886 fixing GitHub CI #899 Jan 18, 2024
@pont-us
Copy link
Member

pont-us commented Jan 18, 2024

I edited the title, since I assume "#886" was a typo for "#899".

Copy link
Member

@pont-us pont-us left a comment

Choose a reason for hiding this comment

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

Simple and effective. Approved with a minor language nitpick.

xcube/server/testing.py Outdated Show resolved Hide resolved
Co-authored-by: Pontus Lurcock <[email protected]>
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3bec012) 93.43% compared to head (7102fbb) 93.43%.

Files Patch % Lines
xcube/server/testing.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
- Coverage   93.43%   93.43%   -0.01%     
==========================================
  Files         453      453              
  Lines       35510    35518       +8     
==========================================
+ Hits        33180    33186       +6     
- Misses       2330     2332       +2     

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

Copy link
Contributor

@TonioF TonioF left a comment

Choose a reason for hiding this comment

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

I see this rather as a workaround than a proper fix. In line 59, we instantiate an AnyThreadEventLoopPolicy which has been deprecated (see https://www.tornadoweb.org/en/stable/asyncio.html#tornado.platform.asyncio.AnyThreadEventLoopPolicy). I assume we'd need to remove this and that we still will encounter issues in the future. I approve this PR as it solves our momentary problems, but I suggest not to close the issue.

@thomasstorm thomasstorm merged commit 1107099 into master Jan 18, 2024
4 of 6 checks passed
@thomasstorm thomasstorm deleted the thomas_899_fix-ci branch January 18, 2024 11:30
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.

Intermittent MaxRetryError (and others) in CI unit test runs
4 participants