-
Notifications
You must be signed in to change notification settings - Fork 80
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
R dockerized test run gradle target and CI #4625
Conversation
Not ready for review yet, thus "draft".
|
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.
I'm missing some context. What ticket is this fixing? It looks like this is just running tests, is there a reason it needs to make this release?
echo "$0: Environment variable DHCPP_PREFIX is not set, aborting." 1>&2 | ||
echo "$0: Environment variable DH_PREFIX is not set, aborting." 1>&2 |
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.
Would DH_CPP_PREFIX
not be more appropriate? DH_PREFIX
is pretty generic, but since I don't really understand the full scope of this variable, feel free to say "no, I like what I did" / just resolve my comment.
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.
I changed it because we are installing there now more than just C++, eg, also R and potentially python/cython.
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.
I made a bad change to R/rdeephaven/src/client.cpp to see what would happen, and gradle still reports "success".
Internally, I see:
ERROR: compilation failed for package 'rdeephaven'
I'm assuming we need something that will complete the loop when something internally goes wrong.
@@ -60,6 +60,7 @@ jobs: | |||
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }} | |||
run: | | |||
./docker/registry/cpp-client-base/build/crane/retag.sh |
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.
Should we remove cpp-client-base? Here, but also delete the registry directory and make sure nothing references it?
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.
r-base is based on cpp-client-base, so I don't think we can remove it from the base-images repo. Maybe we can remove (some?) of its references from the deephaven-core repo tho... although, the tagging here I am not sure what it does, maybe we should have a short chat on slack or VC.
…side R with proper exit status.
I fixed the problem Devin's noted (thanks!) about a failure of compilation of the C++ code inside R's install.packages not triggering a gradle task failure. Interestingly enough, if some source fails compilation (which means the whole package won't build), install.packages only gives a warning... what? Sigh. |
R/build.gradle
Outdated
copyFile('rdeephaven/src/Makevars', "${prefix}/src/rdeephaven/src/") | ||
copyFile('r-tests.sh', "${prefix}/bin/rdeephaven") | ||
copyFile('r-build.sh', "${prefix}/bin/rdeephaven") | ||
runCommand("PREFIX=\"" + prefix + "\"; \\\n" + |
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.
is there a strong preference for substitution in this way, injecting a groovy var into a sh env var, then consuming that sh env var (but not exporting it, so nothing else is using it)?
that is, something like this to reduce the escape-spam above
runCommand("""set -eux ; \
cd "${prefix}/src/rdeephaven"; \
. "${prefix}/env.sh"; \
${prefix}/bin/rdeephaven/r-build.sh
""")
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.
In this block is not as obvious, but if you look at the similar (longer, more env variables) block in cpp-client/build.gradle
, the issue becomes apparent: Using double quotes and allowing for groovy to make string interpolation with its own (groovy's) variables makes using the regular syntax for shell environment variables in the shell code more complicated. It also makes it harder to read; while reading shell code I expect shell syntax to mean what it means in shell.
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.
I simplified the syntax of that first line a bit trying to capture the spirit of your comment.
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.
The double quotes were a deliberate change on my part, to ensure that no shell variables existed at all in this code, but that the shell was finished while still in groovy.
That said, this is just intended as an observation/idea/suggestion and not a requirement for merging.
Discussed with Mike over slack. He said he is ok deferring to Devin and/or Ryan on the .github/workflows part of the change. |
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.
I defer to Devin/Ryan for changes to the deephaven-core workflows.
…m deephaven-core repo.
Mike is deferring to Devin as per his message in slack and comment above.
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.
I only looked at the R files. LGTM.
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.
Verified the points I care about - gradle now properly fails when error in R :)
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.
Gradle wiring looks good to me
@@ -59,7 +59,7 @@ jobs: | |||
- name: Tag upstream images | |||
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }} | |||
run: | | |||
./docker/registry/cpp-client-base/build/crane/retag.sh |
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.
Did you mean to remove the cpp?
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.
Yes, I Devin request I remove earlier in this same review. The C++ build is now using the r-client-base image (which we plan to rename cpp-clients-fat-base
on the py ticking coming PR).
Fixes #4091