Skip to content

[BLD]: record workflow compute metrics #4670

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

codetheweb
Copy link
Contributor

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@codetheweb codetheweb force-pushed the bld-add-workflow-metric-logging branch from 52b30c9 to b3c05ab Compare May 29, 2025 17:46
@entelligence-ai-reviews

Review Summary

Skipped posting 1 drafted comments based on your review threshold. Feel free to update them here.

Draft Comments
.github/workflows/_go-tests.yml:17-17
Using a third-party action with a mutable tag reference (`@v2`) instead of pinning to a specific commit hash creates a security risk. The action could be updated maliciously or introduce breaking changes.

Scores:

  • Production Impact: 3
  • Fix Specificity: 5
  • Urgency Impact: 3
  • Total Score: 11

Reason for filtering: Comment addresses a legitimate security concern with GitHub Actions and provides a specific fix

Analysis: While this is a valid security concern about mutable action references, the production impact is moderate since exploitation requires specific circumstances. The fix is very specific (exact version provided) but urgency is medium as it's a preventive security measure rather than an immediate threat. Total score of 11 falls below the 13 threshold.

@entelligence-ai-reviews

Walkthrough

This PR enhances CI observability by adding a telemetry collection step to all major GitHub Actions workflows, including build, test, and nightly jobs. The new step leverages the 'catchpoint/workflow-telemetry-action@v2' action, configured to avoid commenting on pull requests. The change is strictly additive, ensuring no impact on existing build, test, or release logic, and aims to facilitate monitoring and analysis of workflow executions across the project.

Changes

File(s) Summary
.github/workflows/_build_release_container.yml
.github/workflows/_go-tests.yml
.github/workflows/_python-tests.yml
.github/workflows/_rust-tests.yml
.github/workflows/nightly-tests.yml
.github/workflows/pr.yml Added a 'Collect Workflow Telemetry' step using 'catchpoint/workflow-telemetry-action@v2' after the checkout step in each workflow/job, with 'comment_on_pr' set to false. No existing steps or logic were modified or removed.

Sequence Diagram

This diagram shows the interactions between components:

sequenceDiagram
    title GitHub Actions Workflow with Telemetry Collection
    
    participant GH as GitHub Actions Runner
    participant Checkout as actions/checkout@v4
    participant Telemetry as catchpoint/workflow-telemetry-action@v2
    participant DockerSetup as ./.github/actions/docker
    
    Note over GH: Workflow starts
    
    GH->>Checkout: Run checkout action
    Note over Checkout: Fetches repository with<br/>fetch-depth: 0
    Checkout-->>GH: Repository checked out
    
    %% New telemetry action added in PR
    GH->>Telemetry: Run workflow telemetry action
    Note over Telemetry: Collects workflow telemetry<br/>comment_on_pr: false
    Telemetry-->>GH: Telemetry collected
    
    GH->>DockerSetup: Set up Docker
    Note over DockerSetup: Configures Docker environment
    DockerSetup-->>GH: Docker setup complete
    
    Note over GH: Workflow continues...
Loading

▶️AI Code Reviews for VS Code, Cursor, Windsurf
Install the extension

Note for Windsurf
Please change the default marketplace provider to the following in the windsurf settings:
Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery
Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items

Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @entelligenceai + *your message*
Example: @entelligenceai Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @entelligenceai + *feedback*
Example: @entelligenceai Do not comment on `save_auth` function !

Also you can trigger various commands with the bot by doing
@entelligenceai command

The current supported commands are

  1. config - shows the current config
  2. retrigger_review - retriggers the review

More commands to be added soon.

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