Skip to content

what happens when a repo is deleted during registration? #624

@ericphanson

Description

@ericphanson

This is to address the problem of a package repo being deleted. What happens currently depends on when it is deleted:

  1. before AutoMerge checks the PR: ✅ automerge fails
  2. after AutoMerge checks the PR but before the PR is merged: ❌ nothing blocks merging, the non-existent package is merged
  3. after the PR is merged but before the package servers archive the package: ❌ the source code is unavailable
  4. after the package servers archive the package: ✅ not ideal, but the package is archived at least

the common cases (1) and (4) are fine. What remains are the edge cases (2) and (3). We could address (2) by adding a check to the cron job portion of AutoMerge that does the merging, i.e. around here:

if pr_type == :NewPackage # it is a new package

That could add a check that the repo still exists, and the tree-sha still exists in that repo. The latter would probably require cloning the repo.

I don't think we can address (3).

Is it worth doing an extra clone to mitigate (2)?

I'm not really sure. The consequences aren't that bad, since no one could be using the package release, so no harm is done to existing code. Folks could try to add the "new" package and get an error. And it blocks the name from being used by someone else.

The costs are slower CI and more potential for network failures / github issues to disrupt registration.


This came up here: JuliaRegistries/General#139294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions