Skip to content

Conversation

@not-matthias
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the GitHub Actions logger to only enable debug logs when GitHub Actions debugging is explicitly enabled, improving performance by avoiding unnecessary debug log processing.

  • Adds dynamic log level detection based on GitHub Actions environment variables
  • Refactors GithubActionLogger from a unit struct to a struct with configurable log level
  • Updates logger instantiation to use the new constructor

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/run/run_environment/github_actions/provider.rs Updates logger instantiation to use new constructor
src/run/run_environment/github_actions/logger.rs Implements dynamic log level configuration based on environment variables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias force-pushed the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch from 66a856b to 171e73e Compare September 16, 2025 16:58
@not-matthias not-matthias requested a review from art049 September 16, 2025 16:59
impl GithubActionLogger {
pub fn new() -> Self {
// Only enable debug logging if it's enabled in GitHub Actions.
let log_level = if env::var("RUNNER_DEBUG").unwrap_or_default() == "1" {
Copy link
Member

Choose a reason for hiding this comment

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

Do you have docs on this RUNNER_DEBUG flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's mentioned in the docs here: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#runner-context, i'll add a link in the code

Copy link
Member

Choose a reason for hiding this comment

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

Ah thanks. Actually this page is about the env variables: https://docs.github.com/en/actions/reference/workflows-and-actions/variables

@not-matthias not-matthias force-pushed the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch from 171e73e to 06a03e0 Compare September 18, 2025 15:27
@not-matthias not-matthias requested a review from art049 September 18, 2025 15:27
@not-matthias not-matthias force-pushed the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch from 06a03e0 to 682663e Compare September 18, 2025 15:27
@not-matthias not-matthias force-pushed the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch from 682663e to f7f23f0 Compare September 18, 2025 15:29
@not-matthias not-matthias merged commit f7f23f0 into main Sep 18, 2025
9 checks passed
@not-matthias not-matthias deleted the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch September 18, 2025 16:14
@not-matthias not-matthias restored the cod-1348-perf-debug-logs-of-currentbenchmark-are-shown-in-github branch September 29, 2025 08:59
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