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
Add success return value in diagnostics_channel unsubscribe #40433
Conversation
LGTM. I am not sure on wether changing the return value of a method is a breaking change (in this context, moving from undefined to boolean)
I didn't think about that, you might be right. But since |
|
@simon-id that seems correct |
Could you add a test for this scenario? |
This case is implicitly tested here I think, or is that not what you mean ? |
This comment has been hidden.
This comment has been hidden.
|
Squashed the changes into two logical commits, and (i think) fixed the author issue. I think the commit queue should work now. |
|
@Flarna good for you if I re-add it to the queue ? |
|
@vdeturckheim it won't work because there was a push after the last CI run. |
|
Good catch @targos . I just restarted it |
Commit Queue failed- Loading data for nodejs/node/pull/40433 ✔ Done loading data for nodejs/node/pull/40433 ----------------------------------- PR info ------------------------------------ Title Add success return value in diagnostics_channel unsubscribe (#40433) Author simon-id (@simon-id, first-time contributor) Branch simon-id:patch-1 -> nodejs:master Labels semver-minor, author ready, diagnostics_channel Commits 2 - lib: add return value for DC channel.unsubscribe - lib: add unsubscribe method to non-active DC channels Committers 1 - simon-id PR-URL: https://github.com/nodejs/node/pull/40433 Reviewed-By: Vladimir de Turckheim Reviewed-By: Stephen Belanger Reviewed-By: Gerhard Stöbich Reviewed-By: Michael Dawson Reviewed-By: Bryan English Reviewed-By: Zijian Liu ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/40433 Reviewed-By: Vladimir de Turckheim Reviewed-By: Stephen Belanger Reviewed-By: Gerhard Stöbich Reviewed-By: Michael Dawson Reviewed-By: Bryan English Reviewed-By: Zijian Liu -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - lib: add return value for DC channel.unsubscribe ⚠ - lib: add unsubscribe method to non-active DC channels ℹ This PR was created on Tue, 12 Oct 2021 19:16:54 GMT ✔ Approvals: 6 ✔ - Vladimir de Turckheim (@vdeturckheim): https://github.com/nodejs/node/pull/40433#pullrequestreview-778650881 ✔ - Stephen Belanger (@Qard): https://github.com/nodejs/node/pull/40433#pullrequestreview-778754474 ✔ - Gerhard Stöbich (@Flarna): https://github.com/nodejs/node/pull/40433#pullrequestreview-778766673 ✔ - Michael Dawson (@mhdawson) (TSC): https://github.com/nodejs/node/pull/40433#pullrequestreview-779078155 ✔ - Bryan English (@bengl): https://github.com/nodejs/node/pull/40433#pullrequestreview-780077439 ✔ - Zijian Liu (@Lxxyx): https://github.com/nodejs/node/pull/40433#pullrequestreview-780489282 ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2021-10-19T12:18:04Z: https://ci.nodejs.org/job/node-test-pull-request/40367/ - Querying data for job/node-test-pull-request/40367/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/1359595185 |
|
Landed in 0f78d26...07bbb07 |
PR-URL: #40433 Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
PR-URL: #40433 Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
|
Congrats @simon-id for this first PR merged! |
PR-URL: #40433 Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
PR-URL: #40433 Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
Notable changes: doc: * add VoltrexMaster to collaborators (voltrexmaster) #40566 esm: * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250 lib: * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) #40433 * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) #40433 v8: * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) #39283 PR-URL: TODO
Notable changes: doc: * add VoltrexMaster to collaborators (voltrexmaster) #40566 esm: * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250 lib: * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) #40433 * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) #40433 v8: * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) #39283 PR-URL: #40758
Notable changes: doc: * add VoltrexMaster to collaborators (voltrexmaster) #40566 esm: * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250 lib: * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) #40433 * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) #40433 v8: * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) #39283 PR-URL: #40758
This PR adds two things to the
unsubscribemethod indiagnostics_channelmodule:Add a returned boolean that returns true if a subscriber was actually removed, and false if it was not found
Can be used for example like this:
This is currently not possible without messing with the private
channel._subscribersproperty.Add the unsubscribe method to non-active channels
Currently if a user tries to use the
unsubscribemethod on a non-activeChannel, it will throwchannel.unsubscribe is not a function. This doesn't happen if the channel is an instance ofActiveChannel.Since the user should not be aware of a difference between (non-active)
ChannelandActiveChannel, theunsubscribemethod should be present in both.The text was updated successfully, but these errors were encountered: