Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Update Components to reflect (un)deletion of Components#3468

Merged
si-bors-ng[bot] merged 4 commits intomainfrom
jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted
Mar 28, 2024
Merged

Update Components to reflect (un)deletion of Components#3468
si-bors-ng[bot] merged 4 commits intomainfrom
jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted

Conversation

@jhelwig
Copy link
Copy Markdown
Contributor

@jhelwig jhelwig commented Mar 22, 2024

Update Component inputs/outputs to reflect when a Component is (un)marked as to_delete.

Data should be able to flow between components following the rules below:

From Component to_delete To Component to_delete Data Propagates
False False Yes
False True Yes
True False No
True True Yes

Whenever a Component is marked (or un-marked) as to_delete, we need to make sure that both its inputs, and all downstream Components' inputs are updated to reflect the rules above. This allows us to both show the effect of "deleting" a Component on the rest of the workspace, and keep data that may be necessary to perform the delete action in Components that are marked for deletion.

Enable delete_connection API endpoint

Removing an AttributePrototypeArgument will now cause the AttributeValue(s) that use that Prototype to automatically be updated to reflect the new function inputs.

@github-actions github-actions Bot added the A-dal label Mar 22, 2024
@jhelwig jhelwig force-pushed the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch 2 times, most recently from fd2123e to a3e8eb4 Compare March 25, 2024 16:21
@jhelwig jhelwig changed the title Update Components to reflect (un)deletion of Components & Edges Update Components to reflect (un)deletion of Components Mar 25, 2024
@github-actions github-actions Bot added A-sdf Area: Primary backend API service [Rust] A-web labels Mar 26, 2024
@jhelwig jhelwig force-pushed the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch from 5de5f60 to 100c896 Compare March 26, 2024 19:43
@jobelenus jobelenus force-pushed the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch from 9bd362e to 79ebdfa Compare March 27, 2024 20:31
jhelwig and others added 3 commits March 27, 2024 13:43
…rked as to_delete

Data should be able to flow between components following the rules
below:

| From Component `to_delete` | To Component `to_delete` | Data Propagates |
| -------------------------- | ------------------------ | --------------- |
| False                      | False                    | Yes             |
| False                      | True                     | Yes             |
| True                       | False                    | No              |
| True                       | True                     | Yes             |

Whenever a Component is marked (or un-marked) as `to_delete`, we need to
make sure that both its inputs, and all downstream Components' inputs
are updated to reflect the rules above. This allows us to both show the
effect of "deleting" a Component on the rest of the workspace, and keep
data that may be necessary to perform the delete action in Components
that are marked for deletion.
@jhelwig jhelwig force-pushed the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch from 79ebdfa to 810520f Compare March 27, 2024 20:43
Removing an AttributePrototypeArgument will now cause the
AttributeValue(s) that use that Prototype to automatically be updated to
reflect the new function inputs.
@jhelwig jhelwig force-pushed the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch from 810520f to f7fab90 Compare March 27, 2024 21:04
@jhelwig jhelwig marked this pull request as ready for review March 27, 2024 21:11
Copy link
Copy Markdown
Contributor

@nickgerace nickgerace left a comment

Choose a reason for hiding this comment

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

return new ApiRequest({
method: "post",
url: "diagram/restore_components",
url: "diagram/remove_delete_intent",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice

Comment on lines +488 to +489
#[test]
async fn deletion_updates_downstream_components(ctx: &mut DalContext) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

@jhelwig
Copy link
Copy Markdown
Contributor Author

jhelwig commented Mar 28, 2024

bors merge

@si-bors-ng
Copy link
Copy Markdown
Contributor

si-bors-ng Bot commented Mar 28, 2024

Build succeeded:

@si-bors-ng si-bors-ng Bot merged commit 22d1106 into main Mar 28, 2024
@si-bors-ng si-bors-ng Bot deleted the jhelwig/eng-2398-trigger-dvu-when-a-component-or-edge-is-deleted branch March 28, 2024 16:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-dal A-sdf Area: Primary backend API service [Rust] A-web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants