JuliaRegistries / RegistryCI.jl

Continuous integration (CI) tools for Julia package registries, including registry consistency testing, automatic merging (automerge) of pull requests, and automatic TagBot triggers
https://juliaregistries.github.io/RegistryCI.jl/stable
Other
31 stars 30 forks source link

Idea for AutoMerge: Run RegistryTools ourselves and see if we get the same changes #554

Open DilumAluthge opened 7 months ago

DilumAluthge commented 7 months ago

Idea from @GunnarFarneback on Slack:

The well-formedness of the PR tests could probably be sharpened. If there is no guarantee that the changes are created by RegistryTools, it should be verified that the given tree hash has the right name, uuid, version in the project file. The most scary part is trying to load the package, but on that account Registrator doesn't give any guarantees either.

The most powerful way to verify that the PR is well-formed is to run RegistryTools ourselves and see if we get the same changes. Unfortunately it's also likely to be somewhat brittle when there are changes in RegistryTools or different Julia versions cause it to produce different results.

Well, yeah. Much of the work of LocalRegistry is to find out what to actually register, but once you know package name, uuid, version, tree hash, possible subdir, it's just a call to RegistryTools to find out what the registry changes should be.

The original idea was to just perform this new check on non-@JuliaRegistrator non-@jlbuild PRs, but I think we could just run it on all PRs.