Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osbuild1: make the conversion from v2 result stable
A result from manifest v2 contains logs from pipelines. The individual pipelines are stored as an object, thus they have no order. Well, at least in Go, because it doesn't guarantee one when parsing maps, see: golang/go#27179 Unfortunately, this makes the Result.fromV2 method return unpredictable results because the pipeline results are processed in basically a random order. This caused the TestUnmarshalV2Failure test (result_test.go:124) to randomly fail because it expects the ordering to be stable. I decided to fix this by ordering the pipeline results by their name. When this fix is applied, the output from Result.fromV2 is well-defined. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
- Loading branch information