-
Notifications
You must be signed in to change notification settings - Fork 145
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
feat: add checking for older GIDs #496
Conversation
CI @CosminPerRam Do you mind explaining me how this works? Thank you! — It fails on game names that has special chars:
And it's also failing on this game name, for some reason:
Here's the complete error log:
|
@Douile made GIDs tests for rust-gamedig, the code is here.
Well, testing gids is quite hard to do, and apparently not all cases are well-processed (those few left ones that are failing), that'll require some adjustments/fixes for the code. |
The ID test are based off the rules in CONTRIBUTING.md. They are only based of the ID and the name of each game so here it looks like we have the unfortunate situation of triggering a failure based on changes prior to this PR. There are a few bugs shown here, I'll make an issue about them. The only actual bad ID looks like terraria which has a typo. I don't think this test should block this PR though as the ID issues are not caused by it. |
|
After a battle to roll back the file, I've managed to do it. Sorry about the mess... |
Thanks for taking care of this, looks good to merge.
I would change this to |
If we do this, it'll break implementations in Homepage or Uptime Kuma, right? |
Yes, but as seen in Homepage#2474, Homepage#1939, Homepage#1886 where I updated them, (Uptime Kuma was done by someone else), the person that updates any dependency is expected to test and mention any breaking changes that could occur by updating. |
Hmm, I thought you said that using new ids as default was not possible: #493 (comment) — If skip checking old ids (skipOldIDs) is going to be true by default, maybe we should rename it to // Don't check by default
gamedig --type counterstrike2 45.144.155.107:27015
// Check old ids
gamedig --type counterstrike2 45.144.155.107:27015 --checkOldIDs |
Well I can't say that I'm explaining stuff very well in general, sorry for the confusion.
LGTM. Regarding that comment:
In this case, we should inform them that they need that option (the real issue would have been if we would have disabled old gids completely). |
Should we also mention the migration document in our README? |
Yes |
This PR adds a new property
games.extra.old_id
, that is being used to add older game type IDs into thegame-resolver.js
. This makes sure that the new naming convention doesn't brake third party products that rely on gamedig.It has a similar implementation as this PR (#487), but has a different essence on closing the gap about new/old GIDs, as discussed on #493 and #374.
Adds the option to skip this check:
skipOldIDs
(defaults tofalse
). Query will skip checking for older game type IDs.—
I've included a tool for finding duplicates, that checks for new and old ids, and can be used in the CI. I'm not sure how to add this in the CI or if the code will work in the CI. Let me know and I'll update it!
—
Updates
README.md
,the Naming section on.CONTRIBUTING.md
and tweaks details onGAMES_LIST.md
Adds a new file
MIGRATION.md
with a list of IDs from v4 to v5. The list was generated usingtools/find-id-changes.js