Skip to content

Swarming: Fuzzing hours to be logged in metrics#5248

Open
IvanBM18 wants to merge 7 commits intomasterfrom
feature/swarming/improve_metrics
Open

Swarming: Fuzzing hours to be logged in metrics#5248
IvanBM18 wants to merge 7 commits intomasterfrom
feature/swarming/improve_metrics

Conversation

@IvanBM18
Copy link
Copy Markdown
Collaborator

@IvanBM18 IvanBM18 commented Apr 20, 2026

Currently if we run fuzzing sessions on swarming, the metrics dont seem to register those fuzzing hours correctly:
image
Note that the swarming fuzzing hours appear as empty: runtime=

  • This small PR adds swarming as a possible runtime
  • Now that theres no circular dependency between logs <-> environment modules, i removed some methods that were declared twice to avoid this circular dependency and correctly imported them from a single module
  • Also adds unit tests

@IvanBM18 IvanBM18 self-assigned this Apr 20, 2026
@IvanBM18 IvanBM18 added the swarming Changes related to the clusterfuzz-swarming integration label Apr 20, 2026
Comment thread src/clusterfuzz/_internal/bot/tasks/utasks/__init__.py
Comment thread src/clusterfuzz/_internal/metrics/logs.py Outdated
Comment thread src/clusterfuzz/_internal/metrics/logs.py Outdated
@IvanBM18 IvanBM18 marked this pull request as ready for review April 28, 2026 04:14
@IvanBM18 IvanBM18 requested a review from a team as a code owner April 28, 2026 04:14
Comment thread src/clusterfuzz/_internal/system/environment.py Outdated
_default_extras = {}


def _is_running_on_k8s():
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Now that we dont have a circular dependency we can start using the same method that its declared on environment.py

os.getenv('SERVER_SOFTWARE', '').startswith('Development/'))


def _is_running_on_app_engine():
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same as above:
Now that we dont have a circular dependency we can start using the same method that its declared on environment.py

@jardondiego
Copy link
Copy Markdown
Collaborator

It looks like we have failing tests. Can you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

swarming Changes related to the clusterfuzz-swarming integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants