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

[scheduler] Add auto-retries on pubsub notifications #1657

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

CaseyHillers
Copy link
Contributor

flutter/flutter#92300

This is dependent on #1656 (the test will pass after it lands)

@@ -81,6 +88,20 @@ class PostsubmitLuciSubscription extends SubscriptionHandler {
await datastore.insert(<Task>[task]);
log.fine('Updated datastore');

if (task.status == Task.statusFailed || task.status == Task.statusInfraFailure) {
log.fine('Trying to auto-retry...');
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this also handle the manual retry?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ResetProdTask is for manual retries, but it uses the same LuciBuildService.checkRerunBuilder call (granted it can ignore the default checks)

AuthenticationProvider? authProvider,
@visibleForTesting this.datastoreProvider = DatastoreService.defaultProvider,
required this.luciBuildService,
required this.scheduler,
}) : super(
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using this topic luci-postsubmit anywhere now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's used for targets that are using the cocoon scheduler (so cocoon, plugins, packages, and the engine's ci.yaml roller)

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you point me to the locations referencing this topic? I am not able to find..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The topic here is luci-postsubmit, where the referenced line uses topic luci-builds-prod. Is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's two parts to pubsub:

  1. Topics. This is generic, and requires a subscription
  2. Subscription. There can be N of these per topic to support multiple consumers

With that said, BuildBucket publishes the messages to the luci-postsubmit topic, and Cocoon has a single subscription of luci-builds-prod to get the messages. In the future, someone might add another subscription dedicated for the results processing aspect

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that makes sense. Thanks for the explanations.

Copy link
Contributor

@keyonghan keyonghan left a comment

Choose a reason for hiding this comment

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

LGTM

@CaseyHillers CaseyHillers added the waiting for tree to go green Merge PR when tree becomes green via fluttergithubbot label Mar 10, 2022
@fluttergithubbot fluttergithubbot merged commit cb377a8 into flutter:main Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for tree to go green Merge PR when tree becomes green via fluttergithubbot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants