-
Notifications
You must be signed in to change notification settings - Fork 69
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: handle multiple sandbox processes in resumable state #944
Conversation
if (resumeSandboxRequest.SandboxName) { | ||
sandboxCreationProgress = await this.querySandboxProcessBySandboxName(resumeSandboxRequest.SandboxName); | ||
} else if (resumeSandboxRequest.SandboxProcessObjId) { | ||
if (resumeSandboxRequest.SandboxProcessObjId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer the SandboxProcessId over name since it's unique.
expect(queryStub.firstCall.firstArg).to.be.equal(queryStr); | ||
expect(pollStatusAndAuthStub.calledOnce).to.be.true; | ||
expect(result).to.be.equal(statusResult.records[0]); | ||
describe('createSandbox', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes here are reorganization of the existing tests to make more sense. I added a bunch of new tests as well in the resumeSandbox
and querySandboxProcess
sections.
err.data = result; | ||
throw err; | ||
} | ||
return result[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly what Jochen's PR is, with some additions to the query to ORDER BY
and augment the MultipleRecords error (data property) with the sandbox processes.
What does this PR do?
handle multiple sandbox processes in resumable state. The error that happens has the SandboxProcesses added to err.data , and a resume lifecycle event is fired with that data for consumers to act on.
What issues does this PR fix or reference?
@W-13635704@