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

Switch to node-level dimension links #932

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

shangyian
Copy link
Contributor

Summary

This PR makes the final switch over to node-level dimension links. It does so by:

  • Changing the APIs for column-level dimension linking and unlinking to use node-level dimension links
  • Changing the UI to display column-level dimension links
  • Adding a migration endpoint that we can remove once we are done with migration

Test Plan

Locally

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

ASAP. This blocks all other materialization-related changes. Once this PR has been merged, we also can't make new changes without deploying this migration successfully.

@shangyian shangyian requested a review from agorajek March 1, 2024 22:33
Copy link

netlify bot commented Mar 1, 2024

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit a1a873e
🔍 Latest deploy log https://app.netlify.com/sites/thriving-cassata-78ae72/deploys/65e6758b29f8d4000824295c

@shangyian shangyian marked this pull request as ready for review March 2, 2024 01:29
@shangyian shangyian force-pushed the switch-to-node-level branch 2 times, most recently from 852a99d to bcdec02 Compare March 2, 2024 01:36
Copy link
Member

@agorajek agorajek left a comment

Choose a reason for hiding this comment

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

Two small comments, but overall look great.

current_user=current_user,


@router.post("/nodes/{name}/migrate", status_code=201) # pragma: no cover
Copy link
Member

Choose a reason for hiding this comment

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

I know this is temporary, but it may feel safer to call if this endpoint is named clearer, e.g. migrate_dim_link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, renaming...

)
session.commit()
session.refresh(node)
return is_update
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure this Boolean value is a useful return. I think returning nothing would be cleaner (like in remove_dimension_link), or returning an Enum (NEW, UPDATED, etc), but this true/false may just catch us by surprise somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense! I think it's easier to just return an ActivityType enum, since we already have this enum for the history APIs. Let me make this change

@shangyian shangyian linked an issue Mar 5, 2024 that may be closed by this pull request
8 tasks
@shangyian shangyian merged commit 3d04e91 into DataJunction:main Mar 5, 2024
24 checks passed
@shangyian shangyian deleted the switch-to-node-level branch March 5, 2024 02:15
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.

Dimension Links Migration
2 participants