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

dbt-meshify split command, leaf nodes aren't made public when there are tests on the leaf nodes #121

Closed
1 of 5 tasks
graciegoheen opened this issue Aug 18, 2023 · 4 comments · Fixed by #144
Closed
1 of 5 tasks
Assignees
Labels
bug Something isn't working
Milestone

Comments

@graciegoheen
Copy link
Collaborator

Describe the bug

I am trying to do this:
split_models

So I ran:

dbt-meshify split sales_analytics --select +int_sales__unioned +int_returns__unioned transactions

I would expect transactions to be made public (because it’s a leaf node), but it's not.

Steps to reproduce

  • run dbt-meshify split on a selection of models that includes a leaf node

Expected results

  • leaf node made public

Actual results

  • lead node's access is unchanged

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?

@graciegoheen graciegoheen added bug Something isn't working triage Tis issue or pull request must be triaged by a project maintainer labels Aug 18, 2023
@dave-connors-3
Copy link
Collaborator

dave-connors-3 commented Aug 18, 2023

howdy grace 👽

I believe @nicholasyager tackled this in #102 !

  1. I added a dummy leaf node to the split_proj project:
image
  1. ran dbt-meshify --dry-run split test -s +orders dummy_leaf

  2. Check out new project:

image

I think we should be good here!

@dave-connors-3 dave-connors-3 self-assigned this Aug 18, 2023
@dave-connors-3 dave-connors-3 removed the triage Tis issue or pull request must be triaged by a project maintainer label Aug 18, 2023
@graciegoheen
Copy link
Collaborator Author

graciegoheen commented Aug 18, 2023

Hmm - I tried using my local dbt-meshify with the main branch and am still getting this bug:

  • created a virtual environment
  • pip installed dbt-core
  • pip installed dbt-meshify
  • navigated to my local dbt-meshify repo
  • checked out the main branch
  • git pull
  • ran poetry install
  • navigated to my example project
  • ran dbt-meshify split sales_analytics --select +int_sales__unioned +int_returns__unioned transactions

And still, my transactions model (leaf node) does not have a contract not is it's access changed to public

@graciegoheen
Copy link
Collaborator Author

Looks like this may be because I currently have tests on my transactions model. When I remove the tests and re-run the command, transactions is made public and a contract is added.

@graciegoheen graciegoheen changed the title dbt-meshify split command, leaf nodes aren't made public dbt-meshify split command, leaf nodes aren't made public when there are tests on the leaf nodes Aug 18, 2023
@nicholasyager
Copy link
Collaborator

Looks like this may be because I currently have tests on my transactions model. When I remove the tests and re-run the command, transactions is made public and a contract is added.

Fantastic catch @graciegoheen! It sounds like we need to the graph grouping code to ignore test nodes as dependencies. Should be easy enough to resolve IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants