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

feat: dependencies.sh script for dev onboarding #1116

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

dorimedini-starkware
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware commented Sep 30, 2024

This change is Reviewable

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 1 files reviewed, all discussions resolved (waiting on @alon-dotan-starkware and @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

#!/bin/bash

sudo -s

when running this script, sudo context is entered but the apt commands aren't run until I exit.
Why?
should every command in this script be prepended with sudo explicitly?

Code quote:

sudo -s

scripts/dependencies.sh line 4 at r1 (raw file):

sudo -s
pushd /tmp

instead of cd, + popd added at the end

Code quote:

pushd /tmp

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 1 files reviewed, all discussions resolved (waiting on @alon-dotan-starkware and @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, dorimedini-starkware wrote…

when running this script, sudo context is entered but the apt commands aren't run until I exit.
Why?
should every command in this script be prepended with sudo explicitly?

explicit sudos seem to work

Copy link
Contributor

@alon-dotan-starkware alon-dotan-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, dorimedini-starkware wrote…

explicit sudos seem to work

Its duplicate code... Just import the function

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, alon-dotan-starkware wrote…

Its duplicate code... Just import the function

hmmm... what would be the difference between this script and setup_native_deps.sh?
should we just rename setup_native_deps to dependencies, or should we decouple these scripts?

Signed-off-by: Dori Medini <dori@starkware.co>
Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, dorimedini-starkware wrote…

hmmm... what would be the difference between this script and setup_native_deps.sh?
should we just rename setup_native_deps to dependencies, or should we decouple these scripts?

if we want to keep the scripts separate... which invocations of setup_native_deps should actually invoke dependencies?

Copy link
Collaborator

@Yoni-Starkware Yoni-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, dorimedini-starkware wrote…

if we want to keep the scripts separate... which invocations of setup_native_deps should actually invoke dependencies?

We can add the protobuf deps in here

Copy link
Contributor

@ShahakShama ShahakShama 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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

We can add the protobuf deps in here

@Yoni-Starkware will do that in a future PR after this is merged

Copy link
Contributor

@ShahakShama ShahakShama 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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, ShahakShama wrote…

@Yoni-Starkware will do that in a future PR after this is merged

*I will

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, ShahakShama wrote…

*I will

when someone LGTMs I'll merge :)

Copy link
Contributor

@alon-dotan-starkware alon-dotan-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: 0 of 1 files reviewed, all discussions resolved (waiting on @noaov1)


scripts/dependencies.sh line 3 at r1 (raw file):

Previously, dorimedini-starkware wrote…

when someone LGTMs I'll merge :)

can we NOT!! pust protobuf here and add it to the build.rs?

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-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: 0 of 13 files reviewed, 2 unresolved discussions (waiting on @noaov1)


Dockerfile line 14 at r4 (raw file):

COPY scripts/install_build_tools.sh .
COPY scripts/dependencies.sh .

you will still need setup_native_deps, this script is just a wrapper

Code quote:

COPY scripts/dependencies.sh .

.github/workflows/blockifier_ci.yml line 32 at r4 (raw file):

      - 'crates/native_blockifier/**'
      - 'scripts/build_native_blockifier.sh'
      - 'scripts/dependencies.sh'

if this job needs triggering on change to dev setup script, then it needs triggering when setup_native_deps is edited, right?

same comment for all CI workflows in this PR where you added dependencies.sh to the triggers

Code quote:

'scripts/dependencies.sh'

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.00%. Comparing base (b0cfe82) to head (d8b79c6).
Report is 185 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b0cfe82) and HEAD (d8b79c6). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (b0cfe82) HEAD (d8b79c6)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1116       +/-   ##
===========================================
- Coverage   74.18%   47.00%   -27.19%     
===========================================
  Files         359      246      -113     
  Lines       36240    26859     -9381     
  Branches    36240    26859     -9381     
===========================================
- Hits        26886    12626    -14260     
- Misses       7220    13332     +6112     
+ Partials     2134      901     -1233     
Flag Coverage Δ
47.00% <ø> (-27.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 13 files reviewed, all discussions resolved (waiting on @noaov1)

Copy link
Contributor

@alon-dotan-starkware alon-dotan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3.
Reviewable status: 0 of 13 files reviewed, all discussions resolved (waiting on @noaov1)

Copy link
Contributor

@alon-dotan-starkware alon-dotan-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 13 files reviewed, all discussions resolved (waiting on @noaov1)

Copy link
Contributor

@alon-dotan-starkware alon-dotan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 13 of 13 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@alon-dotan-starkware alon-dotan-starkware merged commit 7427d48 into main Oct 1, 2024
26 checks passed
@alon-dotan-starkware alon-dotan-starkware deleted the dori/dependencies-script branch October 1, 2024 07:56
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 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.

4 participants