-
Notifications
You must be signed in to change notification settings - Fork 11
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
CON-1203: Gradle plugin using conclave-build container for GraalVM on Linux #101
Conversation
It can't find docker, which doesn't make sense, until you realise this is inside the integration-tests container! So perhaps we have install docker inside that container?? |
Docker is available inside integrations-tests container. We already expose docker socket to the container by having |
...adle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/GenerateEnclaveSigningMaterial.kt
Outdated
Show resolved
Hide resolved
...-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/GradleEnclavePlugin.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
.splitToSequence("\n") | ||
.single { it.startsWith("Location: ") } | ||
.substringAfter("Location: ") | ||
// non-python. https://r3-cev.atlassian.net/browse/CON-1181 and https://r3-cev.atlassian.net/browse/CON-1229. |
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.
Only the python bits are left from this TODO, so update accordingly. No need for the CON-1181 reference.
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.
You still need python, pip and jep libraries installed on a local machine for Python enclaves. Updated accordingly.
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineSGXManifest.kt
Outdated
Show resolved
Hide resolved
65ecc19
to
7566881
Compare
Yay, the integration tests now pass! Now to add that flag and update the error message to point to the GItHub issues page (and merge conflict!) |
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.
Some more comments, hopefully the last.
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineDirectManifest.kt
Outdated
Show resolved
Hide resolved
...radle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/gramine/GenerateGramineBundle.kt
Outdated
Show resolved
Hide resolved
plugin-enclave-gradle/src/main/kotlin/com/r3/conclave/plugin/enclave/gradle/LinuxExec.kt
Outdated
Show resolved
Hide resolved
@@ -40,11 +44,14 @@ open class LinuxExec @Inject constructor(objects: ObjectFactory) : ConclaveTask( | |||
conclaveBuildDir | |||
) | |||
} catch (e: Exception) { | |||
logger.info("Docker build of conclave-build failed. Re-run your build with '--info' and " + | |||
"submit a new GitHub issue https://github.com/R3Conclave/conclave-core-sdk/issues/new", e) |
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 don't think we need to mention submitting a GH issue here. It could be they find out what the issue is by enabling --info and fix the issue themselves. Mentioning it in the exception message is sufficient.
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.
Hang on, we've got this wrong! The mention of the --info
flag needs to be in the exception below.
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.
Okay, that now makes sense :) I'll fix that.
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.
Hopefully this now make sense.
Can you update PR description. |
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.
Looking good!
@JohnJoser3 remind me that we need to sit down regarding documentation for this and all the Gramine stuff.
#101 accidently made building on MacOS and Windows conditional on the new `buildInDocker` flag. This is not correct as Docker is always required for these environments.
Originally, enclaves were built in the docker container only on macOS and Windows. Now, all GraalVM enclaves are built in the
conclave-build
container regardless the OS. Gramine enclaves are still built outside this container, therefore python, Gramine, etc still do need to be installed on the machines.Docker is now installed in the integration-tests docker container. Conclave-build container is now run with the same user as the integration-tests container - this is to prevent permission issues when deleting files.