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

chore: add shell command builder #2264

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.37%. Comparing base (e3165c4) to head (ae3a0f8).
Report is 572 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2264       +/-   ##
===========================================
+ Coverage   40.10%   77.37%   +37.26%     
===========================================
  Files          26      386      +360     
  Lines        1895    40309    +38414     
  Branches     1895    40309    +38414     
===========================================
+ Hits          760    31188    +30428     
- Misses       1100     6820     +5720     
- Partials       35     2301     +2266     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

Benchmark movements:
full_committer_flow performance regressed!
full_committer_flow time: [30.112 ms 30.161 ms 30.214 ms]
change: [+1.6244% +1.8821% +2.1460%] (p = 0.00 < 0.05)
Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severe

Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [35.112 ms 35.615 ms 36.198 ms]
change: [+1.1938% +2.7710% +4.4111%] (p = 0.00 < 0.05)
Performance has regressed.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) high mild
8 (8.00%) high severe

Copy link
Contributor

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 5 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


a discussion (no related file):
Is the end goal of the function create_shell_command to replace every other instance of Command::new in the repo?

Playing devil's advocate:
Isn't it an overkill?
Answer:
We just spent a couple of weeks fighting this kind of inconsistency. This assures the CI runs more similarly to an executable.


crates/infra_utils/src/command.rs line 27 at r2 (raw file):

    env::vars().filter(|(key, _)| key.starts_with("CARGO_")).for_each(|(key, _)| {
        command.env_remove(key);
    });

This is just for safety, right? to ensure that every shell command is run consistently.

Code quote:

    // Filter out all CARGO_ environment variables.
    env::vars().filter(|(key, _)| key.starts_with("CARGO_")).for_each(|(key, _)| {
        command.env_remove(key);
    });

Copy link
Contributor Author

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on @ArniStarkware)


crates/infra_utils/src/command.rs line 27 at r2 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

This is just for safety, right? to ensure that every shell command is run consistently.

This is to ensure (or, make an effort in the direction of ensuring) that we do not have side effects of running our executables due to using cargo. I.e., I'd like this to be a step in a direction of reducing the differences of cargo run X and cargo build X; ./X .

Copy link
Contributor Author

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on @ArniStarkware)


a discussion (no related file):

Previously, ArniStarkware (Arnon Hod) wrote…

Is the end goal of the function create_shell_command to replace every other instance of Command::new in the repo?

Playing devil's advocate:
Isn't it an overkill?
Answer:
We just spent a couple of weeks fighting this kind of inconsistency. This assures the CI runs more similarly to an executable.

No, only those that we need to make sure we can run without cargo. Example, the sequencer node.

Copy link
Contributor

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 5 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware changed the base branch from spr/main/6207c777 to main November 25, 2024 13:23
@Itay-Tsabary-Starkware Itay-Tsabary-Starkware merged commit 066e5ce into main Nov 25, 2024
22 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants