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: Move PYTHONWARNINGS filter on build to weekly cron job #2337

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Sep 20, 2023

Description

python -m build is currenlty giving

* Creating venv isolated environment...
* Installing packages in isolated environment... (hatch-vcs>=0.3.0, hatchling>=1.13.0)
* Getting build dependencies for sdist...
* Building sdist...
/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/setuptools_scm/_get_version_impl.py:[15](https://github.com/scikit-hep/pyhf/actions/runs/6250968975/job/16971014904?pr=2336#step:5:16)3: DeprecationWarning: empty regex for tag regex is invalid, using default
  warnings.warn(
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 304, in build_sdist
    return backend.build_sdist(sdist_directory, config_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/hatchling/build.py", line 34, in build_sdist
    return os.path.basename(next(builder.build(sdist_directory, ['standard'])))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 150, in build
    build_hook.initialize(version, build_data)
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/hatch_vcs/build_hook.py", line 43, in initialize
    dump_version(self.root, self.metadata.version, self.config_version_file, template=self.config_template)
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/setuptools_scm/_integration/dump_version.py", line 38, in dump_version
    write_version_to_path(
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/setuptools_scm/_integration/dump_version.py", line 62, in write_version_to_path
    final_template = _validate_template(target, template)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-d8uvwaf0/lib/python3.11/site-packages/setuptools_scm/_integration/dump_version.py", line 45, in _validate_template
    warnings.warn(f"{template=} looks like a error, using default instead")
UserWarning: template='' looks like a error, using default instead

Instead of breaking on regular CI workflows, which isn't helpful, move the warning filter to a weekly CRON job so we can still check for possible warnings.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Move PYTHONWARNINGS filter to run on a weekly cron job to avoid interrupting
  normal development with errors due to warnings outside of direct user control.

* Remove PYTHONWARNINGS filter to avoid having builds fail for reasons
  outside of user control.
@matthewfeickert matthewfeickert added CI CI systems, GitHub Actions need-to-backport tmp label until can be backported to patch release branch labels Sep 20, 2023
@matthewfeickert matthewfeickert self-assigned this Sep 20, 2023
@matthewfeickert matthewfeickert changed the title ci: Remove error on warnings for build ci: Move warnings filter on build to weekly cron job Sep 20, 2023
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4ec7bf3) 98.28% compared to head (bae3bf5) 98.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2337   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          69       69           
  Lines        4538     4538           
  Branches      803      803           
=======================================
  Hits         4460     4460           
  Misses         45       45           
  Partials       33       33           
Flag Coverage Δ
contrib 97.86% <ø> (ø)
doctest 60.99% <ø> (ø)
unittests-3.10 96.29% <ø> (ø)
unittests-3.11 96.29% <ø> (ø)
unittests-3.8 96.31% <ø> (ø)
unittests-3.9 96.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@matthewfeickert matthewfeickert changed the title ci: Move warnings filter on build to weekly cron job ci: Move PYTHONWARNINGS filter on build to weekly cron job Sep 20, 2023
@matthewfeickert matthewfeickert merged commit 66ecdd8 into main Sep 20, 2023
23 checks passed
@matthewfeickert matthewfeickert deleted the ci/remove-deprecation-warning-check branch September 20, 2023 16:32
@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label Oct 25, 2023
matthewfeickert added a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI systems, GitHub Actions
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant