Skip to content

[Tracing] Emit Testcase Creation events #4834

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

Merged
merged 6 commits into from
Jun 25, 2025

Conversation

ViniciustCosta
Copy link
Collaborator

@ViniciustCosta ViniciustCosta commented Jun 23, 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:

@ViniciustCosta ViniciustCosta marked this pull request as ready for review June 23, 2025 20:32
Copy link
Collaborator

@vitorguidi vitorguidi left a comment

Choose a reason for hiding this comment

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

lgtm, but restrain for merging untill you have seen fuzz task/upload_testcase creation events in a dev deployment

@ViniciustCosta ViniciustCosta merged commit ac5850d into master Jun 25, 2025
7 checks passed
@ViniciustCosta ViniciustCosta deleted the feat/testcase_creation_events branch June 25, 2025 20:54
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