Skip to content

[BUG] Network specification should be a dict not list #326

@olipinski

Description

@olipinski

Your setup

Formula commit hash / release tag

latest

Versions reports (master & minion)

3005.1

Pillar / config used

pillar a:

docker:
  networks:
    - a

pillar b:

docker:
  networks:
    - b

Bug details

Describe the bug

Currently, due to the ways that pillars are merged (saltstack/salt#28394, saltstack-formulas/zabbix-formula#60), one of the networks will get overwritten, resulting in the config passed to the formula as

docker:
  networks:
    - a

Instead of

docker:
  networks:
    - a
    - b

Steps to reproduce the bug

Attempt to apply the formula with pillars as above.

Expected behaviour

Passed config is:

docker:
  networks:
    - a
    - b

Attempts to fix the bug

Bug can be fixed easily by using dicts instead. Defining the pillars as:

pillar a:

docker:
  networks:
    a:

pillar b:

docker:
  networks:
    b:

gives the correct config passed with

docker:
  networks:
    a:
    b:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions