RetroCap.jl icon indicating copy to clipboard operation
RetroCap.jl copied to clipboard

KeyError: key v"0.1.1" not found

Open oxinabox opened this issue 3 years ago • 3 comments

I am trying to run this on Invenia's internal registry, and I am getting an error:

julia> add_caps(MonotonicUpperBound(), CapLatestVersion(), ["General", "Invenia"])

ERROR: KeyError: key v"0.1.1" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:482 [inlined]
 [2] add_caps
   @ ~/.julia/packages/RetroCap/PhnbK/src/add_caps.jl:128 [inlined]
 [3] add_caps
   @ ~/.julia/packages/RetroCap/PhnbK/src/add_caps.jl:54 [inlined]
 [4] add_caps(strategy::MonotonicUpperBound, option::CapLatestVersion, registry_paths::Vector{String})
   @ RetroCap ~/.julia/packages/RetroCap/PhnbK/src/add_caps.jl:31
 [5] top-level scope
   @ REPL[14]:1

It is unclear what it is about, or how to fix it. I suspect something at some point has been done to Invenia's registry that puts it in some kind of inconsistent state.

oxinabox avatar Jun 01 '22 14:06 oxinabox

We should add some @debug statements immediately before add_caps.jl:128, and then you can do e.g. export JULIA_DEBUG=RetroCap and figure out where in the registry we were when we hit the error.

DilumAluthge avatar Jun 01 '22 14:06 DilumAluthge

I suspect something at some point has been done to Invenia's registry that puts it in some kind of inconsistent state.

On a separate note, you can try running the RegistryCI "registry consistency tests" on your registry. That can sometimes be helpful in catching registry issues.

If your registry is located at /path/to/my/registry, you can do the following.

julia> import RegistryCI

julia> registry_path = "/path/to/my/registry"

julia> registry_deps = ["https://github.com/JuliaRegistries/General.git"]

julia> RegistryCI.test(registry_path; registry_deps)

DilumAluthge avatar Jun 01 '22 14:06 DilumAluthge

As a work-around I added a try-catch-warn-rethrow to the code in the appropriate place to idenify the packages causes the problem. then deleted those from registry, ran retrocap then reverted the deletion.

Interestingly both packages causing issues were not real packages but were there to test Registrator and TagBotGitLab respectively.

oxinabox avatar Jun 01 '22 14:06 oxinabox