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

Move WritableManifest to dbt/artifacts #9377

Merged
merged 9 commits into from
Jan 24, 2024
Merged

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Jan 15, 2024

resolves #9378
resolves #9379

Problem

Moving the schema definition of WritableManifest is necessary to create/populate an upstream, standalone dbt/artifacts directory.

Solution

  • Move WritableManifest + dependencies
  • Move Documentation to set pattern for moving resource definitions to dbt/artifacts
  • set up initial versioning structure within dbt/artifacts/schemas and dbt/artifacts/resources

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label Jan 15, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (af18862) 86.96% compared to head (89e48cb) 86.99%.
Report is 1 commits behind head on main.

Files Patch % Lines
core/dbt/contracts/sql.py 0.00% 3 Missing ⚠️
...ore/dbt/artifacts/schemas/manifest/v12/manifest.py 98.43% 1 Missing ⚠️
core/dbt/task/clone.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9377      +/-   ##
==========================================
+ Coverage   86.96%   86.99%   +0.03%     
==========================================
  Files         187      197      +10     
  Lines       25014    25035      +21     
==========================================
+ Hits        21754    21780      +26     
+ Misses       3260     3255       -5     
Flag Coverage Δ
integration 84.38% <97.57%> (+0.03%) ⬆️
unit 63.34% <88.34%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichelleArk MichelleArk changed the title Move manifest to artifacts Move WritableManifest to artifacts Jan 16, 2024
@MichelleArk MichelleArk changed the title Move WritableManifest to artifacts Move WritableManifest to dbt/artifacts Jan 16, 2024
@MichelleArk MichelleArk marked this pull request as ready for review January 23, 2024 19:44
@MichelleArk MichelleArk requested review from a team as code owners January 23, 2024 19:44
@MichelleArk
Copy link
Contributor Author

MichelleArk commented Jan 24, 2024

Kicked off workflows in adapter repos to run integration tests against this branch:

Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. If we change our mind, it's only code :)

"""This overrides the "upgrade_schema_version" call in VersionedSchema (via
ArtifactMixin) to modify the dictionary passed in from earlier versions of the manifest."""
manifest_schema_version = get_artifact_schema_version(data)
if manifest_schema_version <= 10:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be <= 11? The current version is 12, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be! Let me make sure I haven't clobbered anything during a merge...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our latest released version is still v11: https://schemas.getdbt.com/

This also looks consistent with whats on main: https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/manifest.py#L1730-L1732

I'm hesitant to bump this here because it will likely need additional testing & implementation. I'll open up an issue we can take on as part of the dbt/artifacts refactor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: #9438

@MichelleArk MichelleArk merged commit ad723a6 into main Jan 24, 2024
51 checks passed
@MichelleArk MichelleArk deleted the move-manifest-to-artifacts branch January 24, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-3549] Define Documentation contract in dbt/artifacts [CT-3548] Move WritableManifest to dbt/artifacts
2 participants