Skip to content

Commit

Permalink
Merge pull request #153 from Cray-HPE/release/3.21.0
Browse files Browse the repository at this point in the history
Release/3.21.0 - fix arch type in image delete
  • Loading branch information
dlaine-hpe authored Dec 10, 2024
2 parents 0c75bc3 + 742f241 commit fd8f3da
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.21.0] - 2024-12-10
### Fixed
- CASMCMS-9166 - fix image delete/undelete preserving arch setting.

### Dependencies
- Update ims-utils to pick up CASMCMS-9037
- Update ims-sshd to pick up CASMCMS-9226

## [3.20.0] - 2024-10-18
### Changed
- CASMTRIAGE-7401 - anti-affinity in the job pods.
Expand Down
12 changes: 8 additions & 4 deletions src/server/v3/resources/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ def delete(self):
# TODO ADD IMAGE FILTER OPTIONS

deleted_image = V3DeletedImageRecord(name=image.name, link=image.link,
id=image.id, created=image.created)
id=image.id, created=image.created,
arch=image.arch)
if deleted_image.link:
try:
artifacts, _ = self._soft_delete_manifest_and_artifacts(log_id, image_id, image.link)
Expand Down Expand Up @@ -311,7 +312,8 @@ def delete(self, image_id):

try:
image = current_app.data[self.images_table][image_id]
deleted_image = V3DeletedImageRecord(name=image.name, link=image.link, id=image.id, created=image.created)
deleted_image = V3DeletedImageRecord(name=image.name, link=image.link, id=image.id,
arch=image.arch, created=image.created)
if deleted_image.link:
try:
artifacts, _ = self._soft_delete_manifest_and_artifacts(log_id, image_id, image.link)
Expand Down Expand Up @@ -485,7 +487,8 @@ def patch(self):
# TODO ADD IMAGE FILTER OPTIONS

image = V2ImageRecord(name=deleted_image.name, link=deleted_image.link,
id=deleted_image.id, created=deleted_image.created)
id=deleted_image.id, created=deleted_image.created,
arch=deleted_image.arch)
for key, value in list(json_data.items()):
if key == "operation":
if value == PATCH_OPERATION_UNDELETE:
Expand Down Expand Up @@ -596,7 +599,8 @@ def patch(self, deleted_image_id):

deleted_image = current_app.data[self.deleted_images_table][deleted_image_id]
image = V2ImageRecord(name=deleted_image.name, link=deleted_image.link,
id=deleted_image.id, created=deleted_image.created)
id=deleted_image.id, created=deleted_image.created,
arch=deleted_image.arch)
for key, value in list(json_data.items()):
if key == "operation":
if value == PATCH_OPERATION_UNDELETE:
Expand Down
4 changes: 2 additions & 2 deletions update_external_versions.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
image: cray-ims-utils
major: 2
minor: 14
minor: 15

image: cray-ims-kiwi-ng-opensuse-x86_64-builder
major: 1
minor: 8

image: cray-ims-sshd
major: 1
minor: 11
minor: 12

0 comments on commit fd8f3da

Please sign in to comment.