osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
217 stars 131 forks source link

bug: manually ranked (frozen status) maps revert status after some time #420

Open g1-1-1 opened 1 year ago

g1-1-1 commented 1 year ago

Describe the bug

maps manually edited in the database to have a different ranked status than what the map is currently on bancho and set to frozen, or have their status changed by !map rank map/set will be set as frozen and set to a new ranked status; will revert back to unfrozen and have their status reverted to pending after some time

this will happen regardless of what ranked status you choose

some time is undefined, could be 2 weeks or could be 2 months -- unsure of the cause and therefore i cannot give a conclusive timeframe because it happens at random apparently

To Reproduce

  1. change the status of a map to anything but pending/unranked
  2. wait an undefined amount of time
  3. the map's ranked status will be reverted to pending

Expected behavior

the map should not change status while it is frozen

bancho.py Version

4.7.2

Python Version

3.9.X (Default)

Relevant log output

No response

Additional context

No response

cmyui commented 1 year ago

This is intended to be handled here https://github.com/osuAkatsuki/bancho.py/blob/a043f12e4a77f83faa180938214e02f79333872d/app/objects/beatmap.py#L482-L486 Might be bugged, or this logic might be missed in another place (though, I think this path should always be taken for beatmap updates iirc)

cmyui commented 1 year ago

Ah, there's no persistence of frozen there, that might be it

cmyui commented 1 year ago

Made a PR for this theory ^ but I have not yet tested it

brudermusscode commented 1 year ago

Having the same issue here

minisbett commented 1 year ago

Might've found the problem! https://discord.com/channels/748687781605408908/748688897168375819/1156306492484489277

In short, frozen is not set to True in cache when using the !map ... set command.

TheFantasticLoki commented 9 months ago

I'd like to mark this as not being fixed, We at kawata are experiencing the same issue when we change a maps status from our panel. We set the status and then set frozen to 1 yet maps still revert back to original status.

minisbett commented 9 months ago

Hm that's concerning..

tsunyoku commented 9 months ago

I'd like to mark this as not being fixed, We at kawata are experiencing the same issue when we change a maps status from our panel. We set the status and then set frozen to 1 yet maps still revert back to original status.

beatmap cache in bancho.py is probably taking over the database status, this whole cache shit in bpy is just annoying because it makes stuff like this terrible. i might just set out to remove some of these problematic caches, although it's probably more a case that the API should be expanded to support these update usecases so it doesn't matter...