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

ROVER-280 Fix Adding Subgraphs Semantics #2358

Merged
merged 4 commits into from
Jan 21, 2025
Merged

Conversation

jonathanrainer
Copy link
Contributor

@jonathanrainer jonathanrainer commented Jan 16, 2025

In the original code even though we reported errors with and the subgraph was ostensibly "removed", it was retained inside an internal data structure within the SupergraphConfigWatcher and so when changes were made they were not seen properly and thus not acted on.

In addition there were issues with adding a subgraph where file watchers were getting dropped too early, because of the use of a DropGuard in one of the Watcher objects, I've removed this idiom and instead added a series of cancellation tokens throughout, rather than relying on abort handles. This has the added benefit that cancellation is much more controlled and cascades in a better way than consistently trying to ensure all the right abort handles get called.

@jonathanrainer jonathanrainer requested a review from a team as a code owner January 16, 2025 10:17
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Jan 16, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: ffe0af57163e926db9ef5a7e

Base automatically changed from jr/task/ROVER-281 to main January 20, 2025 16:43
In the original code even though we reported errors with and the
subgraph was ostensibly "removed", it was retained inside an
internal data structure within the SupergraphConfigWatcher and
so when changes were made they were not seen properly and thus
not acted on.
Before we had heavy use of abort handles which didn't give an
opportunity to exit gracefully in many situations. These have been
replaced with CancellationTokens, which also means we can guarantee
that we get a shutdown on file watchers when the task that owns
them shuts down.
@jonathanrainer jonathanrainer changed the title ROVER-280 Ensure errored subgraphs are removed from SupergraphConfigWatcher ROVER-280 Fix Adding Subgraphs Semantics Jan 21, 2025
@jonathanrainer jonathanrainer merged commit bad1617 into main Jan 21, 2025
32 checks passed
@jonathanrainer jonathanrainer deleted the jr/task/ROVER-280 branch January 21, 2025 09:56
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.

3 participants