-
Notifications
You must be signed in to change notification settings - Fork 29
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
Patch Studio API update timinig issue #4619
Conversation
f24c7f6
to
512b000
Compare
this.experiments.assumePushed(shas) | ||
} | ||
|
||
private waitForStudioUpdate() { |
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.
[F] I tried to combine the waitForStudioUpdate
& waitForRemoteUpdate
methods but the code was a lot harder to read.
} | ||
|
||
const [, { lsRemoteOutput }] = await Promise.all([ | ||
this.waitForStudioUpdate(), |
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.
[F] If we don't wait for this the assumePushed
shas can be overwritten.
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.
Looks good!
512b000
to
18b2e18
Compare
Code Climate has analyzed commit 18b2e18 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 93.9% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.0% (0.0% change). View more on Code Climate. |
Related to #3574
After pushing an experiment there is a delay before it becomes available via the new Studio GET endpoint.
There were two possible solutions that came to mind.
I went with option 2 as option 1 seemed to be more brittle.
Demo
Screen.Recording.2023-09-05.at.12.34.34.pm.mov
Note: We can update this later if we run into issues. The code is clearly signposted.