Skip to content

Skip incompatible jobs in variant_task.utask_preprocess - #5403

Merged
dylanjew merged 1 commit into
dylanj/task-errors-1from
dylanj/task-errors-2
Aug 6, 2026
Merged

Skip incompatible jobs in variant_task.utask_preprocess#5403
dylanjew merged 1 commit into
dylanj/task-errors-1from
dylanj/task-errors-2

Conversation

@dylanjew

@dylanjew dylanjew commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Catch TargetNotFoundError and InvalidFuzzerError in variant_task.utask_preprocess, logging a warning and returning None to cleanly skip incompatible jobs without logging an exceptional metric.

When we schedule variant tasks, we aggressively schedule variant tasks to determine whether the crash can repro on other platforms/builds. We don't know whether all of these are valid combiniations, so many of these tasks can fail when trying to set up the build.

Note: hide whitespace

b/542644855

Testing

deployed to dev. haven't seen any of these new metrics yet but no errors either.

Related PRs

  1. Capture user defined errors separately from UNHANDLED_EXCEPTION #5402
  2. This PR: Skip incompatible jobs in variant_task.utask_preprocess #5403
  3. Short-circuit duplicate/deleted testcases when processing/scheduling tasks #5405
  4. Gracefully handle InvalidTestcaseError in variant and minimize tasks #5406

@dylanjew
dylanjew requested a review from a team as a code owner July 30, 2026 15:54
@dylanjew
dylanjew requested a review from aakallam July 30, 2026 15:54
Catch `TargetNotFoundError` and `InvalidFuzzerError` in variant_task.utask_preprocess, logging a warning and returning None to cleanly skip incompatible jobs without logging an exceptional metric.

When we schedule variant tasks, we aggressively schedule variant tasks
to determine whether the crash can repro on other platforms/builds. We
don't know whether all of these are valid combiniations, so many of
these tasks can fail when trying to set up the build.
@dylanjew
dylanjew force-pushed the dylanj/task-errors-2 branch from 5b5ac69 to 83f5d21 Compare August 6, 2026 14:56
@dylanjew
dylanjew merged commit 68fa656 into master Aug 6, 2026
23 checks passed
@dylanjew
dylanjew deleted the dylanj/task-errors-2 branch August 6, 2026 15:14
dylanjew added a commit that referenced this pull request Aug 6, 2026
In `_MetricRecorder.__exit__`, check whether the exception inherits from
`errors.Error `or `testcase_manager.TestcaseManagerError` and record the
coresponding error_condition instead of `'UNHANDLED_EXCEPTION'`.

We want to alert based on `UNHANDLED_EXCEPTION`, and these user defined
Errors represent exceptional but expected scenariors in Clusterfuzz
where the task is not meant to succeed. For example, there is no build
for a variant task that we triggered, or the fuzzer is no longer valid.
In these cases, we typically want to ACK the task and skip it, but these
expected errors make it hard to set up alerts on real issues.

Here's an example of
[logs](https://cloudlogging.app.goo.gl/yMccrYFjRKxeJ1G68) of 2 deleted
Testcases going through the Variant task, failing, and getting retried
multiple times and triggering an alert due to the postprocess error rate
spikes above 20%

b/542644855

### Testing
deployed to dev. haven't seen any of these new metrics yet but no errors
either.

### Related PRs

1. **This PR:** #5402 
2. #5403 
3. #5405 
4. #5406
dylanjew added a commit that referenced this pull request Aug 6, 2026
…tasks (#5405)

During post minimize tasks, if a test case is deleted or marked
duplicate for whatever reason, we should not continue processing the
post minimize tasks. This PR stops scheduling and processing for these
tasks.

In `commands.process_command_impl`, short-circuit and ack the message if
a testcase-based task receives a deleted or duplicate testcase. In
`task_creation.create_postminimize_tasks`, skip scheduling tasks on
duplicate testcases.

Note: hide whitespace

b/542644855

### Testing
deployed to dev. haven't seen any of these new metrics yet but no errors
either.

### Related PRs

1. #5402 
2. #5403 
3. **This PR:** #5405 
4. #5406
dylanjew added a commit that referenced this pull request Aug 6, 2026
…5406)

Catch `errors.InvalidTestcaseError` when retrieving testcase entities in
utask_preprocess and utask_postprocess of variant_task and
minimize_task, returning cleanly without raising an unhandled exception.

Variant tasks are notoriously error prone because we attempt to repro a
crash by fanning out across builds/platforms which might not be
supported combinations for whatever reasons. The goal here is to reduce
the noise from expected failures so we can alert on real issues.

b/542644855

### Testing
deployed to dev. haven't seen any of these new metrics yet but no errors
either.

### Related PRs

1. #5402 
2. #5403 
3. #5405 
4. **This PR:** #5406
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.

3 participants