fix: nil dereference in archive priority processing#269
fix: nil dereference in archive priority processing#269lczyk wants to merge 10 commits intocanonical:mainfrom
Conversation
|
sorry for the empty commit noise. the github workers were loosing their minds and i needed to retrigger a couple of times |
|
internal/setup/setup_test.go
Outdated
| }, | ||
| relerror: `chisel.yaml: cannot parse maintenance: expected format for "standard" is YYYY-MM-DD`, | ||
| }, { | ||
| summary: "Maintenance: invalid pro in v2-archives ignored", |
There was a problem hiding this comment.
I believe this test is not tied to the "maintenance" feature. Unless I am missing something, it looks like the name (and the content of the chisel.yaml are making it difficult to actually know what is tested.
Also, to be inline with the last thing discussed in #267, I suppose a single test for V3 would be enough since the tested behavior is common for all formats.
There was a problem hiding this comment.
I believe this test is not tied to the "maintenance" feature.
ah, sorry, i thought Maintenance: ... meant tests of v1. changed in 9bbad89
it looks like the name (and the content of the chisel.yaml are making it difficult to actually know what is tested.
that's the smallest yaml which was causing the bug... 🤷♀️
i've added a comment to point the reader at the point of the test 768d763
I suppose a single test for V3 would be enough since the tested behavior is common for all formats.
the tests test different things. might be clearer now that the tests are next to one another + the name is reworded. also, importantly, without
- for archiveName := range yamlArchives {
+ for archiveName := range release.Archives {only one of the tests fails ( only the v2-archive one ). hence, i believe there is a strong reason to keep both.
There was a problem hiding this comment.
@lczyk I think you missed this comment. If not, would you mind exposing why you think the second test must be kept?
There was a problem hiding this comment.
see above. sorry, stupid github decided to mark the comments as pending from some reason and never actually make them... 😠
There was a problem hiding this comment.
Thanks but see the previous comment I pinged you on (#269 (comment))
upils
left a comment
There was a problem hiding this comment.
Thanks for the improved test. I see now why 2 tests make sense.
See my other comment about tests location.
very niche, but the test by itself leads to a panic since we collect keys from
yamlArchivesbut then indexrelease.Archiveswith them