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

Add a Python 3.9 container (jsc#PED-10823) #1757

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

dirkmueller
Copy link
Member

For AppCol..

dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
Copy link

github-actions bot commented Sep 27, 2024

Created a staging project on OBS for 6: home:defolos:BCI:Staging:SLE-15-SP6:6-1757
Changes pushed to branch 6-1757 as commit 2b60db67457a30e89ee40fbbcfb8f1a180649776
Build succeeded ✅

Build Results

Repository images in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for x86_64: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for aarch64: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for s390x: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for ppc64le: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Repository containerfile in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for x86_64: current state: published
Build results:

package name status build log
sac-postfix-image ✅ succeeded live log
sac-python-3.9-image ✅ succeeded live log

Repository containerfile in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for aarch64: current state: published
Build results:

package name status build log
sac-postfix-image ✅ succeeded live log
sac-python-3.9-image ✅ succeeded live log

Repository containerfile in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for s390x: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Repository containerfile in home:defolos:BCI:Staging:SLE-15-SP6:6-1757 for ppc64le: current state: published
Build results:

package name status build log
sac-postfix-image ⛔ excluded live log
sac-python-3.9-image ⛔ excluded live log

Build succeeded ✅

To run BCI-tests against this PR, use the following command:

OS_VERSION=15.6 TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/sle-15-sp6/6-1757/ tox -- -n auto
The following images can be pulled from the staging project:
  • registry.opensuse.org/home/defolos/bci/staging/sle-15-sp6/6-1757/containerfile/containers/postfix:3.8
  • registry.opensuse.org/home/defolos/bci/staging/sle-15-sp6/6-1757/containerfile/containers/python:3

dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
@SUSE SUSE deleted a comment from github-actions bot Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
@SUSE SUSE deleted a comment from github-actions bot Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 27, 2024
dcermak pushed a commit that referenced this pull request Sep 30, 2024
dcermak pushed a commit that referenced this pull request Oct 1, 2024
dcermak pushed a commit that referenced this pull request Oct 1, 2024
dcermak pushed a commit that referenced this pull request Oct 1, 2024
dcermak pushed a commit that referenced this pull request Oct 1, 2024
dcermak pushed a commit that referenced this pull request Oct 1, 2024
Copy link
Collaborator

@dcermak dcermak left a comment

Choose a reason for hiding this comment

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

This is fine in principle. I've added a few suggestions how to improve the Registry classes and I'm not entirely happy with the amount of pass through methods. But it's a good start in the right direction, thank you!

src/bci_build/registry.py Outdated Show resolved Hide resolved
src/bci_build/registry.py Show resolved Hide resolved
src/bci_build/registry.py Outdated Show resolved Hide resolved
Comment on lines 69 to 87
def get_registry(container) -> RegistryABC:
"""Return the appropriate registry for the container."""
if container.os_version.is_tumbleweed:
return openSUSERegistry()
return SUSERegistry()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or allow to specify whether this is an appcol image and pass the os_version as a parameter instead of the container, that would allow to remove the duplication of None if os_version.is_tumbleweed else ApplicationCollectionRegistry()

Suggested change
def get_registry(container) -> RegistryABC:
"""Return the appropriate registry for the container."""
if container.os_version.is_tumbleweed:
return openSUSERegistry()
return SUSERegistry()
def get_registry(os_version: OsVersion, is_app_col: bool = False) -> RegistryABC:
"""Return the appropriate registry for the container."""
if os_version.is_tumbleweed:
return openSUSERegistry()
return ApplicationCollectionRegistry() if is_app_col else SUSERegistry()

Copy link
Member Author

@dirkmueller dirkmueller Oct 3, 2024

Choose a reason for hiding this comment

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

this was intentionally the way it is to reduce refactoring effort. using os_version means there are recursive imports

Copy link
Member Author

Choose a reason for hiding this comment

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

splitted into a new toplevel module.

@dirkmueller dirkmueller force-pushed the python39 branch 2 times, most recently from 3c6dbf8 to ebc5c8a Compare October 3, 2024 18:15
dcermak pushed a commit that referenced this pull request Oct 3, 2024
@SUSE SUSE deleted a comment from github-actions bot Oct 3, 2024
@SUSE SUSE deleted a comment from github-actions bot Oct 3, 2024
This removes a bit of if() condition wars in the BaseContainerImage
and delegates it into its own class hierarchy, which allows to
build a python container for appcol without having to do more
subclasses.
This is required to avoid cyclic imports between bci_build.package and
bci_build.registry.
rename get_registry to publish_registry and add a kwargs to set
that wether to prefer AppCollection.
dcermak pushed a commit that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants