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

[Bug] Leave model intact when uploading #415

Merged

Conversation

whiteh
Copy link
Contributor

@whiteh whiteh commented Dec 21, 2023

Overview

When models are uploaded, the raw_code attribute is dropped - presumably for size concerns. This can cause problems with other DBT packages that expect this attribute to be present.

This PR shifts the model uploading macros to work on copies of the model object, rather than the original. This should mean that any changes won't affect the use of these object elsewhere.

Update type - breaking / non-breaking

  • Minor bug fix
  • Documentation improvements
  • Quality of Life improvements
  • New features (non-breaking change)
  • New features (breaking change)
  • Other (non-breaking change)
  • Other (breaking change)
  • Release preparation

What does this solve?

Incompatibility with other DBT packages. See issue #414

Outstanding questions

What databases have you tested with?

I'm unable to test this, but we have patched this fix in to our DBT codebase already.

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • N/A

@whiteh whiteh had a problem deploying to Approve Integration Tests December 21, 2023 16:28 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests December 21, 2023 16:28 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests December 21, 2023 16:28 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests December 21, 2023 16:28 — with GitHub Actions Failure
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:42 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:42 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:42 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:42 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer temporarily deployed to Approve Integration Tests January 25, 2024 11:47 — with GitHub Actions Inactive
@whiteh
Copy link
Contributor Author

whiteh commented Jan 25, 2024

Just noticed I've missed a model object. I'll push a fix now.

@whiteh whiteh requested a review from jared-rimmer January 25, 2024 12:06
@jared-rimmer
Copy link
Member

Just noticed I've missed a model object

No worries. I'll wait for a fix and then re-run the tests

@whiteh whiteh had a problem deploying to Approve Integration Tests January 25, 2024 12:09 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests January 25, 2024 12:09 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests January 25, 2024 12:09 — with GitHub Actions Failure
@whiteh whiteh had a problem deploying to Approve Integration Tests January 25, 2024 12:09 — with GitHub Actions Failure
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:10 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:10 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:10 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:10 — with GitHub Actions Inactive
@whiteh
Copy link
Contributor Author

whiteh commented Jan 25, 2024

Should be good now 👍. Sorry about that. Glad I re-read it.

I missed the tojson(model) calls which were the important ones. Can't see any references to the model object in that file now.

@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@whiteh whiteh temporarily deployed to Approve Integration Tests January 25, 2024 12:16 — with GitHub Actions Inactive
@jared-rimmer jared-rimmer merged commit 81da1e4 into brooklyn-data:main Jan 25, 2024
19 checks passed
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