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

duplicate versions defined after using --prerelease flag for version operation #90

Closed
5 tasks
dave-connors-3 opened this issue Jul 5, 2023 · 0 comments · Fixed by #91
Closed
5 tasks
Labels
bug Something isn't working triage Tis issue or pull request must be triaged by a project maintainer

Comments

@dave-connors-3
Copy link
Collaborator

Describe the bug

when using the add-version operation, if you use the --prerelease flag, which skips the latest_version: increment, and creates a file, the latest version and the defined versions are intentionally our of sync. Subsequent invocations of the add-version command after having used the --pre-release flag result in duplicated version numbers in yml.

Steps to reproduce

  1. invoke dbt-meshify operation add-version -s my_model

yml result:

models: 
  • name: my_model
    latest_version: 1
    versions:
    • v: 1

2. invoke `dbt-meshify operation add-version -s my_model --prerelease`

yml result:

models:

  - name: my_model
    latest_version: 1
    versions:
      - v: 1
      - v: 2

no error

  1. invoke dbt-meshify operation add-version -s my_model

yml result:

models: 
  - name: my_model
    latest_version: 2
    versions:
      - v: 1
      - v: 2
      - v: 2

duplicate version entry

Expected results

The add version command should

  1. (no prerelease flag) increment latest_version and create next version + file based on defined yml versions
  2. (prerelease flag) not increment latest_version and still create next version + file based on defined yml versions

no parse errors from dbt

Actual results

dupe versions and a parse error to boot

Screenshots and log output

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt debug:

<output goes here>

The output of dbt --version:

<output goes here>

Additional context

Are you interested in contributing the fix?

@dave-connors-3 dave-connors-3 added bug Something isn't working triage Tis issue or pull request must be triaged by a project maintainer labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Tis issue or pull request must be triaged by a project maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant