Skip to content

Do not purge beatmap if about to update it #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bdach
Copy link
Contributor

@bdach bdach commented Feb 7, 2025

Noticed in passing when attempting to debug the staging deployment failures.

The PUT /beatmapsets endpoint that's responsible for assigning IDs to beatmap sets and beatmaps before the full package is uploaded also purges garbage rows from potential previous submission failures (e.g. rows with active = -1 set).

However if the endpoint is given the set ID of such a garbage row, it will first run the purge, which will delete the row, but then notice that it just deleted the row, and just give up by 404ing.

This is both kinda stupid and undesirable; consider someone submitting a beatmap, where the first request succeeds, and the second fails. With master behaviour, this results in a basically unrecoverable state if the user doesn't know how submission internals work. With the behaviour introduced in this PR, all that is required to resolve the situation is to just try again.

This is 100% a carryover from osu-web-10 logic which does the exact same thing, and maybe a reason why people resort to manual OnlineID reuses which are notorious for breaking everything.

bdach added 2 commits February 7, 2025 14:08
Noticed in passing when attempting to debug the staging deployment
failures.

The `PUT /beatmapsets` endpoint that's responsible for assigning IDs to
beatmap sets and beatmaps before the full package is uploaded also
purges garbage rows from potential previous submission failures (e.g.
rows with `active = -1` set).

However if the endpoint is given the set ID of such a garbage row, it
will first run the purge, which will delete the row, but then notice
that it just deleted the row, and just give up by 404ing.

This is both kinda stupid and undesirable; consider someone submitting a
beatmap, where the first request succeeds, and the second fails. With
`master` behaviour, this results in a basically unrecoverable state if
the user doesn't know how submission internals work. With the behaviour
introduced in this PR, all that is required to resolve the situation
is to just try again.

This is 100% a carryover from osu-web-10 logic which does the exact same
thing, and maybe a reason why people resort to manual `OnlineID` reuses
which are notorious for breaking everything.
@bdach bdach requested a review from peppy February 7, 2025 13:38
@bdach bdach self-assigned this Feb 7, 2025
@peppy peppy merged commit 845c531 into ppy:master Feb 7, 2025
4 checks passed
@bdach bdach deleted the do-not-purge-beatmap-thats-about-to-be-updated branch February 7, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants