-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Tech] Use DNS text queries to resolve PCI IDs (#3528) #844
Conversation
* Use DNS text queries to resolve PCI IDs * Clear the new cache stores if we're instructed to do so We only want to clear them if we're *not* upgrading Heroic though (don't want to cause a request spike when releasing an update)
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.
LGTM. I just wonder if we should add unit tests for src/backend/utils/systeminfo/gpu/pci_ids.ts
or a e2e test with qase or playwright
I was looking into adding some unit tests there and since the method goes to get info on a API we don't control, we would need to mock the response and I am not sure if it adds much tbh. For Playwright and Qase I would need to know the exact hardware that they use and I am not sure if it is always the same and they can change it over time. Even if same hardware the Vms can change the ID since the virtualized hardware IDs are generated randomly when the machine is created I believe. At least for tests that goes to the Log screen and check for the hardware reported there or on the logs. So would be US adjusting the code to pass, not really useful. |
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.
we already have a mock for electron. you could add an If it is really so interdependent on every other package in the project, then it could probably be refactored so that the code is testable. We could include a mock response from the current state of that external endpoint as well. Either way, this code is not that critical so I'm fine with not testing |
In short: does not rely on pcids file anymore, gets the info, cache it and use it for 30 days until the cache expires.
Those Ids are used to detect the user system hardware to show on the log screen and logs.
Original PR:
Heroic-Games-Launcher/HeroicGamesLauncher#3528
To test
Just check if the system information shows fine on the logs screen.
Use the following Checklist if you have changed something on the Backend or Frontend: