Closed omus closed 3 months ago
The quick work around for this is to run Pkg.Registry.update()
immediately after julia-actions/cache
to ensure the registries are up to date before running julia-actions/runtest
.
This can also be hit if people run Pkg.dev
before Pkg.instantiate
(or Pkg.update
too, I think) because dev
creates a manifest.
I've seen it in the wild a few times.
It appears that my assessment that enabling
cache-registries: true
by default was safe was incorrect. For projects that commit aManifest.toml
the registry may not get updated inPkg.instantiate
. Specifically, while performing some interactive CI debugging I found that this line fails only throws an exception when a package is missing from the registry and not when a package version is missing.The reason for filing this issue in
julia-actions/cache
is that we may want to reconsider havingcache-registries
default totrue
.As for the original problem here's the a portion of the workflow YAML:
And here's the logs from
julia-actions/julia-runtest
with the private package names replaced with placeholders:Here's an example of the behaviour inside the CI environment with package names replaced with placeholders (emulating some of what
Pkg.test
does):From what I've gathered it seems that
Pkg.instantiate
is actually finding and installing the version required but whenPkg.test
attempts a re-resolve it fails as the registry doesn't contain an entry for that item. ProbablyPkg.test
should update the registries when attempting a re-resolve.