Skip to content
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

Fix tournament bracket parsing's ruleset refetch logic not working correctly #17574

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

peppy
Copy link
Member

@peppy peppy commented Mar 31, 2022

Due to equality being based on ShortName, it was feasible that the re-fetch exited early (in bindable shortcutting logic) causing the ruleset's OnlineID to remain -1 or something equally wrong.

Resolves issue pointed out at #17538 (reply in thread).

peppy added 2 commits March 31, 2022 18:39
Historically, tournament client may have written incorrect `OnlineID`
values. We wanted to use `ShortName` to re-fetch the ruleset. This test
ensures this flow is working correctly.
…rrectly

Due to equality being based on `ShortName`, it was feasible that the
re-fetch exited early (in bindable shortcutting logic) causing the
ruleset's `OnlineID` to remain `-1` or something equally wrong.

Resolves issue pointed out at
ppy#17538 (reply in thread).
// we don't want to show the menu cursor as it would appear on stream output.
MenuCursorContainer.Cursor.Alpha = 0;

base.LoadComplete();

Task.Run(readBracket);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved to LoadComplete to allow the new test to exist (I need code to run before this, and it wasn't easy to make happen as long as it was in the Game's async load implementation.

Doesn't seem to have any adverse effects.

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, albeit kinda dodge

@peppy
Copy link
Member Author

peppy commented Mar 31, 2022

Looks fine, albeit kinda dodge

I guess there's no better way to handle this then? Was hoping you'd have something in mind. Does make you wonder about the equality implementation, though..

@smoogipoo
Copy link
Contributor

I have no suggestions, just had to do a double take at first.

@smoogipoo smoogipoo merged commit 46be6bc into ppy:master Mar 31, 2022
@peppy peppy deleted the fix-tournament-bracket-invalid-ruleset-id branch March 31, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants