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
Integration test should work for Mac OS. #334
Integration test should work for Mac OS. #334
Conversation
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 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 12 unresolved discussions (waiting on @MarcusSorealheis)
run_integration_tests.sh
line 19 at r1 (raw file):
if [[ $EUID -eq 0 ]]; then echo "This script shoudl not be run as root."
Misspelled.
run_integration_tests.sh
line 49 at r1 (raw file):
done echo "What operating system OSTYPE: $OSTYPE"
This ENV is not set on all OSs.
run_integration_tests.sh
line 59 at r1 (raw file):
TEST_PATTERNS=("*") fi
Needless new line.
run_integration_tests.sh
line 73 at r1 (raw file):
sudo docker-compose rm --stop -f echo "What operating system OSTYPE: $OSTYPE"
nit: ditto
run_integration_tests.sh
line 77 at r1 (raw file):
export TMPDIR=$HOME/.cache/turbo-cache/ sudo mkdir -p "$TMPDIR"
don't mkdir with sudo, it causes issues.
run_integration_tests.sh
line 79 at r1 (raw file):
sudo mkdir -p "$TMPDIR" if [[ "$OSTYPE" == "linux-gnu"* ]]; then
use ${OSTYPE:-linux-gnu}
run_integration_tests.sh
line 82 at r1 (raw file):
export CACHE_DIR=$(mktemp -d --tmpdir="$TMPDIR" --suffix="-turbo-cache-integration-test") elif [[ "$OSTYPE" == "darwin"* ]]; then # Create a temporary directory using mktemp with a random template, then add a suffix
nit: end in a period.
run_integration_tests.sh
line 83 at r1 (raw file):
elif [[ "$OSTYPE" == "darwin"* ]]; then # Create a temporary directory using mktemp with a random template, then add a suffix export CACHE_DIR=$(mktemp -d "${TMPDIR}turbo-cache-integration-test")
nit: add slash between ${TMPDIR}
and the constant.
run_integration_tests.sh
line 84 at r1 (raw file):
# Create a temporary directory using mktemp with a random template, then add a suffix export CACHE_DIR=$(mktemp -d "${TMPDIR}turbo-cache-integration-test") echo "CACHE_DIR for macOS is: $CACHE_DIR" # <-- Added print statement here
nit: remove this.
run_integration_tests.sh
line 85 at r1 (raw file):
export CACHE_DIR=$(mktemp -d "${TMPDIR}turbo-cache-integration-test") echo "CACHE_DIR for macOS is: $CACHE_DIR" # <-- Added print statement here # exit 1
nit: remove this.
run_integration_tests.sh
line 88 at r1 (raw file):
else # Unknown OS echo "Unknown operating system. Exiting."
nit: Lets instead invert this and assume linux if it's not mac.
run_integration_tests.sh
line 106 at r1 (raw file):
# Cleanup. echo "Cleaning up cache directories TURBOC_CACHE_DIR: $TURBO_CACHE_DIR"
nit: Needless spaces.
c6980b0
to
6b37ecf
Compare
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: 1 of 2 files reviewed, 10 unresolved discussions (waiting on @allada)
run_integration_tests.sh
line 73 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
nit: ditto
Removed.
run_integration_tests.sh
line 77 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
don't mkdir with sudo, it causes issues.
Done
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
use
${OSTYPE:-linux-gnu}
Done.
run_integration_tests.sh
line 83 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
nit: add slash between
${TMPDIR}
and the constant.
$TEMP_DIR has a trailing slash.
run_integration_tests.sh
line 88 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
nit: Lets instead invert this and assume linux if it's not mac.
what about Windows? Some customers use Windows.
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: 1 of 2 files reviewed, 10 unresolved discussions (waiting on @allada)
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
Done.
looks like it should be linux-gnu as I had before
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: 1 of 2 files reviewed, 10 unresolved discussions (waiting on @allada)
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
looks like it should be linux-gnu as I had before
https://github.com/TraceMachina/turbo-cache/actions/runs/6598502029/job/17926538604
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: 1 of 2 files reviewed, 10 unresolved discussions (waiting on @allada)
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
https://github.com/TraceMachina/turbo-cache/actions/runs/6598502029/job/17926538604
Should I write a regex for either or?
5418163
to
105f34a
Compare
@allada ball in your court but curious about your thoughts on |
105f34a
to
68f6947
Compare
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.
My overall opinion is that this works but I do not want to put too much effort into it given it will go away in the near term.
Reviewable status: 1 of 2 files reviewed, 9 unresolved discussions (waiting on @allada)
run_integration_tests.sh
line 19 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
Misspelled.
Done.
run_integration_tests.sh
line 59 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
Needless new line.
Done.
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 all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @MarcusSorealheis)
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
Should I write a regex for either or?
The command I gave you just defaults OSTYPE
to linux-gnu
if it is not set.
It should look like this:
if [[ "${OSTYPE:-linux-gnu}" == "linux-gnu"* ]]; then
run_integration_tests.sh
line 88 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
what about Windows? Some customers use Windows.
This test doesn't work on windows anyway.
68f6947
to
051f999
Compare
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @allada)
run_integration_tests.sh
line 49 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
This ENV is not set on all OSs.
ahh. I see what you meant. This script would fail on those platforms.
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
The command I gave you just defaults
OSTYPE
tolinux-gnu
if it is not set.It should look like this:
if [[ "${OSTYPE:-linux-gnu}" == "linux-gnu"* ]]; then
that wasn't clear. I get default parameter, though. I thought you only specify the string.
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @allada)
run_integration_tests.sh
line 79 at r1 (raw file):
Previously, MarcusSorealheis (Marcus Eagan) wrote…
that wasn't clear. I get default parameter, though. I thought you only specify the string.
I think this is fine now
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 1 files at r7.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @MarcusSorealheis)
run_integration_tests.sh
line 79 at r7 (raw file):
export CACHE_DIR=$(mktemp -d "${TMPDIR}turbo-cache-integration-test") else # Unknown OS
nit: needless comment.
run_integration_tests.sh
line 100 at r7 (raw file):
echo "Checking for existince of the TURBO_CACHE_DIR" if [ -d "$TURBO_CACHE_DIR" ]; then sudo find "$TURBO_CACHE_DIR" -delete # add for linux
nit: Needless comment.
051f999
to
56afc81
Compare
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @MarcusSorealheis)
run_integration_tests.sh
line 79 at r8 (raw file):
else echo "Unable to detect operating system. Assuming the Linux/WSL syntax will work." export CACHE_DIR=$(mktemp -d --tmpdir="$TMPDIR" --suffix="-turbo-cache-integration-test")
Since we are doing the same thing in:
if [[ "${OSTYPE:-linux-gnu}" == "linux-gnu"* ]]; then
Can we instead just check darwin
and then assume linux otherwise and get rid of this else clause?
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @allada)
run_integration_tests.sh
line 79 at r8 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
Since we are doing the same thing in:
if [[ "${OSTYPE:-linux-gnu}" == "linux-gnu"* ]]; then
Can we instead just check
darwin
and then assume linux otherwise and get rid of this else clause?
sure
56afc81
to
1faf0ca
Compare
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: 1 of 2 files reviewed, all discussions resolved (waiting on @MarcusSorealheis)
1faf0ca
to
9eff777
Compare
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 1 files at r10.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @MarcusSorealheis)
Description
Minor issues related to MacOS for the integration tests.
Fixes # #316
Not technically an issue. It's blocking an in-progress PR.
not work as expected)
How Has This Been Tested?
Please also list any relevant details for your test configuration
Checklist
bazel test //...
passes locallygit amend
see some docsThis change is