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

Enable building for EL 9 and support Python 3.12 #855

Merged
merged 6 commits into from
Jul 17, 2024

Conversation

pirat89
Copy link
Member

@pirat89 pirat89 commented Apr 2, 2024

This patch enables building on EL9 along with the testing infrastructure and dev environment prepared for EL9 and EL10.

Included changes:

  • Enable EL9 builds in packit
  • Add build container for EL9
  • Add test container for EL10
  • Add tests on Python 3.12 on ubi10 (really it's ubi9) unit test GH action
  • Update Makefile to include the new containers
  • Handle deprecations in Python 3.12

Copy link

github-actions bot commented Apr 2, 2024

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

To launch regression testing public members of oamg organization can leave the following comment:

  • /rerun to schedule basic regression tests using this pr build and leapp-repository*master* as artifacts
  • /rerun 42 to schedule basic regression tests using this pr build and leapp-repository*PR42* as artifacts
  • /rerun-sst to schedule sst tests using this pr build and leapp-repository*master* as artifacts
  • /rerun-sst 42 to schedule sst tests using this pr build and leapp-repository*PR42* as artifacts

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@fernflower
Copy link
Member

/packit-build

@fernflower
Copy link
Member

/packit copr-build

@fernflower
Copy link
Member

@pirat89 You are missing packit refactor, please rebase against recent master

@pirat89
Copy link
Member Author

pirat89 commented Apr 2, 2024

@fernflower I guess that PEBKAC. I rebased, but I have a feel throw out all changes from master. I will take a look tomorrow. Thanks for the checking. It's pebkac - I just looked at leapp-repository instead :D thanks!

@fernflower
Copy link
Member

/packit copr-build

leapp/repository/__init__.py Outdated Show resolved Hide resolved
@Rezney Rezney force-pushed the poc-ipu-9-10 branch 4 times, most recently from 8ae1d5c to 143d268 Compare April 12, 2024 19:21
@matejmatuska
Copy link
Member

/packit copr-build

@matejmatuska matejmatuska force-pushed the poc-ipu-9-10 branch 2 times, most recently from 78c49a1 to 8befbed Compare July 12, 2024 11:45
@oamg oamg deleted a comment from packit-as-a-service bot Jul 12, 2024
@matejmatuska matejmatuska marked this pull request as ready for review July 12, 2024 11:54
@matejmatuska matejmatuska changed the title Starting initial draft commit for building for EL 9 Enable building for EL 9 and support Python 3.12 Jul 12, 2024
@matejmatuska
Copy link
Member

/rerun

pirat89 and others added 2 commits July 17, 2024 15:45
This is initial commit delivering some ground work needed for leapp
to be able to work with Python3.12 on EL 9 systems and prepare
testing.

Most of the work has been delivered by Matej Matuska (thanks!!)

Summary of changes:
* Add el9 build container
* Add fake RHEL 10 container for local containerized tests

  As RHEL 10 UBI isn't available yet, use RHEL 9 UBI with Python 3.12
  virtualenv.
  The container manually updates the pytest and six modules after
  installing requirements as the currently used pytest version is too old
  for Python 3.12.
  setup() functions defined at module level are unsupported in the newer
  pytest versions, these are replaced by autouse=True fixtures.

* Makefile: include new EL and Fedora containers for tests and builds
* Packit: build automatically for epel-9-x86_64

Co-authored-by: Matej Matuska <mmatuska@redhat.com>
The find_module function has been deprecated for a long time and
it has been removed in Python3.12. To keep the backward compatibility,
we introduce compat.load_module() function that is compatible with
Python2.7 -> Python3.12 now. Replacing all previous load of module
in code by this function.

Similar applies for the pkgutil.get_loader()

Co-authored-by: Matej Matuska <mmatuska@redhat.com>
Rezney and others added 4 commits July 17, 2024 15:58
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'
Currently the fake RHEL 10 container is used (based on ubi9).
@pirat89
Copy link
Member Author

pirat89 commented Jul 17, 2024

All changes seems good to me and last two unfinished tests are possibly broken - I haven't been able to pass them in last 20+ hours. Seems that all required changes have been delivered.

@pirat89 pirat89 merged commit 0b00cc6 into oamg:master Jul 17, 2024
19 of 21 checks passed
@pirat89 pirat89 added the changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant label Jul 17, 2024
pirat89 added a commit to pirat89/leapp that referenced this pull request Aug 16, 2024
## Packaging
- Start building for EL 9 in the upstream repository on COPR (oamg#855)

## Framework
### Enhancements
- Minor update in the summary overview to highlight what is present in the pre-upgrade report (oamg#858)
- Store metadata about actors, workflows, and dialogs inside leapp audit db (oamg#847, oamg#867)

## Leapp (tool)
### Enhancements
- Implement singleton leapp execution to prevent multiple running leapp instances on the system in the same time (oamg#851)

## stdlib
### Fixes
- Close properly all file descriptors when executing shell commands via `run` (oamg#880)

## Modifications
- Code is now Python3.12 compatible (oamg#855)
@pirat89 pirat89 mentioned this pull request Aug 16, 2024
pirat89 added a commit that referenced this pull request Aug 16, 2024
## Packaging
- Start building for EL 9 in the upstream repository on COPR (#855)

## Framework
### Enhancements
- Minor update in the summary overview to highlight what is present in the pre-upgrade report (#858)
- Store metadata about actors, workflows, and dialogs inside leapp audit db (#847, #867)

## Leapp (tool)
### Enhancements
- Implement singleton leapp execution to prevent multiple running leapp instances on the system in the same time (#851)

## stdlib
### Fixes
- Close properly all file descriptors when executing shell commands via `run` (#880)

## Modifications
- Code is now Python3.12 compatible (#855)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants