-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚨 Try these New Features:
|
798be68
to
3549e97
Compare
Artifacts upload workflows: |
Benchmark movements: |
2f3ac1a
to
32f1a4b
Compare
commit-id:c2547652
e10fbc6
to
7a2eebf
Compare
32f1a4b
to
a2a1e27
Compare
commit-id:6207c777
7a2eebf
to
21525e8
Compare
a2a1e27
to
f92053a
Compare
commit-id:96859c27
f92053a
to
ae3a0f8
Compare
Benchmark movements: |
There was a problem hiding this 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);
});
There was a problem hiding this 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
.
There was a problem hiding this 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 ofCommand::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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 5 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
commit-id:96859c27
Stack: