Skip to content

Support Platform Filtering in ENABLE_FUZZ_FOR_BOTS Feature Flag - #5411

Merged
javanlacerda merged 2 commits into
masterfrom
javan.add-platform-feature-flag
Aug 5, 2026
Merged

Support Platform Filtering in ENABLE_FUZZ_FOR_BOTS Feature Flag#5411
javanlacerda merged 2 commits into
masterfrom
javan.add-platform-feature-flag

Conversation

@javanlacerda

Copy link
Copy Markdown
Collaborator

Update ENABLE_FUZZ_FOR_BOTS feature flag check in get_task() to verify that the bot's current platform is present in the flag's comma-separated string_value before retrieving fuzzing tasks.

Context

We should keep the clusterfuzz-linux bots only for running trusted tasks on internal, then this flag would be used keep bots running fuzz for Windows and Mac, but not for linux.

Changes

  • src/clusterfuzz/_internal/base/tasks/__init__.py: In get_task(), parse allowed platforms from FeatureFlags.ENABLE_FUZZ_FOR_BOTS.string_value and require environment.platform().lower() to match before calling get_fuzz_task().
  • src/clusterfuzz/_internal/tests/core/base/tasks/tasks_test.py: Added GetTaskFuzzingFeatureFlagTest covering enabled/disabled states, matching/non-matching platforms, and empty values.

Verification

  • Unit tests passed (pipenv run python butler.py py_unittest -t core -p tasks_test.py)
  • Linting passed (pipenv run python butler.py lint)

Signed-off-by: Javan Lacerda <javanlacerda@google.com>
@javanlacerda
javanlacerda requested a review from a team as a code owner August 4, 2026 17:01
@javanlacerda
javanlacerda requested a review from PauloVLB August 4, 2026 17:01

@PauloVLB PauloVLB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aside from the typo fixes in the tests, the code SGTM.

The string_value you are considering is mac,windows?

Comment thread src/clusterfuzz/_internal/tests/core/base/tasks/tasks_test.py Outdated
Comment thread src/clusterfuzz/_internal/tests/core/base/tasks/tasks_test.py Outdated
@javanlacerda

Copy link
Copy Markdown
Collaborator Author

Aside from the typo fixes in the tests, the code SGTM.

The string_value you are considering is mac,windows?

Yes, mac and windows

@javanlacerda
javanlacerda merged commit ac517f2 into master Aug 5, 2026
15 checks passed
@javanlacerda
javanlacerda deleted the javan.add-platform-feature-flag branch August 5, 2026 13:30
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