Skip to content

mgr/dashboard: use system packages when running tox#62239

Merged
nizamial09 merged 6 commits intoceph:mainfrom
rhcs-dashboard:xmlsec-fail-main
Jul 2, 2025
Merged

mgr/dashboard: use system packages when running tox#62239
nizamial09 merged 6 commits intoceph:mainfrom
rhcs-dashboard:xmlsec-fail-main

Conversation

@nizamial09
Copy link
Member

@nizamial09 nizamial09 commented Mar 12, 2025

This PR intends to configure the tox to run with system installed packages rather than getting a version from pip which may differ from the original ones that we support.

this will also unpin the grpc dependencies.

Fixes: https://tracker.ceph.com/issues/70411

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

@nizamial09 nizamial09 requested a review from a team as a code owner March 12, 2025 05:36
@nizamial09 nizamial09 requested review from cloudbehl and pecastro and removed request for a team March 12, 2025 05:36
@nizamial09 nizamial09 requested a review from a team as a code owner March 12, 2025 05:51
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Mar 12, 2025
xmlsec had an upgrade yesterday night and python3-saml might need to
adapt its library accordingly I suppose. Testing a fix by pinning lxml

Another approach is being tried out separately
ceph#62239, but that is failing with some
other errors.

Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Mar 12, 2025
xmlsec had an upgrade yesterday night and python3-saml might need to
adapt its library accordingly I suppose. Testing a fix by pinning lxml

Another approach is being tried out separately
ceph#62239, but that is failing with some
other errors.

Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Mar 12, 2025
xmlsec had an upgrade yesterday night and python3-saml might need to
adapt its library accordingly I suppose. Testing a fix by pinning lxml

Another approach is being tried out separately
ceph#62239, but that is failing with some
other errors.

Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
@nizamial09
Copy link
Member Author

extending couple of stuffs @pecastro doing in https://github.com/ceph/ceph/pull/61967/files so that it applies for the dashboard tox in general. Might need to adapt few tests as stated by him in his original PR.

nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Mar 12, 2025
xmlsec had an upgrade yesterday night and python3-saml might need to
adapt its library accordingly I suppose. Testing a fix by pinning lxml

Another approach is being tried out separately
ceph#62239, but that is failing with some
other errors.

Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 1f84505)

 Conflicts:
	src/pybind/mgr/dashboard/requirements.txt
 - only kept the lxml pinning. didn't add the newer deps that are
   present in main
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Mar 12, 2025
xmlsec had an upgrade yesterday night and python3-saml might need to
adapt its library accordingly I suppose. Testing a fix by pinning lxml

Another approach is being tried out separately
ceph#62239, but that is failing with some
other errors.

Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 1f84505)

 Conflicts:
	src/pybind/mgr/dashboard/requirements.txt
 - didn't add the dependency that are present in main and only added the
   lxml pinning
@nizamial09 nizamial09 changed the title mgr/dashboard: fix xmlsec failure in run-tox-mgr-dashboard-py3 mgr/dashboard: use system packages when running tox Mar 13, 2025
@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-project-automation github-project-automation bot moved this from New to Reviewer approved in Ceph-Dashboard Jun 26, 2025
@@ -1,3 +1,5 @@
# pylint: disable=unexpected-keyword-arg
Copy link
Member Author

Choose a reason for hiding this comment

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

I saw that pylint2.6.0 mishandles line-level disables which was true for me because it failed when I did

MessageToDict(message, including_default_value_fields=True,  # pylint: disable=unexpected-keyword-arg
                                         preserving_proto_field_name=True)  # type: ignore

so had to keep it here. this is only a lint error so I am suspecting our pylinter is a bit older and its way past time to update that.

@nizamial09
Copy link
Member Author

jenkins test dashboard

@nizamial09
Copy link
Member Author

jenkins test dashboard cephadm

@nizamial09
Copy link
Member Author

okay, I just saw that the ubuntu 24.04 is not compliant with the current version of flake8 and other test frameworks.. I am testing it with an ubuntu container. Will update this PR to reflect all those (otherwise its useless for the ubuntu migration).

The problem I saw was ubuntu has py3.12 which uses a newer version of importlib_metadata and that broke flake8.
PyCQA/flake8#1701

@nizamial09
Copy link
Member Author

Okay, as I started upgrading things, it requires a bigger migration so I am gonna open a separate PR just for those upgrades to make it easier for testing it and capturing issues..

Signed-off-by: Nizamudeen A <nia@redhat.com>
…ailure"

This reverts commit 1f84505.

Signed-off-by: Nizamudeen A <nia@redhat.com>
Signed-off-by: Nizamudeen A <nia@redhat.com>
Fixes: https://tracker.ceph.com/issues/70411
Signed-off-by: Nizamudeen A <nia@redhat.com>
Signed-off-by: Nizamudeen A <nia@redhat.com>
@nizamial09 nizamial09 requested a review from Pegonzal July 1, 2025 09:30
@nizamial09
Copy link
Member Author

jenkins test make check arm64

@nizamial09 nizamial09 merged commit 2dd02b5 into ceph:main Jul 2, 2025
15 checks passed
@nizamial09 nizamial09 deleted the xmlsec-fail-main branch July 2, 2025 04:40
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 2, 2025
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Jul 8, 2025
which brings in python3-saml and is not needed anymore after ceph#62239

Fixes: https://tracker.ceph.com/issues/70937
Signed-off-by: Nizamudeen A <nia@redhat.com>
nizamial09 added a commit to rhcs-dashboard/ceph that referenced this pull request Jul 9, 2025
which brings in python3-saml and is not needed anymore after ceph#62239

Fixes: https://tracker.ceph.com/issues/70937
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 7064294)
# distros; centos and ubuntu.
import os
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not just due to a mismatch. Protobuf3 C++ is broken with subinterpreters, and this workaround is needed when running with that version (e.g. Fedora). The Protobuf4 C++ implementation should work properly.

See: protocolbuffers/protobuf#10143

abitdrag pushed a commit to abitdrag/ceph that referenced this pull request Oct 21, 2025
which brings in python3-saml and is not needed anymore after ceph#62239

Fixes: https://tracker.ceph.com/issues/70937
Signed-off-by: Nizamudeen A <nia@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants