Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1705656: Lists in mixins get applied twice #1649

Open
sfc-gh-fcampbell opened this issue Oct 1, 2024 · 0 comments
Open

SNOW-1705656: Lists in mixins get applied twice #1649

sfc-gh-fcampbell opened this issue Oct 1, 2024 · 0 comments

Comments

@sfc-gh-fcampbell
Copy link
Contributor

sfc-gh-fcampbell commented Oct 1, 2024

SnowCLI version

main

Python version

Python 3.12.3

Platform

macOS-14.6.1-arm64-arm-64bit

What happened

Using mixins that contain lists of dicts, like artifacts, the list is applied twice. In this minimal example

definition_version: 2
entities:
  pkg:
    type: application package
    manifest: app/manifest.yml
    meta:
      use_mixins:
        - artifacts_mixin
mixins:
  artifacts_mixin:
    artifacts:
      - src: app/*
        dest: ./

The resultant project model is (irrelevant fields omitted)

definition_version: '2'
entities:
  pkg:
    type: application package
    artifacts:
    - src: app/*
      dest: ./
      processors: []
    - src: app/*
      dest: ./
      processors: []
    manifest: app/manifest.yml

I believe this is because _unique_extend doesn't properly exclude list items that are dicts when defaults have been added, since the items are no longer identical:
image

Console output

No response

How to reproduce

Evaluate the above snowflake.yml file in a debugger to see that the list is duplicated

@github-actions github-actions bot changed the title Lists in mixins get applied twice SNOW-1705656: Lists in mixins get applied twice Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant