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

[Barbara Gittings]: merge.sql BigQuery macro file shows up in dbt v016.0-b3 pre-release #2177

Closed
drewbanin opened this issue Mar 2, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@drewbanin
Copy link
Contributor

Describe the bug

See a description of the bug here: https://discourse.getdbt.com/t/pre-release-v0-16-0-barbara-gittings/922/2?u=drew

I'm a little confused at how this is happening - it looks like the 0.16.0-b3 pre-release (on PyPi) includes a macros/materializations/merge.sql file which is not present in the source code used to generate this release.

There are two things to check out here:

  1. Do we need to do something special to ensure that a merge.sql file from a previous release (eg. 0.15.2) does not persist after a user upgrades to 0.16.0?
  2. Does our build script for dbt need to be updated to wipe out the dist/ dir (or similar) to ensure that assets from different releases aren't persisted across releases errantly?

For reference, this file is includes in site-packages/dbt using this pypi release, but no such merge.sql file exists in dev/barbara-gittings. The code from #2140 is present in the release (which also deletes the merge.sql file), so this isn't a question of the 0.16.0-b3 pre-release not mapping to the latest commit on dev/barbara-gittings.

Steps To Reproduce

python3 -m venv env
source env/bin/activate
pip install dbt==0.16.0-b3

# This file should not exist!
cat env/lib/python3.7/site-packages/dbt/include/bigquery/macros/materializations/merge.sql
@drewbanin drewbanin added the bug Something isn't working label Mar 2, 2020
@drewbanin drewbanin added this to the Barbara Gittings milestone Mar 2, 2020
@beckjake
Copy link
Contributor

beckjake commented Mar 3, 2020

This looks like a release issue of some sort - the file exists in a pristine install of dbt==0.16.0b3 as well, but it's not in the repository. I'll investigate the package-building aspect more thoroughly in the next couple days, but there's code in the package build script that explicitly calls shutil.rmtree on the dist folder before we start building:

So I'm a little perplexed about the whole thing 😕

@beckjake
Copy link
Contributor

beckjake commented Mar 3, 2020

Even worse - it appears in the wheel version, but not the .tar.gz version.

@beckjake
Copy link
Contributor

beckjake commented Mar 3, 2020

I believe I've found a fix for this (though it's super hard to tell, given the nature of the issue) and pushed a corresponding change to my package build script PR in #2119 - when we rm -rf the dist/ folders, also remove the build/ folders.

@drewbanin
Copy link
Contributor Author

I confirmed that this file is not present in the wheel built for 0.16.0-rc2. Closing this issue - nice work @beckjake !

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

No branches or pull requests

2 participants