Skip to content

mgr/prometheus: s/pkg_resources.packaging/packaging/ - #57700

Merged
tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-mgr-prometheus-packaging
May 28, 2024
Merged

tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-mgr-prometheus-packaging

Conversation

@tchaikov

@tchaikov tchaikov commented May 25, 2024 •

Copy link
Copy Markdown
Contributor

instead of relying on the internal implementation of pkg_resources, let's import packaging directly.

in this change, we also add the dependency to the packaging module in the packaging recipes.

See also pypa/setuptools#4385

Fixes https://tracker.ceph.com/issues/66201
Signed-off-by: Kefu Chai [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

instead of relying on the internal implementation of pkg_resources,
let's import packaging directly.

in this change, we also add the dependency to the packaging module
in the packaging recipes.

See also pypa/setuptools#4385

Fixes https://tracker.ceph.com/issues/66201
Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-mgr-prometheus-packaging branch from d38f920 to 844b66d Compare May 25, 2024 07:23
@tchaikov

Copy link
Copy Markdown
Contributor Author

@petrutlucian94 hi Lucian, could you please take a look on the failure at https://jenkins.ceph.com/job/ceph-windows-pull-requests/40812/consoleFull#212386344640526d21-3511-427d-909c-dd086c0d1034 ? the tests on windows are failing quite frequently recently.

@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins test windows

2 similar comments
@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@tchaikov
tchaikov requested review from pereman2 and rkachach May 26, 2024 02:53
@tchaikov

Copy link
Copy Markdown
Contributor Author

@rkachach and @pereman2 hi Redouane and Pere, i see you were updating this module recently. could you help review this change at your convenience?

@petrutlucian94

petrutlucian94 commented May 26, 2024 •

Copy link
Copy Markdown
Contributor

@tchaikov one of the recently introduced tests is flaky: https://github.com/ceph/ceph/pull/55008/files#r1613349863

It fails on Linux as well, it's just that the Windows job runs it and the Linux "make check" job does not.

I'm thinking about skipping it on Windows: ceph/ceph-win32-tests#19

@tchaikov

Copy link
Copy Markdown
Contributor Author

@petrutlucian94 hi Lucian, thank you for looking into this and the prompt workaround.

@rkachach

rkachach commented May 27, 2024 •

Copy link
Copy Markdown
Contributor

@rkachach and @pereman2 hi Redouane and Pere, i see you were updating this module recently. could you help review this change at your convenience?

@tchaikov the change LGTM as pkg_resources seems to be deprecated https://discuss.python.org/t/will-setuptools-remove-pkg-resource-module-in-the-future/27182 and the alternative you provide gets the same functionality (for version parsing) without depending on it.

@rkachach rkachach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tchaikov

Copy link
Copy Markdown
Contributor Author

@rkachach thank you for your review. i will get it tested with teuthology. just to make sure the change compile, and does not introduce any regressions.

@tchaikov tchaikov self-assigned this May 27, 2024
@tchaikov tchaikov removed the needs-qa label May 28, 2024
@tchaikov tchaikov removed their assignment May 28, 2024
@tchaikov
tchaikov merged commit 700916c into ceph:main May 28, 2024
@tchaikov
tchaikov deleted the wip-mgr-prometheus-packaging branch May 28, 2024 01:08
@zdover23

Copy link
Copy Markdown
Contributor

@tchaikov, Can we get this backported to S, R, and Q so that the docs will build on R and Q?

@zdover23

Copy link
Copy Markdown
Contributor

#58623 - Squid backport
#58624 - Reef backport
#58627 - Quincy backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants