Skip to content

Commit

Permalink
fix(RHTAPBUGS-927): add image_id back when creating image in Pyxis (#77)
Browse files Browse the repository at this point in the history
The field is needed for image grading.

We did set this field in the past, but it was accidentally removed
when fixing RHTAPBUGS-756 .

Signed-off-by: Martin Malina <mmalina@redhat.com>
  • Loading branch information
mmalina authored Oct 30, 2023
1 parent 15bde66 commit b596085
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyxis/create_container_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def create_container_image(args, parsed_data: Dict[str, Any]):
}
],
"certified": json.loads(args.certified.lower()),
"image_id": docker_image_digest,
"architecture": parsed_data["architecture"],
"parsed_data": parsed_data,
}
Expand Down
3 changes: 3 additions & 0 deletions pyxis/test_create_container_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_create_container_image(mock_datetime, mock_post, mock_get_digest_field:
}
],
"certified": False,
"image_id": "some_digest",
"architecture": "ok",
"parsed_data": {"architecture": "ok"},
},
Expand Down Expand Up @@ -167,6 +168,7 @@ def test_create_container_image_latest(
}
],
"certified": False,
"image_id": "some_digest",
"architecture": "ok",
"parsed_data": {"architecture": "ok"},
},
Expand Down Expand Up @@ -222,6 +224,7 @@ def test_create_container_image_rh_push(
}
],
"certified": False,
"image_id": "some_digest",
"architecture": "ok",
"parsed_data": {"architecture": "ok"},
},
Expand Down

0 comments on commit b596085

Please sign in to comment.