Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treefile: Support arch-include #1886

Merged
merged 4 commits into from
Aug 21, 2019
Merged

Conversation

cgwalters
Copy link
Member

A long time ago we added architecture-specific package lists
via e.g. packages-ppc64le. Much more recently we added
support for having the include key be a list - multiple includes.

By combining these two and supporting architecture-conditional includes,
we've effectively added architecture-conditionals to all keys.

Notably we want this for Fedora CoreOS today which is using
remove-from-packages on grub2-tools which isn't present on
s390x.

cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Aug 20, 2019
The package is only present on `x86_64` and `aarch64` and previously
we'd error out.

Requires: coreos/rpm-ostree#1886
@cgwalters
Copy link
Member Author

No tests yet, will do soon, but I did test this manually with coreos/fedora-coreos-config#149

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.

Nice, I like that idea.

rust/src/treefile.rs Show resolved Hide resolved
docs/manual/treefile.md Outdated Show resolved Hide resolved
object should be the name of an architecture, and the `include` value
functions the same as the `include` key above - it can be either
a single string, or an array of strings - and it has the same semantics.
`arch-include` is processed after `include`.
Copy link
Member

Choose a reason for hiding this comment

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

To be more explicit here, how about: "Entries which match the $basearch of the target platform are processed after the regular include" ?

Have each test clearly hold its tempdir; this way we can have a simple
helper function rather than a struct with an unreferenced parameter.

Also use `utils::write_file`.

Prep for further test work.
Prep for adding an arch include test.
@cgwalters cgwalters force-pushed the arch-includes branch 2 times, most recently from e5fedcb to 69ea48e Compare August 20, 2019 21:14
@cgwalters
Copy link
Member Author

Updated 🆕 with tests!

@alicefr
Copy link

alicefr commented Aug 21, 2019

@barthy1 @tuan-hoang1 and just in case @ausil @jcajka

@cgwalters cgwalters requested a review from dustymabe August 21, 2019 13:38
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

disclaimer: I don't really know any rust so this is a superficial review from me.

Just one comment that would help the docs. LGTM

functions the same as the `include` key above - it can be either
a single string, or an array of strings - and it has the same semantics.
Entries which match `arch-include` are processed after `include`.

Copy link
Member

Choose a reason for hiding this comment

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

could we get an example like is done below for add-files ? For me it really came together after I looked at the related FCOS PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, done.

(Although of course bigger picture part of the idea here is that the FCOS config becomes also the reference treefile; we don't want most people writing them from scratch anyways)

A long time ago we added architecture-specific package lists
via e.g. `packages-ppc64le`.  Much more recently we added
support for having the `include` key be a list - multiple includes.

By combining these two and supporting architecture-conditional includes,
we've effectively added architecture-conditionals to *all* keys.

Notably we want this for Fedora CoreOS today which is using
`remove-from-packages` on `grub2-tools` which isn't present on
s390x.
@dustymabe
Copy link
Member

@rh-atomic-bot r+

@rh-atomic-bot
Copy link

📌 Commit 606e3ee has been approved by dustymabe

@rh-atomic-bot
Copy link

⌛ Testing commit 606e3ee with merge 77f1d4f...

rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Have each test clearly hold its tempdir; this way we can have a simple
helper function rather than a struct with an unreferenced parameter.

Also use `utils::write_file`.

Prep for further test work.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Prep for adding an arch include test.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
A long time ago we added architecture-specific package lists
via e.g. `packages-ppc64le`.  Much more recently we added
support for having the `include` key be a list - multiple includes.

By combining these two and supporting architecture-conditional includes,
we've effectively added architecture-conditionals to *all* keys.

Notably we want this for Fedora CoreOS today which is using
`remove-from-packages` on `grub2-tools` which isn't present on
s390x.

Closes: #1886
Approved by: dustymabe
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@dustymabe
Copy link
Member

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 606e3ee with merge 59952f2...

rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Have each test clearly hold its tempdir; this way we can have a simple
helper function rather than a struct with an unreferenced parameter.

Also use `utils::write_file`.

Prep for further test work.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Prep for adding an arch include test.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
A long time ago we added architecture-specific package lists
via e.g. `packages-ppc64le`.  Much more recently we added
support for having the `include` key be a list - multiple includes.

By combining these two and supporting architecture-conditional includes,
we've effectively added architecture-conditionals to *all* keys.

Notably we want this for Fedora CoreOS today which is using
`remove-from-packages` on `grub2-tools` which isn't present on
s390x.

Closes: #1886
Approved by: dustymabe
@dustymabe
Copy link
Member

Trying to pull docker://quay.io/coreos-assembler/coreos-assembler:latest...Getting image source signatures
Copying blob sha256:298301e62e138f9d94d0ad03ef94205f2f00a8b8a42618a3924b13817aaef508
Copying blob sha256:325b83b06e862042b689382a70da44c8a23386916a7737f4be70006835b579de
Copying blob sha256:6187bd2fd000baae1059af5cb677876ca2c30699b200ab0658c855582b33c0ba
Copying blob sha256:a5c83f72047b13fd522244ce0ffea95fd1beb9c84a1b710c88a194ef1262d342
Copying blob sha256:55e0fb907d7235e433c05e2979001175a0c00e0a8c9b97d8f5cff5fed37ac1b8
Copying blob sha256:f8c4d255d431d01bfa74a5258d5a801ed9f8b6f67c8deafcd861460f6c547e58
Copying blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
Copying blob sha256:5e8fc0dfecd3b270f366b367db5a8fdad1f9c2ff2de104a336b5f1765b66fe57
Copying blob sha256:fe37e9fbb8c8192cdb2d904572f9ecb8d55ac60f07742b78e1824fb08bfe4247
Copying blob sha256:28fc9a613463d3c9083679e1cc2cc00f14150576a0a14bad46be8cd2a5b114fd
Copying blob sha256:07e90dbef7f366cec5bdd008b3b4e700dea36d939657cb8283c58008768684b3
Copying blob sha256:76d945e9d86dcd1c012f7ce6cf7084d6c665e65c3f552742f4057f1c71ecfab3
Copying blob sha256:c622094498be12490c47da40a1a76ebd0b7c54c4711a9e0989b620cce7bee7af
Copying blob sha256:d73790f62a516b7a086792dc4e6abbf970cd222d505d8e1b320ac08165884ef5
Copying blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
Copying blob sha256:36adc34a4dfefa82d558f339a6d59a06528a89491a6d16778656f62cb7cd5a5e
Copying blob sha256:b51b920286ae6b8b372c180f52defde7d176486f59441075e614fc75539b66be
Copying blob sha256:71dcede2d766029e967fa046fcb4dc93e26e8a35d6c0c301a762c50d563c9367
Copying blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
Copying blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
### TIMED OUT AFTER 3600s

Should we increase the timeout?

@cgwalters
Copy link
Member Author

This is probably another internal OpenStack performance regression. If it's taking an hour just to pull the container image, we'd need to massively bump the timeout.

Really need to use bare metal machines for our CI consistently.

@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

Looks like another OpenStack perf regression.
@cgwalters
Copy link
Member Author

Well, that one got farther. Bumped to two hours.

@rh-atomic-bot r=dustymabe ff55a0c

@rh-atomic-bot
Copy link

⌛ Testing commit ff55a0c with merge 8738ca6...

rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Have each test clearly hold its tempdir; this way we can have a simple
helper function rather than a struct with an unreferenced parameter.

Also use `utils::write_file`.

Prep for further test work.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Prep for adding an arch include test.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
A long time ago we added architecture-specific package lists
via e.g. `packages-ppc64le`.  Much more recently we added
support for having the `include` key be a list - multiple includes.

By combining these two and supporting architecture-conditional includes,
we've effectively added architecture-conditionals to *all* keys.

Notably we want this for Fedora CoreOS today which is using
`remove-from-packages` on `grub2-tools` which isn't present on
s390x.

Closes: #1886
Approved by: dustymabe
rh-atomic-bot pushed a commit that referenced this pull request Aug 21, 2019
Looks like another OpenStack perf regression.

Closes: #1886
Approved by: dustymabe
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

OK, at least the cosa test passed now, but other tests timed out. I'm force merging for now.

@cgwalters cgwalters merged commit 7db30fe into coreos:master Aug 21, 2019
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Aug 23, 2019
The package is only present on `x86_64` and `aarch64` and previously
we'd error out.

Requires: coreos/rpm-ostree#1886
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Aug 23, 2019
The package isn't present on s390x and previously we'd we'd error out.

This is really a hack; I think the better fix would be to move
that stuff out of the low-level `grub2-tools` package.

Requires: coreos/rpm-ostree#1886
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Aug 26, 2019
The package isn't present on s390x and previously we'd we'd error out.

This is really a hack; I think the better fix would be to move
that stuff out of the low-level `grub2-tools` package.

Requires: coreos/rpm-ostree#1886
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Sep 9, 2019
The package isn't present on s390x and previously we'd we'd error out.

This is really a hack; I think the better fix would be to move
that stuff out of the low-level `grub2-tools` package.

Requires: coreos/rpm-ostree#1886
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Sep 9, 2019
The package isn't present on s390x and previously we'd we'd error out.

This is really a hack; I think the better fix would be to move
that stuff out of the low-level `grub2-tools` package.

Requires: coreos/rpm-ostree#1886
cgwalters added a commit to coreos/fedora-coreos-config that referenced this pull request Sep 10, 2019
The package isn't present on s390x and previously we'd we'd error out.

This is really a hack; I think the better fix would be to move
that stuff out of the low-level `grub2-tools` package.

Requires: coreos/rpm-ostree#1886
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.

5 participants