Skip to content
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

enabling step debug logging for codspeed #125

Closed
wants to merge 5 commits into from

Conversation

jantimon
Copy link
Owner

@jantimon jantimon commented Jul 14, 2024

Adrien gave us a great hint to find out why codspeed became flaky:

By looking at this log from a run, it seems that now the node flags needed to make node's execution non-flaky are no longer present: https://github.com/jantimon/next-yak/actions/runs/9926270270/job/27419653757?pr=120#step:10:27
To continue investigating, can you activate step debug logging:https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging, and create a PR?

Summary by CodeRabbit

  • Chores
    • Added ACTIONS_STEP_DEBUG: true environment variable in the benchmarks job to aid in debugging.
    • Updated the workflow file codspeed.yml to improve indentation of branch lists and paths.
    • Upgraded the action version for running benchmarks from v1 to v2 to ensure compatibility and access to the latest features.

Copy link

vercel bot commented Jul 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-yak-benchmark ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 2:31pm
yacijs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 2:31pm

Copy link

coderabbitai bot commented Jul 14, 2024

Walkthrough

This update focuses on enhancing the .github/workflows/codspeed.yml workflow file. Key changes include adding the environment variable ACTIONS_STEP_DEBUG: true to the benchmarks job, adjusting indentation for branch lists and paths under the on section, and updating the benchmark action version from v1 to v2. These modifications aim to improve debugging capabilities and ensure the workflow aligns with the latest action versions.

Changes

File Summary
.github/workflows/codspeed.yml Added ACTIONS_STEP_DEBUG: true environment variable to the benchmarks job and adjusted indentation of branch lists and paths under the on section. Updated the benchmark action version from v1 to v2.

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a49ef00 and 3cea88c.

Files selected for processing (1)
  • .github/workflows/codspeed.yml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/codspeed.yml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codspeed-hq bot commented Jul 14, 2024

CodSpeed Performance Report

Merging #125 will improve performances by 18.93%

Comparing feature/enabling-step-debug-logging (3cea88c) with main (7b34459)

Summary

⚡ 1 improvements
✅ 1 untouched benchmarks

Benchmarks breakdown

Benchmark main feature/enabling-step-debug-logging Change
render KanjiLetterComponentStyled 346.7 ms 291.5 ms +18.93%

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fc03370 and bca864b.

Files selected for processing (1)
  • .github/workflows/codspeed.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/codspeed.yml

@adriencaccia
Copy link
Contributor

Hey @jantimon, thanks for opening the PR!
In order for the step debug logging to work, you need to set the ACTIONS_STEP_DEBUG at the repository level, either in the actions variables or secrets.

Can you also bump the CodSpeed action to v2? There is no breaking changes, and it will allow me to have more information on my end

@jantimon
Copy link
Owner Author

Added a new secret:
shot-9aLnKo4X@2x

@adriencaccia
Copy link
Contributor

Hey @jantimon and @Mad-Kat, I found and fixed the issue in adriencaccia/next-yak@30266b8 (#3)

Bumping @codspeed/benchmark.js-plugin to the latest 3.1.0 fixes the issue.

The problem was that @codspeed/benchmark.js-plugin@2.2.0 was installed with @codspeed./core@2.3.1. And between the two versions, the node introspection that was setting the necessary node flags changed, thus it was not working anymore.

I analyzed the variance on some runs, and it is quite low, as it was before:

Found 21 runs for adriencaccia/next-yak (30266b8abf1258c83e3de16d64b57c6feb36ad09)
┌─────────────────────────────────────────────────────────────────────────────────────┬────────────┬───────────────────┬─────────────────────┬──────────┬──────────────────┐
│                                       (index)                                       │  average   │ standardDeviation │ varianceCoefficient │  range   │ rangeCoefficient │
├─────────────────────────────────────────────────────────────────────────────────────┼────────────┼───────────────────┼─────────────────────┼──────────┼──────────────────┤
│  packages/benchmark/codspeed/dist/index.bench.mjs::render KanjiLetterComponentYak   │ '262.9 ms' │     '1.3 ms'      │       '0.5%'        │ '5.5 ms' │      '2.1%'      │
│ packages/benchmark/codspeed/dist/index.bench.mjs::render KanjiLetterComponentStyled │ '314.6 ms' │    '511.7 µs'     │       '0.2%'        │ '2.1 ms' │      '0.7%'      │
└─────────────────────────────────────────────────────────────────────────────────────┴────────────┴───────────────────┴─────────────────────┴──────────┴──────────────────┘

I opened #132 to fix all of that!

@jantimon
Copy link
Owner Author

@adriencaccia wow really cool thank you :)

can we disable step debugging again?

@jantimon jantimon closed this Jul 18, 2024
@jantimon jantimon deleted the feature/enabling-step-debug-logging branch July 18, 2024 14:31
@adriencaccia
Copy link
Contributor

can we disable step debugging again?

Yes, sure!

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