Skip to content

fix: support different kinds of close, correct client unsubscribe behaviour#1174

Merged
endigma merged 2 commits into
masterfrom
7047-followup-errors-should-not-cause-going-away
Jun 10, 2025
Merged

fix: support different kinds of close, correct client unsubscribe behaviour#1174
endigma merged 2 commits into
masterfrom
7047-followup-errors-should-not-cause-going-away

Conversation

@endigma

@endigma endigma commented Jun 5, 2025

Copy link
Copy Markdown
Member

In #1158, I added a new path for handling server closure, but as an unintended side effect some scenarios that were previously silently failing such as complete-after-error in subscription init events became obviously broken.

This PR follows up on this by adding options for the kind of closure the caller wants, including 3 to start:

  • "normal" = the connection is being closed normally and intentionally, such as in the case of connection failure
  • "downstream service error" = the subgraph closes the connection before completing
  • "going away" = used during router shutdown to indicate the router itself is shutting down

It also:

  • renames many instances of "Shutdown" to "Close" and "Done" to "Complete" for consistent terminology through the router and engine for subscriptions.
  • corrects behaviour where we were not distinguishing between removing clients for different reasons and always sending complete as if it was because the client sent complete, now handles complete separately

@endigma endigma requested review from StarpTech and jensneuse and removed request for StarpTech and jensneuse June 5, 2025 13:43
@endigma endigma changed the title fix: differentiate different types of close, for error handling fix: support different kinds of close Jun 5, 2025
@endigma endigma marked this pull request as ready for review June 5, 2025 13:53
@endigma endigma requested review from Noroth, StarpTech, alepane21, devsergiy and jensneuse and removed request for StarpTech June 5, 2025 13:55
@endigma endigma force-pushed the 7047-followup-errors-should-not-cause-going-away branch 2 times, most recently from e997ae8 to 1215d95 Compare June 5, 2025 15:05
@endigma endigma force-pushed the 7047-followup-errors-should-not-cause-going-away branch from 1215d95 to 4752731 Compare June 5, 2025 15:12
@endigma endigma changed the title fix: support different kinds of close fix: support different kinds of close, correct client unsubscribe behaviour Jun 5, 2025
@endigma endigma merged commit b6de322 into master Jun 10, 2025
10 checks passed
@endigma endigma deleted the 7047-followup-errors-should-not-cause-going-away branch June 10, 2025 10:31
endigma pushed a commit that referenced this pull request Jun 10, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-rc.187](v2.0.0-rc.186...v2.0.0-rc.187)
(2025-06-10)


### Bug Fixes

* support different kinds of close, correct client unsubscribe behaviour
([#1174](#1174))
([b6de322](b6de322))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
endigma pushed a commit that referenced this pull request Jul 2, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](execution/v1.3.1...execution/v1.4.0)
(2025-07-02)


### Features

* improve apollo gateway compatible field selection validation
([#1169](#1169))
([8c1a063](8c1a063))


### Bug Fixes

* support different kinds of close, correct client unsubscribe behaviour
([#1174](#1174))
([b6de322](b6de322))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added a changelog entry for version 1.4.0, highlighting improved field
selection validation and enhanced client unsubscribe handling.

* **Chores**
  * Updated the component version to 1.4.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants