So the current way DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" won’t work anymore? We can’t just install a specific version like this?
Is there a way to just install a version directly without the dfxvm? All of our CI tests are failing on we haven’t updated any of our documentation or notified anyone about this, and seems we have to now. Would be great if we could have a way to keep the original behavior during the transition, if it’s available.
Just a feedback, it would be good if this big updates did not disrupt existing workflows that were compatible with previous versions of the DFX installation. This can be challenging for individual developers to keep up with all the updates and adjust their code accordingly since their CI could break.
It looks like the other install scripts were also migrated (i.e. smartcontracts.org), or at least once dfxvm is installed attempting to install from this url using the old command forwards to dfxvm. Was this intentional?
I’m all migrated over though now, and it’s great, but as Jordan and other mentioned it did break CI.
Since this overwrites the previous dfx path, for future dfx releases it would be nice if there are instructions included for going back and forth between the new and the old system (if one needs to locally).
I have to say that this kind of surprise breaking change of a reference install script isn’t welcome at all.
We have a custom docker image that we use in our Gitlab CI/CD pipelines.
This docker image has its own CI/CD and all of a sudden we are not only unable to create images for new dfx releases, but also unable to update older dfx version’s images to our evolving needs.
Here is what our Dockerfile looks like now, in my attempt to fix this:
...
ARG DFX_VERSION
RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
RUN . $HOME/.local/share/dfx/env
ENV PATH="$HOME/.local/share/dfx/bin:$PATH"
...
Apparently, dfx is correctly installed, dfxvm as well even if not needed in our case, and both binaries are present in $HOME/.local/share/dfx/bin/.
But the PATH doesn’t seem to be updated correctly, even running the env script (I also tried with RUN ["/usr/bin/bash", "-c", "source $HOME/.local/share/dfx/env"] and several other syntaxes, with no success, in the test job for that image, the result is always the same:
I apologize for not giving more advance notice about these breaking changes to CI.
Additionally, while I had thought it wasn’t feasible to release dfxvm without breaking changes for CI, in hindsight there are probably things we could have done.
In the case of your Dockerfile, the problem may be that HOME isn’t something that ENV knows about. In that case, this might work: