Preparatory cleanup bits for work on https://pagure.io/releng/issue/11047 #11120

Merged
jnsamyak merged 4 commits from sync-script-cleanups into main 2026-06-08 03:11:03 +00:00
Contributor

scripts/sync-container: Deduplicate assignment of registries

Prep for further work.

Signed-off-by: Colin Walters walters@verbum.org


scripts/sync-container: Consolidate assignments

Having the minimal_build_name = right before the comparison
for build_name was just confusing.

Signed-off-by: Colin Walters walters@verbum.org


scripts/sync-container: Dedup copy code

Prep for further work

Signed-off-by: Colin Walters walters@verbum.org


scripts/sync-container: Deduplicate manifest list code

Prep for further work.

Signed-off-by: Colin Walters walters@verbum.org


scripts/sync-container: Deduplicate assignment of registries Prep for further work. Signed-off-by: Colin Walters <walters@verbum.org> --- scripts/sync-container: Consolidate assignments Having the `minimal_build_name = ` right before the comparison for `build_name` was just confusing. Signed-off-by: Colin Walters <walters@verbum.org> --- scripts/sync-container: Dedup copy code Prep for further work Signed-off-by: Colin Walters <walters@verbum.org> --- scripts/sync-container: Deduplicate manifest list code Prep for further work. Signed-off-by: Colin Walters <walters@verbum.org> ---
Author
Contributor

(The first two commits here are least risky and could be peeled off separately even)

(The first two commits here are least risky and could be peeled off separately even)
Author
Contributor

Ping?

Ping?
First-time contributor

I don't have commit access here, but the changes look well contained and good to me.

@cverna you've merged things in this repo before, could you have a look?

I don't have commit access here, but the changes look well contained and good to me. @cverna you've merged things in this repo before, could you have a look?
Owner

rebased onto db0cc0063a

rebased onto db0cc0063a09bf4aef6f76b9c6fa3fe8987ebcd5
Owner

It looks ok to me too. Lets merge.

It looks ok to me too. Lets merge.
Owner

Pull-Request has been merged by kevin

Pull-Request has been merged by kevin
Author
Contributor

Thanks! Is there a place I can see the logs from this process?

Thanks! Is there a place I can see the logs from this process?
Owner

Yep. Should be at the end of the output from the rawhide compose in the 'releng-cron' mailing list.

Here's todays:

https://lists.fedoraproject.org/archives/list/releng-cron@lists.fedoraproject.org/thread/G5RPFEQR4XKSCKDVEM5PGY7HGHRF2ANL/

Yep. Should be at the end of the output from the rawhide compose in the 'releng-cron' mailing list. Here's todays: https://lists.fedoraproject.org/archives/list/releng-cron@lists.fedoraproject.org/thread/G5RPFEQR4XKSCKDVEM5PGY7HGHRF2ANL/
Author
Contributor

OK...I think it worked?

That said one major problem with this script today is that it doesn't use set -e and so will happily plow forward on errors...and it looks to me like we may kind of be relying on that in the case where some container images aren't built on some architectures.

OK...I think it worked? That said one major problem with this script today is that it doesn't use `set -e` and so will happily plow forward on errors...and it looks to me like we may kind of be relying on that in the case where some container images aren't built on some architectures.
Owner

One odd thing... the 'rawhide' tag seems to have gone missing. ;( Could it be related to this change?

One odd thing... the 'rawhide' tag seems to have gone missing. ;( Could it be related to this change?
Author
Contributor

From the logs:

xz: Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar.xz: No such file or directory
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory"
xz: Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar.xz: No such file or directory
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory"
xz: Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar.xz: No such file or directory
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory"
time="2022-12-05T12:17:30Z" level=fatal msg="initializing source
docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file
\"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open
Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory"

So yes, possibly. Please feel free to revert for now. As I've been working on adding the ostree-container stuff into this script I am just thinking that it will make more sense to have a separate script.

From the logs: ``` xz: Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar.xz: No such file or directory time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.ppc64le.tar: no such file or directory" xz: Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar.xz: No such file or directory time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.s390x.tar: no such file or directory" xz: Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar.xz: No such file or directory time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory" time="2022-12-05T12:17:30Z" level=fatal msg="initializing source docker-archive:Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: opening file \"Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar\": open Fedora-Container-Base-Rawhide-20221130.n.0.x86_64.tar: no such file or directory" ``` So yes, possibly. Please feel free to revert for now. As I've been working on adding the ostree-container stuff into this script I am just thinking that it will make more sense to have a separate script.
Member

That said one major problem with this script today is that it doesn't use set -e and so will happily plow forward on errors...and it looks to me like we may kind of be relying on that in the case where some container images aren't built on some architectures.

koji latest-build will download the latest successful build which for all releases except rawhide means having all the architectures. But yeah we should definitely add set -e to exit on errors.

One odd thing... the 'rawhide' tag seems to have gone missing. ;( Could it be related to this change?

rawhide builds don't fail if an architecture fails so we had a build with only aarch64 and this was pushed to the rawhide tag and since we use a manifest list we don't have any matching images for x86 or other architecture.
Maybe we should require rawhide builds to have all architecture to be successful to avoid this in the future?

> That said one major problem with this script today is that it doesn't use `set -e` and so will happily plow forward on errors...and it looks to me like we may kind of be relying on that in the case where some container images aren't built on some architectures. `koji latest-build` will download the latest `successful` build which for all releases except rawhide means having all the architectures. But yeah we should definitely add `set -e` to exit on errors. > One odd thing... the 'rawhide' tag seems to have gone missing. ;( Could it be related to this change? rawhide builds don't fail if an architecture fails so we had a build with only aarch64 and this was pushed to the rawhide tag and since we use a manifest list we don't have any matching images for x86 or other architecture. Maybe we should require rawhide builds to have all architecture to be successful to avoid this in the future?
Member

I did a manual run to push the rawhide and I had the following failures, i reverted the commits locally and I can try to look at this into more details tomorrow.

Push manifest to registry.fedoraproject.org
tag is set: rawhide
untagged: registry.fedoraproject.org/fedora:rawhide
99fe2a27cbc66b55069b5336f61234daa780391d7208f27e3e780920be02d877
Error: invalid reference format
Getting image list signatures
Copying 0 of 0 images in list
Writing manifest list to image destination
Storing list signatures
Error: 1 error occurred:
	* invalid reference format


Error: encountered while expanding image name "registry.fedoraproject.org/fedora:": parsing name "registry.fedoraproject.org/fedora:": cannot parse input: "registry.fedoraproject.org/fedora:": invalid reference format
Error: invalid reference format
Push manifest to candidate-registry.fedoraproject.org
tag is set: rawhide
untagged: candidate-registry.fedoraproject.org/fedora:rawhide
0470d7d675e313d61eba59b58ff44947d4eb7dd09f9c44f25570c87ab76878dd
Error: invalid reference format
Getting image list signatures
Copying 0 of 0 images in list
Writing manifest list to image destination
Storing list signatures
Error: 1 error occurred:
	* invalid reference format


Error: encountered while expanding image name "candidate-registry.fedoraproject.org/fedora:": parsing name "candidate-registry.fedoraproject.org/fedora:": cannot parse input: "candidate-registry.fedoraproject.org/fedora:": invalid reference format
Error: invalid reference format
Push manifest to quay.io/fedora
tag is set: rawhide
untagged: quay.io/fedora/fedora:rawhide
27db992635fb71d81c578ee782443976ae956d7060e3771e446ed94bb2ae316d
Error: invalid reference format
Getting image list signatures
Copying 0 of 0 images in list
Writing manifest list to image destination
Storing list signatures
Error: 1 error occurred:
	* invalid reference format


Error: encountered while expanding image name "quay.io/fedora/fedora:": parsing name "quay.io/fedora/fedora:": cannot parse input: "quay.io/fedora/fedora:": invalid reference format
Error: invalid reference format
Removing temporary directory

I did a manual run to push the rawhide and I had the following failures, i reverted the commits locally and I can try to look at this into more details tomorrow. ``` Push manifest to registry.fedoraproject.org tag is set: rawhide untagged: registry.fedoraproject.org/fedora:rawhide 99fe2a27cbc66b55069b5336f61234daa780391d7208f27e3e780920be02d877 Error: invalid reference format Getting image list signatures Copying 0 of 0 images in list Writing manifest list to image destination Storing list signatures Error: 1 error occurred: * invalid reference format Error: encountered while expanding image name "registry.fedoraproject.org/fedora:": parsing name "registry.fedoraproject.org/fedora:": cannot parse input: "registry.fedoraproject.org/fedora:": invalid reference format Error: invalid reference format Push manifest to candidate-registry.fedoraproject.org tag is set: rawhide untagged: candidate-registry.fedoraproject.org/fedora:rawhide 0470d7d675e313d61eba59b58ff44947d4eb7dd09f9c44f25570c87ab76878dd Error: invalid reference format Getting image list signatures Copying 0 of 0 images in list Writing manifest list to image destination Storing list signatures Error: 1 error occurred: * invalid reference format Error: encountered while expanding image name "candidate-registry.fedoraproject.org/fedora:": parsing name "candidate-registry.fedoraproject.org/fedora:": cannot parse input: "candidate-registry.fedoraproject.org/fedora:": invalid reference format Error: invalid reference format Push manifest to quay.io/fedora tag is set: rawhide untagged: quay.io/fedora/fedora:rawhide 27db992635fb71d81c578ee782443976ae956d7060e3771e446ed94bb2ae316d Error: invalid reference format Getting image list signatures Copying 0 of 0 images in list Writing manifest list to image destination Storing list signatures Error: 1 error occurred: * invalid reference format Error: encountered while expanding image name "quay.io/fedora/fedora:": parsing name "quay.io/fedora/fedora:": cannot parse input: "quay.io/fedora/fedora:": invalid reference format Error: invalid reference format Removing temporary directory ```
Member

Needed a small fix https://pagure.io/releng/pull-request/11179# but it is now in production and working

Needed a small fix https://pagure.io/releng/pull-request/11179# but it is now in production and working
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
releng/tickets!11120
No description provided.