You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
When saving a CompatibilityResult to mysql data store, dependency_info is required/included to the save, but when reading from mysql, the dependency_info field of the resulting CompatibilityResults are not set.
Per offline discussion, dependency_info is stored in the release_time_for_dependencies table in our MySQL database. And the issue here is that the save_compatibility_statuses function in compatibility_store is writing data to all the three tables we have in MySQL, thus it required dependency_info in the CompatibilityResult passed in to that function. But when writing tests, in some cases the CompatibilityResult doesn't contain the dependency_info, which makes the read and write to MySQL looks inconsistent.
A possible improvement could be restructure the save_compatibility_statuses function to split to three sub methods that writes to the three different tables.
Activity
liyanhui1228 commentedon May 7, 2019
Just curious, are we still using datastore in the latest version of the badge server?
ylil93 commentedon May 7, 2019
Yes we are.
[-]Datastore does not preserve dependency_info[/-][+]mysql does not preserve dependency_info[/+]liyanhui1228 commentedon May 7, 2019
Per offline discussion,
dependency_infois stored in therelease_time_for_dependenciestable in our MySQL database. And the issue here is that thesave_compatibility_statusesfunction in compatibility_store is writing data to all the three tables we have in MySQL, thus it requireddependency_infoin theCompatibilityResultpassed in to that function. But when writing tests, in some cases theCompatibilityResultdoesn't contain thedependency_info, which makes the read and write to MySQL looks inconsistent.A possible improvement could be restructure the
save_compatibility_statusesfunction to split to three sub methods that writes to the three different tables.ylil93 commentedon May 7, 2019
Thanks for the explanation! Leaving this issue open until documentation/improvements are added to the project.