JuliaCI / julia-buildkite-plugin

Buildkite plugin to install Julia for use in a pipeline.
4 stars 5 forks source link

Add back code to update the registry. #15

Closed maleadt closed 3 years ago

maleadt commented 3 years ago

This time without the PKG_SERVER hack as @staticfloat said that wasn't needed anymore (could you confirm that?). We do still need to update the registry though, as it may be cached across runs, and Pkg.test doesn't update it.

cc @KristofferC

maleadt commented 3 years ago

Confirmed that this is required and works in https://buildkite.com/julialang/cuda-dot-jl/builds/1298. I'm going to merge this a little quicker again since this blocks CUDA.jl CI (I want to release 3.0 today), but I'm happy to iterate on this afterwards.

staticfloat commented 3 years ago

Ah, I see, I'm always using the "custom registries" options in julia-test, which incidentally causes a registry update. I am 60% convinced that julia-test is the right place to do the registry update (since we're probably going to instantiate the project there anyway, and if we add custom registries, we're going to update registries there anyway). Do you think that maybe instead of this we should have julia-test, by default, do a registry update even if there aren't any custom registries? I'm thinking we add an else statement here to do basically this. We can add in the "auto-add General registry" code that you have here as well.

maleadt commented 3 years ago

I don't always use the julia-test plugin, e.g. https://github.com/JuliaGPU/CUDA.jl/blob/27520e60d65e08e50e8c6ce30b2ec322d0fdecb8/.buildkite/pipeline.yml#L198-L225, which is why I had put it here...

staticfloat commented 3 years ago

Fair enough! Let's just leave it then. :)

staticfloat commented 3 years ago

Although.... instantiating shouldn't require a registry update, should it?

maleadt commented 3 years ago

I'm not sure, if you instantiate without a Manifest.toml, doesn't Pkg require an up-to-date registry for it to be able to resolve all compat bounds? If there's a Manifest.toml, then it doens't need that.

staticfloat commented 3 years ago

Ah, I wouldn't call that instantiating; that's resolving. If you instantiate but you don't have a manifest, the instantiate falls back to a resolve, and yes, that definitely does require a registry. :)