Skip to content

Address CI errors#138

Merged
shorowit merged 2 commits intomainfrom
address_spurious_ci_errors
Apr 7, 2026
Merged

Address CI errors#138
shorowit merged 2 commits intomainfrom
address_spurious_ci_errors

Conversation

@bpark1327
Copy link
Copy Markdown
Collaborator

Closes #137

@bpark1327 bpark1327 self-assigned this Apr 6, 2026
@bpark1327 bpark1327 added the bug Something isn't working label Apr 6, 2026
@bpark1327
Copy link
Copy Markdown
Collaborator Author

Root Cause:
eeweather's cache.py calls os.makedirs(directory) with the default exist_ok=False. When tests run in parallel via pytest-xdist (as indicated by the [gw1] marker in the logs), multiple workers race to create /home/runner/.eeweather at the same time. The second worker to arrive raises a FileExistsError.

Proposed Fix:
Isolate the eeweather cache directory per test worker by overriding the cache path in conftest.py

@bpark1327
Copy link
Copy Markdown
Collaborator Author

Root Cause:
matplotlib automatically selects an interactive backend at import time based on the runtime environment. In headless Linux CI environments, this selection fails because there is no active display session.

Proposed Fix:
Added a session-scoped fixture in conftest.py that forces matplotlib to use the Agg backend (a non-interactive, file-based renderer) before any tests run

@bpark1327 bpark1327 requested a review from shorowit April 6, 2026 19:43
@bpark1327 bpark1327 marked this pull request as ready for review April 6, 2026 19:43
Copy link
Copy Markdown
Collaborator

@shorowit shorowit left a comment

Choose a reason for hiding this comment

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

Seems to be working nicely. I triggered a second CI run and that was also successful. Thanks @bpark1327! I still think there could be an issue that our results are not always reproducible/deterministic, but if we see that again from the CI, we can open a separate issue.

@shorowit shorowit merged commit 0439327 into main Apr 7, 2026
18 checks passed
@shorowit shorowit deleted the address_spurious_ci_errors branch April 7, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address spurious CI errors

2 participants