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

CI: Ignore mamba Warning Message on stderr to Prevent JSON Parsing Errors #6748

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

rabbull
Copy link
Contributor

@rabbull rabbull commented Feb 6, 2025

This PR addresses the CI issue caused by the deprecated --no-python-version-warning in mamba, which interferes with JSON parsing in tests.

To resolve this:

  • Upgraded pytest-docker to version 3.2.0, which introduces the ignore_stderr feature.
  • Updated test cases (test_correct_python_version_installed and test_correct_pgsql_version_installed) to include ignore_stderr=True, ensuring that warning messages on stderr do not disrupt JSON parsing.

Hopefully this improvement ensures future robustness against JSON parsing issues caused by warnings in stderr.

Closes #6745.

cc @GeigerJ2, @unkcpz, and @agoscinski.

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.08%. Comparing base (8039ad9) to head (82c0b1f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6748   +/-   ##
=======================================
  Coverage   78.08%   78.08%           
=======================================
  Files         564      564           
  Lines       42547    42547           
=======================================
  Hits        33219    33219           
  Misses       9328     9328           

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

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Thanks @rabbull, it is a neat fix, all good for me.

@unkcpz unkcpz merged commit 8c5c709 into aiidateam:main Feb 7, 2025
10 checks passed
@unkcpz
Copy link
Member

unkcpz commented Feb 7, 2025

Updated test cases (test_correct_python_version_installed and test_correct_pgsql_version_installed) to include ignore_stderr=True, ensuring that warning messages on stderr do not disrupt JSON parsing.

I think it is proper to just ignore the error/warnings as did in this PR. Since the test itself is targeting to test the version but not running the command gives no error.

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.

Failing CI due to use of deprecated --no-python-version-warning in mamba
2 participants