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

fix: unify environments between the two modes #59

Merged
merged 1 commit into from
Feb 6, 2025
Merged

fix: unify environments between the two modes #59

merged 1 commit into from
Feb 6, 2025

Conversation

art049
Copy link
Member

@art049 art049 commented Feb 5, 2025

@adriencaccia there was confusion between Mode and Executor, so I refactored this logic. I hadn't pulled it, so I redid the changes you made in the last commit, but in another way.

@art049 art049 force-pushed the env-fixes branch 2 times, most recently from 7d05444 to 0642648 Compare February 5, 2025 15:13
Copy link
Member

@adriencaccia adriencaccia left a comment

Choose a reason for hiding this comment

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

LGTM, only one small remark on where to define the RunnerMode linked to an Executor

cmd.arg(ARCH).arg("-R");
// Configure the environment
cmd.env(
cmd.envs(get_base_injected_env(
RunnerMode::Instrumentation,
Copy link
Member

Choose a reason for hiding this comment

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

Should we have the executor define its RunnerMode?

So that we do not have to hardcode it here, and instead have it as a method of the Executor trait

Copy link
Member Author

@art049 art049 Feb 6, 2025

Choose a reason for hiding this comment

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

this is not useful with the valgrind executor since it needs refactoring to be properly implemented. We could drill the mode into measure but that would be pointless.

Copy link

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

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

lgtm, tested locally and it works, no more invalid measurement mode: valgrind 😎

Comment on lines 2 to 4
use crate::prelude::*;
use crate::run::instruments::mongo_tracer::MongoTracer;
use crate::run::{check_system::SystemInfo, config::Config};

Choose a reason for hiding this comment

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

nit: import grouping

Copy link
Member Author

Choose a reason for hiding this comment

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

can cargo fmt handle this?

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

nevermind it's unstable and therefore not able to be put in rustfmt.toml, it needs to be set at IDE level 😢

Copy link
Member Author

Choose a reason for hiding this comment

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

:(

@art049 art049 merged commit 958c16e into main Feb 6, 2025
9 checks passed
@art049 art049 deleted the env-fixes branch February 6, 2025 10:16
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