From 3aae5e31443e0794ec72ca0bba1ac6314b8aa6f3 Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Mon, 1 Dec 2025 15:38:40 -0500 Subject: [PATCH 1/2] Account for self.config_blob potentially being Null closes #2122 (cherry picked from commit 0057a979082df3ea61ef394524576c46dc244259) --- CHANGES/2122.bugfix | 1 + pulp_container/app/models.py | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 CHANGES/2122.bugfix diff --git a/CHANGES/2122.bugfix b/CHANGES/2122.bugfix new file mode 100644 index 000000000..ab8ce4489 --- /dev/null +++ b/CHANGES/2122.bugfix @@ -0,0 +1 @@ +Fix an `AttributeError` issue that most commonly appears when running the `container-handle-image-data` management command. \ No newline at end of file diff --git a/pulp_container/app/models.py b/pulp_container/app/models.py index 626330aac..d4e440a63 100644 --- a/pulp_container/app/models.py +++ b/pulp_container/app/models.py @@ -228,12 +228,11 @@ def init_architecture_and_os(self): if self.json_manifest.get("architecture", None) or self.json_manifest.get("os", None): self.architecture = self.json_manifest.get("architecture", None) self.os = self.json_manifest.get("os", None) - return - - config_artifact = self.config_blob._artifacts.get() - config_data, _ = get_content_data(config_artifact) - self.architecture = config_data.get("architecture", None) - self.os = config_data.get("os", None) + elif self.config_blob: + config_artifact = self.config_blob._artifacts.get() + config_data, _ = get_content_data(config_artifact) + self.architecture = config_data.get("architecture", None) + self.os = config_data.get("os", None) def init_compressed_image_size(self): # manifestv2 schema1 has only blobSum definition for each layer From 5e6073278a31b27116d47e5449a9a39c1d16e7a4 Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Tue, 16 Dec 2025 14:49:12 -0500 Subject: [PATCH 2/2] Fix pycares incompatibility issue --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 9cc78f48f..e9f16209e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ dependencies = [ "jsonschema>=4.4,<4.24", "pulpcore>=3.73.0,<3.85", "pyjwt[crypto]>=2.4,<2.11", + "pycares<4.9", # pycares==4.9 + aiodns==3.2.0 + python<3.12 = trouble ] [project.urls]