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

Fix comments from Auth Blocking Triggers PR #4443

Merged
merged 4 commits into from
Apr 14, 2022

Conversation

colerogers
Copy link
Contributor

@colerogers colerogers commented Apr 13, 2022

This changed addresses post merge comments from #4395

unregisterTrigger(ep: backend.Endpoint): Promise<void> {
if (!backend.isBlockingTriggered(ep)) {
return Promise.resolve(); // this should never happen
}
this.triggerQueue = this.triggerQueue.then(() => this.unregisterTriggerLocked(ep));
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: So I understand that we are building a chain of promises to make sure trigger registration happens sequentially.

But doesn't something have to wait for all of these chain of promises are all fulfilled before we declare "hey deployment is done!". If we don't do this, then aren't we just banking on it being completed before the CLI process finishes (at which it will make sure all promises are fulfilled)?

Copy link
Member

Choose a reason for hiding this comment

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

We return the promise below. By modifying the promise in place we're returning a promise for the latest enqueued operation. Fabricator waits on this promise before resolving setTrigger or unsetTrigger.

@colerogers colerogers enabled auto-merge (squash) April 14, 2022 21:55
@colerogers colerogers merged commit 747ec2a into master Apr 14, 2022
@inlined inlined deleted the colerogers.auth-blocking-nits branch April 15, 2022 17:21
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.

None yet

3 participants