-
Notifications
You must be signed in to change notification settings - Fork 578
FIX Enable testcase uploading during pruning #4825
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
Open
vitaliset
wants to merge
7
commits into
master
Choose a base branch
from
revert_a8aafb7
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+41
−25
Conversation
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
src/clusterfuzz/_internal/bot/tasks/utasks/corpus_pruning_task.py
Outdated
Show resolved
Hide resolved
src/clusterfuzz/_internal/bot/tasks/utasks/corpus_pruning_task.py
Outdated
Show resolved
Hide resolved
src/clusterfuzz/_internal/bot/tasks/utasks/corpus_pruning_task.py
Outdated
Show resolved
Hide resolved
ViniciustCosta
added a commit
that referenced
this pull request
Jun 25, 2025
## Description Adding emits for `TestcaseCreationEvent`, where new testcases are created and stored into datastore. This happens during: * upload_testcase (manual upload) * corpus_pruning_task * fuzz_task Note: For Corpus Pruning, the feature of uploading testcases for crashes found during pruning is commented out (this is being tracked and fixed at #4825). Thus, both the event emission and the unit tests are disabled. I enabled it locally and ran the unit tests, which completed successfully. As referenced in our tracing design doc, "Testcase Creation" section. b/394048114 ## Tests #### Unit tests Added unit tests to guarantee that the events are correctly emitted when a testcase is created in all these contexts. For `upload_testcase` and `corpus_pruning`, I leveraged some existing unit tests that already asserted the testcase creation steps. For `fuzz_task`, it was necessary to create a new test in order to call the testcase creation method and assert the event emission. #### Runtime tests For runtime tests, since it is difficult to actually trigger these code paths locally, I intend to deploy to our dev/staging environments and monitor the events. Evidence of events being emitted in dev: * Fuzz task ([link to logs creating testcase](https://pantheon.corp.google.com/logs/query;cursorTimestamp=2025-06-25T15:19:40.084565Z;duration=PT3H;query=jsonPayload.extras.clusterfuzz_version%3D%2234abee68%22%0AjsonPayload.extras.task_name%3D%22fuzz%22%0AjsonPayload.extras.stage%3D%22postprocess%22%0Atimestamp%3D%222025-06-25T15:19:40.084565Z%22%0AinsertId%3D%22e683gef6i7ak9%22?project=clusterfuzz-development)): Event:  Actual testcase created:  * Upload testcase event:  Actual testcase created: 
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.
b/421159107