[Swarming] Crash service on startup #5285
Merged
Merged
Conversation
letitz
reviewed
May 21, 2026
jardondiego
reviewed
May 27, 2026
Collaborator
|
I'd suggest rebase your branch on top of master so we don't merge many commits like Other than that, LGTM |
0d9a46b to
f537ad7
Compare
Collaborator
Author
Done :D |
javanlacerda
approved these changes
Jun 10, 2026
| id='swarming', | ||
| service=mock.Mock(return_value=self.mock_swarming_service), | ||
| feature_flag=None, | ||
| feature_flag=mock.Mock(enabled=True), |
Collaborator
There was a problem hiding this comment.
Should we have a test case for enabled=False?
Collaborator
Author
There was a problem hiding this comment.
Sure, i didn't read this before merging(sorry about that) but ill add it in this open pr
Collaborator
Author
There was a problem hiding this comment.
Wait nvm, i did add a case for it at src/clusterfuzz/_internal/tests/core/remote_task/remote_task_test.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
SwarmingServiceand other remote task services will now be instantiated inRemoteTaskGatebased on the their feature flag.Now the
SwarmingServicewill crash horribly at startup, this is done to avoid happing an api instances that does nothing, and a swarming service that just fails when called, with this new logic we make sure that all parts work as expected and if they dont.... well we just wont be able to fully schedule on envs where swarming is enabled.Background
This PR comes from a discussion & agreement to a required change from this review
Changes
SwarmingServiceconstructor if the swarming config was not foundRemoteTaskGateto conditionally instantiate services based on the linked feature flag.