On Thu, Aug 13, 2026 at 01:51:17PM +0200, Michal Privoznik via Devel wrote: > From: Michal Privoznik <[email protected]> > > YAML specification does not allow duplicate keys [1]: > > JSON's RFC4627 requires that mappings keys merely “SHOULD” be > unique, while YAML insists they “MUST” be. Technically, YAML > therefore complies with the JSON spec, choosing to treat > duplicates as an error. > > And while gitlab's documentation is a bit relaxed [2] it only > masks the problem: > > When there are duplicate keys, the latest included key wins and > overrides the other keys. > > Now, the 'potfile' job definition has two 'before_script' keys. > The first occurrence prints out list of installed packages, the > second exports env vars. Join them under one key. > > 1: https://yaml.org/spec/1.2-old/spec.html#id2759572 > 2: https://docs.gitlab.com/ci/yaml/yaml_optimization/#anchors > > Signed-off-by: Michal Privoznik <[email protected]> > --- > .gitlab-ci.yml | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-)
Reviewed-by: Daniel P. Berrangé <[email protected]> With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
