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

tests: fix flaky robots smoke failure #13031

Merged
merged 5 commits into from
Sep 9, 2021
Merged

tests: fix flaky robots smoke failure #13031

merged 5 commits into from
Sep 9, 2021

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Sep 9, 2021

Summary
Adding more debug data to the RobotsTxt artifact and running it many times to find the flake reason. Found the flake! The error message we're getting here is "Waiting for the end of the IO stream exceeded the allotted time". I increased the timeout from 500ms to 1000ms, ran it 100 times and did not receive a single failure, so I'm calling that fixed (500ms is a decently short period to try and fetch a remote resource and read all its contents off the protocol, 1s seemed more reasonable) 👍

Related Issues/PRs
fixes #13024

@patrickhulce patrickhulce changed the title tests: debug flaky robots smoke failure tests: fix flaky robots smoke failure Sep 9, 2021
@patrickhulce patrickhulce marked this pull request as ready for review September 9, 2021 21:13
@patrickhulce patrickhulce requested a review from a team as a code owner September 9, 2021 21:13
@patrickhulce patrickhulce requested review from adamraine and removed request for a team September 9, 2021 21:13
@@ -48,8 +48,8 @@ class RobotsTxt extends FRGatherer {

const robotsUrl = new URL('/robots.txt', passContext.url).href;
await passContext.driver.fetcher.enable();
return passContext.driver.fetcher.fetchResource(robotsUrl)
.catch(() => ({status: null, content: null}));
return passContext.driver.fetcher.fetchResource(robotsUrl, {timeout: 1_000})
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't we tweak the method's default instead? and since mostly all usages of this are done in parallel (source maps), I'd be comfortable upping it to 2s.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, wfm

Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for looking into this.

@patrickhulce patrickhulce merged commit d5107dd into master Sep 9, 2021
@patrickhulce patrickhulce deleted the fr_smoke_flake branch September 9, 2021 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Robots txt audit is flaky in FR smoke tests
4 participants