-
Notifications
You must be signed in to change notification settings - Fork 34
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
add game hash query param to patch api calls #384
Closed
wescopeland
wants to merge
6
commits into
RetroAchievements:develop
from
wescopeland:patch-hash-param
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
612b3b6
add game hash query param to patch api calls
wescopeland e581c18
fix tests
wescopeland 6f04b04
more fixes
wescopeland cf54efc
add missing change
wescopeland e261cec
fix more stuff
wescopeland ff95368
final test fix
wescopeland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are
g
andm
mutually exclusive?What will the server return if
m
isn't a known hash for gameg
?Will the server changes allow fetching game data without a
g
parameter? (see RetroAchievements/RAWeb#618)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably makes sense for
m
to always take precedence overg
ifm
is provided.In https://github.com/RetroAchievements/RAWeb/blob/40cc59a25a99c0b5abb82bc140cd5c4b8a15240f/app/Platform/Actions/ResolveAchievementSetsAction.php, the game ID for each set is also returned. This is achieved via the
attachCoreGameIds()
function:Note in the screenshot above, I've attached a subset to game ID 1 which in the real world has no place being there.
Given this, maybe it makes sense to remove
g
from the patch API call long-term? My gut feeling is it shouldn't be removed until multiset is actually generally available to the public, that way we still have game ID to fall back to use legacy logic if something goes wrong.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server-side, we can't realistically ever remove it since we have no clear path to deprecate old clients.
Client side, I'd prefer to keep it as well, as some clients may not be using rc_client yet, and removing the field would be a breaking change.
I was thinking something more along these lines:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That proposed change definitely makes sense and I'd be happy to do it. The only lingering question in the back of my mind is what if the server for some reason does not respect the
m
param, ie:I'm wondering if we may always want to keep
g
on to serve as a fallback value.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, when I make API changes, I develop the client and server code at the same time to ensure it's functioning the way I want it to, then open the server PR, and only open the client PR after the server code is merged under the assumption that it will be deployed before the client PR gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like it may make sense to close this PR until the work in RAWeb is complete, and only re-open it once that work is merged.