Skip to content

🔧 Fix CI installation failure for json2html caused by setuptools 78.0.1 update #7415

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

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Mar 24, 2025

What do these changes do?

This PR addresses a CI failure that occurred during the installation of the json2html library. The issue was triggered by a sudden update to the setuptools package (version 78.0.1), which caused compatibility problems during the installation step in the CI workflow.

Downloaded virtualenv
  × Failed to build `json2html==1.3.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit
      status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/build_meta.py",
      line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/build_meta.py",
      line 304, in _get_build_requires
          self.run_setup()
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/build_meta.py",
      line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/build_meta.py",
      line 320, in run_setup
          exec(code, locals())
        File "<string>", line 11, in <module>
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/__init__.py",
      line 116, in setup
          _install_setup_requires(attrs)
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/__init__.py",
      line [87](https://github.com/ITISFoundation/osparc-simcore/actions/runs/14038993041/job/39304187921?pr=7409#step:7:88), in _install_setup_requires
          dist.parse_config_files(ignore_option_errors=True)
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/_virtualenv.py",
      line 20, in parse_config_files
          result = old_parse_config_files(self, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/dist.py",
      line 730, in parse_config_files
          self._parse_config_files(filenames=inifiles)
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/dist.py",
      line 5[99](https://github.com/ITISFoundation/osparc-simcore/actions/runs/14038993041/job/39304187921?pr=7409#step:7:100), in _parse_config_files
          opt = self._enforce_underscore(opt, section)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpZo4w61/lib/python3.11/site-packages/setuptools/dist.py",
      line 629, in _enforce_underscore
          raise InvalidConfigError(
      setuptools.errors.InvalidConfigError: Invalid dash-separated key
      'description-file' in 'metadata' (setup.cfg), please use the underscore
      name 'description_file' instead.

Solution

Since json2html does not currently provide a solution to this issue and is not critical to our system, we opted for the following workaround:

  • Inlined the entire json2html code (a single-file library) into publication/_utils/
  • Removed json2html from our `requirements
  • Extra: ♻️ Renamed its internal module from _handlers to _rest

Related issue/s

  • master CI is broken

before

image

after:

image

How to test

in place

Dev-ops

None

Copy link

codecov bot commented Mar 24, 2025

Codecov Report

Attention: Patch coverage is 44.44444% with 50 lines in your changes missing coverage. Please review.

Project coverage is 83.99%. Comparing base (0a16428) to head (5a80f48).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7415      +/-   ##
==========================================
+ Coverage   79.45%   83.99%   +4.54%     
==========================================
  Files        1712      662    -1050     
  Lines       66515    31731   -34784     
  Branches     1131      168     -963     
==========================================
- Hits        52851    26654   -26197     
+ Misses      13342     5019    -8323     
+ Partials      322       58     -264     
Flag Coverage Δ
integrationtests 65.17% <20.00%> (-0.16%) ⬇️
unittests 87.10% <44.44%> (+0.87%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 77.30% <ø> (-8.16%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.57% <ø> (-12.74%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 89.08% <ø> (-1.04%) ⬇️
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 85.65% <44.44%> (+26.38%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a16428...5a80f48. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov self-assigned this Mar 24, 2025
@pcrespov pcrespov added the a:webserver issue related to the webserver service label Mar 24, 2025
@pcrespov pcrespov requested a review from bisgaard-itis March 24, 2025 17:31
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov merged commit abe7652 into ITISFoundation:master Mar 24, 2025
90 of 94 checks passed
@pcrespov pcrespov deleted the fix/latest-setuptools-broke-installation branch March 24, 2025 18:10
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Mar 26, 2025
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Apr 15, 2025
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants