Skip to content

Add a test to validate that redeployment will clean up corrupt node metadata#1902

Merged
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:deployment-revalidation-test
Mar 18, 2026
Merged

Add a test to validate that redeployment will clean up corrupt node metadata#1902
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:deployment-revalidation-test

Conversation

@shangyian
Copy link
Collaborator

Summary

This just adds a test to verify that we create the right NodeRelationship rows on redeploy.

_create_node_revision derives parent links from node_graph (AST scan) and writes them into NodeRelationship, but there was no test confirming this actually happens. This test covers the scenario that motivated recent deployment work: corrupt or missing NodeRelationship rows are healed by a force-redeploy, because each new revision gets its parent links set directly by _create_node_revision, independent of any pre-existing state.

The test deploys a source + transform, deletes the transform's NodeRelationship row to simulate corruption, then force-redeploys and asserts the new revision has exactly one parent link.

Test Plan

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

Deployment Plan

@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit d4f72a1
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/69ba3434081c9700084dca90

@shangyian shangyian marked this pull request as ready for review March 18, 2026 05:44
@shangyian shangyian merged commit 60b9b3f into DataJunction:main Mar 18, 2026
17 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.

1 participant