Skip to content

Conversation

@dustymabe
Copy link
Member

With coreos/coreos-assembler#3930 we can now build multiple artifacts/platforms in a single OSBuild call. Let's add support here for detecting what artifacts are supported to be built by OSBuild and build them using OSBuild.

We segregate here "experimental" versus "stable" OSbuild built artifacts and add a pipecfg knob for opting into the "experimental" ones being built by OSBuild.

@dustymabe dustymabe marked this pull request as draft November 13, 2024 22:41
@dustymabe
Copy link
Member Author

unfortunately building more in OSBuild is causing us to need a larger cache qcow:

coreos/coreos-assembler#3942

@dustymabe
Copy link
Member Author

pushing up a new commit to see if we can make the linter happy - if it works I'll test it and squash.

@dustymabe
Copy link
Member Author

pushing up a new commit to see if we can make the linter happy - if it works I'll test it and squash.

I don't think making the linter happy is going to happen. There are plenty of other similar errors in the same file. I'm going to ignore since I already tested this code.

Copy link
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, but LGTM overall!

So is the idea here that the subsequent stages that build artifacts will still run but will no-op?

Comment on lines 435 to 444
def stable = shwrapCapture('''
cosa shell -- bash -c '
for buildextend in /usr/lib/coreos-assembler/cmd-buildextend-*; do
if [ "$(readlink -f ${buildextend})" == "/usr/lib/coreos-assembler/cmd-osbuild" ]; then
echo "${buildextend:42}"
fi
done
'
''').tokenize('\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I wonder if we should fold this itself into cosa osbuild. E.g. we could have cosa osbuild --supported-platforms=(all|experimental|stable).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would if we planned this code to live long.. but I'm hoping to delete it in 6 months or less.

@dustymabe
Copy link
Member Author

So is the idea here that the subsequent stages that build artifacts will still run but will no-op?

The platforms get removed from the list of artifacts to parallel buildextend on when they get built by OSBuild. So, no. The idea is that there isn't a no-op stage that happens later, however in practice right now both metal and metal4k will both run and get a no-op because the later code in this function force puts them back in when live is requested. That behavior will stop once we start building live using OSBuild too.

dustymabe added a commit to dustymabe/coreos-assembler that referenced this pull request Nov 14, 2024
With us now building more in OSBuild in a single run [1] we need
a larger cache2.qcow2 to hold more pipeline outputs concurrently.

[1] coreos/fedora-coreos-pipeline#1055
dustymabe added a commit to coreos/coreos-assembler that referenced this pull request Nov 14, 2024
With us now building more in OSBuild in a single run [1] we need
a larger cache2.qcow2 to hold more pipeline outputs concurrently.

[1] coreos/fedora-coreos-pipeline#1055
With coreos/coreos-assembler#3930 we can
now build multiple artifacts/platforms in a single OSBuild call.
Let's add support here for detecting what artifacts are supported
to be built by OSBuild and build them using OSBuild.

We segregate here "experimental" versus "stable" OSbuild built
artifacts and add a pipecfg knob for opting into the "experimental"
ones being built by OSBuild.
@dustymabe dustymabe marked this pull request as ready for review November 14, 2024 22:22
@dustymabe dustymabe merged commit 3e79eab into coreos:main Nov 14, 2024
1 of 2 checks passed
@dustymabe
Copy link
Member Author

dustymabe commented Nov 15, 2024

just reporting some results now that we are building applehv gcp and hyperv using OSBuild in rawhide:

$ python3 diffbuildsizes.py 42.20241114.91.0 42.20241115.91.0
    platform     | compression  | 42.20241114.91.0 | 42.20241115.91.0
---------------------------------------------------------------------
...
applehv          | compressed   | 880MiB           | 881MiB          
applehv          | uncompressed | 10240MiB         | N/A             
...
hyperv           | compressed   | 872MiB           | 873MiB          
hyperv           | uncompressed | 1960MiB          | N/A             
...
gcp              | compressed   | 872MiB           | 881MiB          
gcp              | uncompressed | 1721MiB          | N/A             

Note the uncompressed size doesn't show up in the OSBuild releases
because we determined having the uncompressed size and sha256 weren't
important enough to perform open heart surgery on OSBuild to compute
that information.

The results here show that things didn't significantly change with the move to OSBuild.

dustymabe added a commit to dustymabe/coreos-assembler that referenced this pull request Nov 22, 2024
In the case where we were running multiple parallel tasks in the
pipeline that were running VMs and accessing the cache qcow we
needed this, but with [1] we are now consolidating all OSBuild
pipeline tasks into single non-parallel invocations.

[1] coreos/fedora-coreos-pipeline#1055
dustymabe added a commit to dustymabe/coreos-assembler that referenced this pull request Nov 22, 2024
In the case where we were running multiple parallel tasks in the
pipeline that were running VMs and accessing the cache qcow we
needed this, but with [1] we are now consolidating all OSBuild
pipeline tasks into single non-parallel invocations.

[1] coreos/fedora-coreos-pipeline#1055
dustymabe added a commit to dustymabe/coreos-assembler that referenced this pull request Nov 23, 2024
In the case where we were running multiple parallel tasks in the
pipeline that were running VMs and accessing the cache qcow we
needed this, but with [1] we are now consolidating all OSBuild
pipeline tasks into single non-parallel invocations.

[1] coreos/fedora-coreos-pipeline#1055
dustymabe added a commit to coreos/coreos-assembler that referenced this pull request Nov 23, 2024
In the case where we were running multiple parallel tasks in the
pipeline that were running VMs and accessing the cache qcow we
needed this, but with [1] we are now consolidating all OSBuild
pipeline tasks into single non-parallel invocations.

[1] coreos/fedora-coreos-pipeline#1055
ravanelli pushed a commit to ravanelli/coreos-assembler that referenced this pull request Jan 15, 2025
In the case where we were running multiple parallel tasks in the
pipeline that were running VMs and accessing the cache qcow we
needed this, but with [1] we are now consolidating all OSBuild
pipeline tasks into single non-parallel invocations.

[1] coreos/fedora-coreos-pipeline#1055

(cherry picked from commit 5ab44b8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants