Skip to content

quincy: cephadm: use importlib.metadata for querying ceph_iscsi's version - #58637

Merged
zdover23 merged 2 commits into
ceph:quincyfrom
zdover23:wip-doc-2024-07-16-backport-57685-to-quincy
Jul 22, 2024
Merged

zdover23 merged 2 commits into
ceph:quincyfrom
zdover23:wip-doc-2024-07-16-backport-57685-to-quincy

Conversation

@zdover23

Copy link
Copy Markdown
Contributor

to prepare for a change to use importlib, then fallback to pkg_resources. as the former is only available in Python 3.8, while the latter is deprecated.

NOTE: This is a backport to the Quincy branch of the commits in https://github.com/ceph/ceph/pull/57685/commits. Those commits are:

  1. be1a8c2
  2. cbd4bed The alteration to the "def get_version(ctx, container_id):" function introduced by be1a8c is not in the same file in the main branch as in the Quincy branch, which makes a backport using cherry-picks impossible.

Refs https://tracker.ceph.com/issues/66201

(cherry picked from commit be1a8c2)

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

@zdover23
zdover23 requested a review from a team as a code owner July 17, 2024 04:18
@github-actions github-actions Bot added this to the quincy milestone Jul 17, 2024
@zdover23
zdover23 requested review from adk3798 and jdurgin July 17, 2024 04:18
@zdover23
zdover23 force-pushed the wip-doc-2024-07-16-backport-57685-to-quincy branch 2 times, most recently from 4eb54ca to c2d8797 Compare July 17, 2024 05:42
tchaikov added 2 commits July 17, 2024 16:51
to prepare for a change to use importlib, then fallback to
pkg_resources. as the former is only available in Python 3.8, while
the latter is deprecated.

Refs https://tracker.ceph.com/issues/66201
Signed-off-by: Kefu Chai <[email protected]>
(cherry picked from commit be1a8c2)

Conflicts:
	src/cephadm/cephadmlib/daemons/iscsi.py [ this file doesn't
	  exist in quincy, get_version() lives in src/cephadm/cephadm ]
use importlib.metadata for querying ceph_iscsi's version and fallback to
pkg_resources. as the former is only available in Python 3.8, while
the latter is deprecated.

Refs https://tracker.ceph.com/issues/66201
Signed-off-by: Kefu Chai <[email protected]>
(cherry picked from commit cbd4bed)

Conflicts:
	src/cephadm/cephadmlib/daemons/iscsi.py [ this file doesn't
	  exist in quincy, get_version() lives in src/cephadm/cephadm ]
@idryomov
idryomov force-pushed the wip-doc-2024-07-16-backport-57685-to-quincy branch from c2d8797 to fc27cdf Compare July 17, 2024 14:58
@idryomov idryomov changed the title quincy: cephadm: extract python() helper to execute python statement quincy: cephadm: use importlib.metadata for querying ceph_iscsi's version Jul 17, 2024
@idryomov

Copy link
Copy Markdown
Contributor

Pushed a mechanical backport (no testing!) to Zac's branch at his request.

@idryomov

Copy link
Copy Markdown
Contributor

which makes a backport using cherry-picks impossible.

It's always possible if you are willing to resolve conflicts after each cherry pick ;) For larger series it can get burdensome, but in general it's preferred -- that way commits in the backport PR correspond 1:1 to commits in the original PR and conflict resolution can be retraced easily.

@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

1 similar comment
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

@zdover23
zdover23 merged commit c8b6f25 into ceph:quincy Jul 22, 2024
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