coreos / coreos/coreos-assembler

`cosa buildfetch --build` followed by `cosa build` errors out

Open
#2,870 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
393
Forks
193
Avg merge
17h 6m
Merged PRs (30d)
5

Description

Bug Report

Environment

What operating system is being used to run coreos-assembler?

Fedora 35 SB

What operating system is being assembled?

FCOS 36 testing-devel

Is coreos-assembler running in Podman or Docker?

podman

If Podman, is coreos-assembler running privileged or unprivileged?

unprivileged

Expected Behavior

Successful build of FCOS

Actual Behavior

Committing... done
Metadata Total: 8925
Metadata Written: 3016
Content Total: 6475
Content Written: 1468
Content Cache Hits: 16388
Content Bytes Written: 139680221
3016 metadata, 19658 content objects imported; 1.4 GB content written                                                                                                                                                                                           
fedora/x86_64/coreos/testing-devel => 8f6b0bd330a23745cb82012fc803dac3fe020ac86b11437edaacfe64dce55e3d
New image input checksum: 768a3a37b5064dbc7c460fe693834200373d7f250402ceafa6b0f6fe748de7ee
Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/usr/lib/coreos-assembler/cosalib/builds.py", line 134, in init_build_meta_json
    with open(metapath) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/srv/builds/36.20220520.20.0/x86_64/meta.json'

In this case, 36.20220520.20.0 is the most recent build ID available from testing-devel.

Reproduction Steps

  1. cosa init https://github.com/coreos/fedora-coreos-config
  2. cosa buildfetch --build 36.20220516.20.1 --url s3://fcos-builds/prod/streams/testing-devel/builds
  3. cosa fetch && cosa build

Other Information

Not sure if this should be strictly supported, since cosa build has the --parent-build option. But we should probably more gracefully handle this condition.

Also of note, if cosa build --parent-build is used, we don't get the pkg diff between the two commits:

Committing... done
Metadata Total: 8925
Metadata Written: 16
Content Total: 6474
Content Written: 12
Content Cache Hits: 16389
Content Bytes Written: 104138319
16 metadata, 12 content objects imported; 104.1 MB content written                                                                                                                                                                                             
fedora/x86_64/coreos/testing-devel => bbd835bab6555ca55f06995243764f565eacb88458eec88cb6abe21721c1c9ae
New image input checksum: b73c78cd6fac8ff5b95595391cb653a21712ae84655c0c569de73c87467a1124
None
New build ID: 36.20220521.dev.3
Running:  ostree container encapsulate --copymeta=rpmostree.inputhash --repo=/srv/tmp/repo --label=coreos-assembler.image-config-checksum=5e91c8035ea0739c88e5b3cbe5e11fb2d3742c621559d6503f1f6f09d35bebea --label=coreos-assembler.image-input-checksum=b73c78cd6fac8ff5b95595391cb653a21712ae84655c0c569de73c87467a1124 --label=org.opencontainers.image.source=https://github.com/coreos/fedora-coreos-config --label=org.opencontainers.image.revision=6181d7f2a61d5426b78575804f82fa1867204899 36.20220521.dev.3 oci-archive:fedora-coreos-36.20220521.dev.3-ostree.x86_64.ociarchive.tmp:latest
sha256:fdf8400222776529f6538e35a539d695dd0592501d5c4610617b793e483dbf2d
Total objects: 22965
Deleted 84 objects, 279.0 MB freed
Ignoring non-directory /srv/builds/.build-commit

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sequence in the issue with cosa init, buildfetch, fetch, and build, then inspect cosalib/builds.py at init_build_meta_json and the reported missing meta.json path. Check how the --parent-build variant handles package differences. Done means the condition is handled gracefully and the documented build workflow no longer errors unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.