-
Notifications
You must be signed in to change notification settings - Fork 54
misc: updates to run simulated omicron in container #8996
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,12 +31,14 @@ function usage | |
|
||
ASSUME_YES="false" | ||
SKIP_PATH_CHECK="false" | ||
OMIT_SUDO="false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels sketchy to me. But I don't think it's a security issue (we were already running with |
||
RETRY_ATTEMPTS=3 | ||
while getopts ypr: flag | ||
while getopts ypsr: flag | ||
do | ||
case "${flag}" in | ||
y) ASSUME_YES="true" ;; | ||
p) SKIP_PATH_CHECK="true" ;; | ||
s) OMIT_SUDO="true" ;; | ||
r) RETRY_ATTEMPTS=${OPTARG} ;; | ||
*) usage | ||
esac | ||
|
@@ -130,11 +132,16 @@ function install_packages { | |
'libclang-dev' | ||
'libsqlite3-dev' | ||
) | ||
sudo apt-get update | ||
if [[ "${OMIT_SUDO}" == "false" ]]; then | ||
maybe_sudo="sudo" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, feel free to ignore: we could as well set the global |
||
else | ||
maybe_sudo="" | ||
fi | ||
$maybe_sudo apt-get update | ||
if [[ "${ASSUME_YES}" == "true" ]]; then | ||
sudo apt-get install -y "${packages[@]}" | ||
$maybe_sudo apt-get install -y "${packages[@]}" | ||
else | ||
confirm "Install (or update) [${packages[*]}]?" && sudo apt-get install "${packages[@]}" | ||
confirm "Install (or update) [${packages[*]}]?" && $maybe_sudo apt-get install "${packages[@]}" | ||
fi | ||
elif [[ "${HOST_OS}" == "SunOS" ]]; then | ||
CLANGVER=15 | ||
|
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.
It seems like the command itself has a default built into it so I feel like you shouldn't need this here? Or is the problem that the relative paths are wrong (e.g., they're different between this context and the common
cargo xtask omicron-dev run-all
context)? In that case should we figure out the right path based on CARGO_HOME?This seems like not a big deal, I guess.