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

Bug 1707891 - Do not clear deletion-request pings when clearing pings queue #552

Merged
merged 6 commits into from
Jul 22, 2021

Conversation

brizental
Copy link
Contributor

@brizental brizental commented Jul 22, 2021

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint && npm run lint:circular-deps Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work

The issue is that in rally-core a bunch of pings are
sent before the deletion-request.

It takes a while for the upload to finish.

setUploadDisabled will clear the pings queue before they
can complete sending all pings,including the deletion-request.

Note: At this point the test fails.
Additionaly this changes the behaviour of the Clear command
to return the Dispatcher to an Idle state after clearing instead
of returning it to a Stopped state.

That behaviour was rather arbitrary from the start and apart from
some necessary test changes, it does not change Glean's behaviour.'
@brizental brizental requested a review from travis79 July 22, 2021 12:34
Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

This LGTM, good job catching this early and fixing it quickly!

resolve(pingBody as JSONObject);
};

setTimeout(() => reject(), 2000);
});
}

post(url: string, body: string): Promise<UploadResult> {
async post(url: string, body: string): Promise<UploadResult> {
// Make this a tiny bit slow to mimic reality a bit better.
Copy link
Member

Choose a reason for hiding this comment

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

Smart!

@brizental brizental merged commit 51ffec2 into mozilla:main Jul 22, 2021
@brizental brizental deleted the shutdown-bug branch July 22, 2021 13:50
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.

2 participants