fix: Simplify Java Installation in DevContainer - #6012
Conversation
…o a breaking change in the SDKMAN! API causing the previous version to fail to install. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
| fi | ||
|
|
||
| ALL_DEPENDENCIES="libpq-dev netcat-traditional unixodbc-dev default-jdk msodbcsql18" | ||
| ALL_DEPENDENCIES="libpq-dev netcat-traditional unixodbc-dev default-jdk msodbcsql18 msopenjdk-21" |
There was a problem hiding this comment.
I noticed default-jdk is still here, I think we need to remove it right?
There was a problem hiding this comment.
Aha. Right I can see what has happened here.
- In the initial setup of the DevContainer I originally used the java feature to install java.
- I didn't realise at the time but that was adding the Microsoft apt repository which was allowing
msodbcsql18to be installed here without manually adding the repository. - I then added the rest of the requisites from
.github/scripts/install-prerequisites.shhere, meaning a Java install was added here too. - The Java DevContainer feature breaks, hence this PR. I completely missed the installation of
default-jdkhere, which turns out is sufficient for the dev container. msopenjdk-21could replace it, but I think staying as consistent to theinstall-prerequisites.shscript is preferable, so I've the MS one.
There was a problem hiding this comment.
In summary, had 3 Java installs at one point! I've reduced it to 1.
Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
|
@davem-bis okay so whats the problem here? We're accidentally installing two Javas so we're removing one? |
|
@cmgoffena13 - version 1.8.1 of the Java DevContainer feature appears to be broken, the API body it gets back from SDKMAN looks to have changed. This means that the dev container cannot build as is. Version 1.8.2 works, but installing it as a dependency within the post create script looked to be more robust than relying on an api that can change shape. |
Description
An apparent breaking change in the SDKMAN! API caused the Java DevContainer feature to fail to install.
This change removes that feature and instead installs Java via the
msopenjdk-21package.An alternate solution would have been to update the DevContainer feature, however this method appeared more robust against future changes.
Test Plan
Dev Container successfully builds and all tests run by
make fast-testsucceed.A caveat - the test
tests/core/test_context.py::test_python_model_empty_df_raisesfails when run in parallel, but passes when run sequentially. I believe this is unrelated to this change and I am fixing in PR #6013.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO