Repository navigation
engine: fix provider config precedence - #1032
Conversation
|
I totally see us regressing this again the next time we touch this logic. Could we quickly throw a unit test on top of it (possibly as a followup PR)? |
also maybe a comment in the code (comments are free 😄) |
Regression from coreos#958. We switched the list of providers from an array to a map. But iteration order through a map is undefined, so we lost the precedence of providers. I think this is the cause behind a lot of the FCOS installer test timeouts, such as: coreos/coreos-assembler#1597 There, we pass the Ignition config for the PXE boot via `ignition.config.url`, but if the metal (no-op) fetcher appears earlier than the `cmdline` fetcher, we get no config. And similarly for the installed system when the no-op fetcher appears before the `system` fetcher (which coreos-installer's `--ignition-file` leverages). The likelihood of this happening increased in the v2.4.0 release due to coreos#1002, which only gave us one try to iterate over the correct provider first (at the `fetch` stage), rather than every stage having a go at it. Closes: coreos/coreos-assembler#1597
Let's run install tests on this repo since Ignition is key to automating them.
I looked at this a bit, but it's tricky. I think we'd need to mock the |
|
Great catch! We have blackbox tests for this already and they've been flaking for a while. That explains that. 🎉 |
🎉 |
Regression from #958. We switched the list of providers from an array to
a map. But iteration order through a map is undefined, so we lost the
precedence of providers.
I think this is the cause behind a lot of the FCOS installer test
timeouts, such as:
coreos/coreos-assembler#1597
There, we pass the Ignition config for the PXE boot via
ignition.config.url, but if the metal (no-op) fetcher appears earlierthan the
cmdlinefetcher, we get no config. And similarly for theinstalled system when the no-op fetcher appears before the
systemfetcher (which coreos-installer's
--ignition-fileleverages).The likelihood of this happening increased in the v2.4.0 release due to
#1002, which only gave us one try
to iterate over the correct provider first (at the
fetchstage),rather than every stage having a go at it.
Closes: coreos/coreos-assembler#1597