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

refuse to register already-tagged versions

Open StefanKarpinski opened this issue 6 years ago • 11 comments

There are a lot of package authors still tagging first and registering later, which often leads to mismatches between what’s tagged and what’s registered. TagBot posts a comment after the fact warning that this has happened, but we should check if a tag or release already exists and refuse to kick off registration in the first place if it doesn’t point to the commit that is being registered.

StefanKarpinski avatar Jul 03 '19 12:07 StefanKarpinski

In the README we mention that the registration process does not depend on the tag. I would say that the package owners are responsible for the tag being correct.

nkottary avatar Jul 03 '19 13:07 nkottary

The registration process doesn't depend on the tag, but we do need tags in order to be sure that the registered tree stays around even if the commit is no longer on any public branch, so we do kind of depend on tags. It's also just bad if there are tags/releases and they don't match what's registered. It's fine if there's no tag (as long as there's a public branch that doesn't go away), but if there is a tag and it's wrong, that's actively confusing.

StefanKarpinski avatar Jul 03 '19 14:07 StefanKarpinski

Okay.

nkottary avatar Jul 04 '19 05:07 nkottary

The issue is fixed but not deployed yet.

nkottary avatar Jul 11 '19 09:07 nkottary

Should we allow existing tags if the tag commit matches the registration commit?

nkottary avatar Jul 11 '19 09:07 nkottary

Yes, I think it's fine in that case.

StefanKarpinski avatar Jul 11 '19 14:07 StefanKarpinski

Should we allow existing tags if the tag commit matches the registration commit?

What happens if the initial registration matches the existing tag, but then a General registry maintainer requests a change (e.g. "please add a compat entry for Julia and then re-trigger Registrator")? After the package maintainer makes the requested change and re-triggers Registrator, the updated registration will no longer match the existing tag.

DilumAluthge avatar Jul 15 '19 00:07 DilumAluthge

We are checking the commit id of the tag in #203 . When they don't match the registration will not go through.

nkottary avatar Jul 15 '19 03:07 nkottary

What happens if the initial registration matches the existing tag, but then a General registry maintainer requests a change (e.g. "please add a compat entry for Julia and then re-trigger Registrator")? After the package maintainer makes the requested change and re-triggers Registrator, the updated registration will no longer match the existing tag.

Then they have to delete the existing tag.

StefanKarpinski avatar Jul 15 '19 05:07 StefanKarpinski

Then they have to delete the existing tag.

In general (non-julia) one creates a patch-release to fix the previous broken release. From the point of Registrator.jl this will look like a skipped version number since it didn't accept the broken one. Would it be feasible to allow the version skip in that case?

stev47 avatar Apr 22 '20 13:04 stev47

If I'm understanding correctly, I have to tag after pinging the registrator? That's fine I guess, I'll need to change the workflow a bit, but the error message wasn't easy to understand at first: https://github.com/adigitoleo/PlateMotionRequests.jl/commit/7b67df820ea9ac8044ad0ab3bc0de8fe09aefce1

Because the tag does in fact point to that commit. ~~I guess it means that registering creates its own commit?~~ It creates the PR.

adigitoleo avatar Feb 04 '22 03:02 adigitoleo