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.rs: Deny unknown fields by default #1459

Closed

Conversation

cgwalters
Copy link
Member

Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored. This actually caught a bug
in a YAML usage we had:

error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.
cgwalters added a commit to cgwalters/os that referenced this pull request Jul 13, 2018
I was going to do some treefile changes, ended up doing
coreos/rpm-ostree#1459
which turned up the bug in this repo.

Let's actually fix it by just installing all languages.
I'd actually like to do man pages too, but that will come separately
after discussion.
cgwalters added a commit to cgwalters/os that referenced this pull request Jul 13, 2018
I was going to do some treefile changes, ended up doing
coreos/rpm-ostree#1459
which turned up the bug in this repo.

Let's actually fix it by just installing all languages.
I'd actually like to do man pages too, but that will come separately
after discussion.
cgwalters added a commit to cgwalters/os that referenced this pull request Jul 16, 2018
I was going to do some treefile changes, ended up doing
coreos/rpm-ostree#1459
which turned up the bug in this repo.
@jlebon
Copy link
Member

jlebon commented Jul 17, 2018

Hmm, this also means that treefiles that use newer keys will no longer work with older rpm-ostree versions... which I think makes sense, so 👍.

@rh-atomic-bot r+ 6bb864e

@rh-atomic-bot
Copy link

⌛ Testing commit 6bb864e with merge 56b59e1...

rh-atomic-bot pushed a commit that referenced this pull request Jul 17, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 6bb864e with merge 046bb35...

rh-atomic-bot pushed a commit that referenced this pull request Jul 17, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member

jlebon commented Jul 17, 2018

Looks like an rpmmd race.
@rh-atomic-bot retry

@cgwalters
Copy link
Member Author

error: Failed to load YAML treefile: unknown field packages-aarch64

Ah yes...this is the issue I was trying to fix.

@rh-atomic-bot
Copy link

⌛ Testing commit 6bb864e with merge 7e00eb7...

rh-atomic-bot pushed a commit that referenced this pull request Jul 17, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

OK so for now I removed the arch bits, as we weren't actually testing them in the compose tests in either case (JSON/YAML). I'll do a separate PR for parsing the arch-specific packages in the YAML path?

@jlebon
Copy link
Member

jlebon commented Jul 17, 2018

Yeah, SGTM!
@rh-atomic-bot r+ 5a44359

@rh-atomic-bot
Copy link

⌛ Testing commit 5a44359 with merge 6473164...

rh-atomic-bot pushed a commit that referenced this pull request Jul 17, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

error: Finalizing rootfs: During kernel processing: linkat(usr/lib/ostree-boot/vmlinuz-4.17.6-200.fc28.x86_64-28ab014de136b14a3a3618ab408e0d45584e4118cf9c20333af9a79ac9d0a7b2): No such file or directory

Hmm.

"packages-ppc64le": ["grub2", "ostree-grub2"],

"packages-x86_64": ["grub2", "grub2-efi", "ostree-grub2",
"efibootmgr", "shim"],
Copy link
Member

Choose a reason for hiding this comment

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

Ahh, we need to merge the x86_64 list back into packages for now probably.

@jlebon
Copy link
Member

jlebon commented Jul 18, 2018

@rh-atomic-bot r+ 40e3d8b

@rh-atomic-bot
Copy link

⌛ Testing commit 40e3d8b with merge 8a585a1...

rh-atomic-bot pushed a commit that referenced this pull request Jul 18, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon jlebon force-pushed the yaml-treefile-arch-packages branch from 40e3d8b to 654e849 Compare July 19, 2018 15:28
@jlebon
Copy link
Member

jlebon commented Jul 19, 2018

@rh-atomic-bot r+ 654e849

@rh-atomic-bot
Copy link

⌛ Testing commit 654e849 with merge 710aae0...

rh-atomic-bot pushed a commit that referenced this pull request Jul 19, 2018
Let's not make the same mistake we did with JSON where typoing a
field means it's silently ignored.  This actually caught a bug
in a YAML usage we had:

```
error: Failed to load YAML treefile: unknown field `install_langs`, expected one of ... `install-langs` ...
```

Yes, this is a compatibility break with the feature we just announced
but...I seriously doubt anyone (that isn't known to me) has converted
yet, and if they are excited enough to start using a two-week-old feature
they can adjust.

Closes: #1459
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member

jlebon commented Jul 19, 2018

Hmm, f28-compose is consistently timing out. Looks like it might be a performance regression in OpenStack.

This should help out with determining what steps take the most time.
@jlebon
Copy link
Member

jlebon commented Jul 19, 2018

bot, retest this please

@jlebon jlebon force-pushed the yaml-treefile-arch-packages branch from bf8d9ee to a5cb2e1 Compare July 19, 2018 20:37
@jlebon
Copy link
Member

jlebon commented Jul 19, 2018

Hmm, OK so it's not so much that the test composes themselves are taking longer, but the prep leading up to them went from ~9m to ~20m. Though in #1406, it just went fine. So it's definitely not consistent.

@cgwalters
Copy link
Member Author

@rh-atomic-bot r+ a5cb2e1

@rh-atomic-bot
Copy link

⌛ Testing commit a5cb2e1 with merge b66337e...

rh-atomic-bot pushed a commit that referenced this pull request Jul 21, 2018
This should help out with determining what steps take the most time.

Closes: #1459
Approved by: cgwalters
@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: cgwalters
Pushing b66337e to master...

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Jul 23, 2018
Follow up to: coreos#1459

We now honor arch-specific pacakges in YAML, and reject unknown
architectures.  I looked a little bit at how to avoid having hardcoded
arch lists, but it doesn't seem worth it right now.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Jul 23, 2018
Follow up to: coreos#1459

We now honor arch-specific packages in YAML, and reject unknown
architectures.  I looked a little bit at how to avoid having hardcoded
arch lists, but it doesn't seem worth it right now.
rh-atomic-bot pushed a commit that referenced this pull request Jul 24, 2018
Follow up to: #1459

We now honor arch-specific packages in YAML, and reject unknown
architectures.  I looked a little bit at how to avoid having hardcoded
arch lists, but it doesn't seem worth it right now.

Closes: #1468
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this pull request Jul 24, 2018
Follow up to: #1459

We now honor arch-specific packages in YAML, and reject unknown
architectures.  I looked a little bit at how to avoid having hardcoded
arch lists, but it doesn't seem worth it right now.

Closes: #1468
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this pull request Jul 24, 2018
Follow up to: #1459

We now honor arch-specific packages in YAML, and reject unknown
architectures.  I looked a little bit at how to avoid having hardcoded
arch lists, but it doesn't seem worth it right now.

Closes: #1468
Approved by: jlebon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants