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

Add simple ws dump command to show final PDF model #1648

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

sfc-gh-fcampbell
Copy link
Contributor

@sfc-gh-fcampbell sfc-gh-fcampbell commented Oct 1, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Quick snow ws dump internal command to show what a snowflake.yml file will render to after defaults, templates, and mixins.

Examples

v1:

definition_version: 1
native_app:
  name: test
  source_stage: app_src.stage
  artifacts:
    - src: app/*
      dest: ./
definition_version: '1'
native_app:
  name: test
  artifacts:
  - src: app/*
    dest: ./
    processors: []
  bundle_root: output/bundle/
  deploy_root: output/deploy/
  generated_root: __generated/
  source_stage: app_src.stage
  scratch_stage: app_src.stage_snowflake_cli_scratch
  package: null
  application: null
snowpark: null
streamlit: null

v1.1:

definition_version: 1.1
native_app:
  name: test
  source_stage: app_src.stage
  artifacts:
    - src: app/*
      dest: ./
definition_version: '1.1'
native_app:
  name: test
  artifacts:
  - src: app/*
    dest: ./
    processors: []
  bundle_root: output/bundle/
  deploy_root: output/deploy/
  generated_root: __generated/
  source_stage: app_src.stage
  scratch_stage: app_src.stage_snowflake_cli_scratch
  package:
    scripts: null
    role: null
    name: test_pkg_fcampbell
    warehouse: null
    distribution: internal
    post_deploy: null
  application:
    role: null
    name: test_fcampbell
    warehouse: null
    debug: null
    post_deploy: null
snowpark: null
streamlit: null
env: null

v2:

definition_version: 2
entities:
  pkg_free:
    type: application package
    identifier: my_app_<% ctx.env.USER %>
    meta:
      use_mixins:
        - base-app-package
  pkg_paid:
    type: application package
    identifier: my_app_free
    meta:
      use_mixins:
        - base-app-package
mixins:
  base-app-package:
    manifest: app/manifest.yml
    artifacts:
      - src: app/*
        dest: ./
definition_version: '2'
entities:
  pkg_free:
    meta:
      warehouse: null
      role: null
      post_deploy: null
      use_mixins:
      - base-app-package
    identifier: my_app_fcampbell
    type: application package
    artifacts:
    - src: app/*
      dest: ./
      processors: []
    - src: app/*
      dest: ./
      processors: []
    bundle_root: output/bundle/
    deploy_root: output/deploy/
    generated_root: __generated/
    stage: app_src.stage
    scratch_stage: app_src.stage_snowflake_cli_scratch
    distribution: internal
    manifest: app/manifest.yml
  pkg_paid:
    meta:
      warehouse: null
      role: null
      post_deploy: null
      use_mixins:
      - base-app-package
    identifier: my_app_free
    type: application package
    artifacts:
    - src: app/*
      dest: ./
      processors: []
    - src: app/*
      dest: ./
      processors: []
    bundle_root: output/bundle/
    deploy_root: output/deploy/
    generated_root: __generated/
    stage: app_src.stage
    scratch_stage: app_src.stage_snowflake_cli_scratch
    distribution: internal
    manifest: app/manifest.yml
env: null
mixins:
  base-app-package:
    manifest: app/manifest.yml
    artifacts:
    - src: app/*
      dest: ./

@sfc-gh-fcampbell sfc-gh-fcampbell changed the title Add simple ws dump command to show result of template evaluation and default substitution Add simple ws dump command to show final PDF model Oct 1, 2024
@sfc-gh-fcampbell sfc-gh-fcampbell marked this pull request as ready for review October 1, 2024 21:10
@sfc-gh-fcampbell sfc-gh-fcampbell requested review from a team as code owners October 1, 2024 21:10
@sfc-gh-fcampbell sfc-gh-fcampbell enabled auto-merge (squash) October 2, 2024 09:49
@sfc-gh-bdufour
Copy link
Contributor

What's the use case?

@sfc-gh-fcampbell
Copy link
Contributor Author

sfc-gh-fcampbell commented Oct 2, 2024

To see what a given PDF will render to, like https://docs.docker.com/reference/cli/docker/compose/config/. It's a hidden command to help us debug any issues with templating, mixins, etc.

@sfc-gh-fcampbell sfc-gh-fcampbell merged commit cff809c into main Oct 2, 2024
19 checks passed
@sfc-gh-fcampbell sfc-gh-fcampbell deleted the frank-ws-dump branch October 2, 2024 17:58
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
Quick `snow ws dump` internal command to show what a snowflake.yml file will render to after defaults, templates, and mixins.
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

Successfully merging this pull request may close these issues.

2 participants