-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test (backend) Added containerization support in testing and replaced SQLite with MySQL in the api-server/run_store_test #11889
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
base: master
Are you sure you want to change the base?
Conversation
Hi @ntny. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
🚫 This command cannot be processed. Only organization members or owners can use the commands. |
56a8536
to
5c4129c
Compare
71362a2
to
1aa1937
Compare
Hello @HumairAK, However, SQLite tests are still being used in api-server/storage, and it seems that #8851 is still relevant and the current PR partially closed it. |
1aa1937
to
db3aa28
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ners/mysql. - replace in-memory SQLite with MySQL 8.0 using Testcontainers in run_store_test - ignored false-positive test Signed-off-by: ntny <[email protected]> Signed-off-by: arpechenin <[email protected]>
db3aa28
to
5d09c4d
Compare
Description of your changes:
Motivation:
For example, the attached test passes when using SQLite, but fails on MySQL due to stricter enforcement of constraints.
First approach implementation, applied only to run_details.
I ignored the test TestListRuns_Pagination_WithSortingOnMetrics because it generates an invalid query from the MySQL perspective (test was false-positive on SQLite).
Below are two SQLite queries that will not work using the MySQL dialect
query 1 without where by dummymetric contains the problem in the
Here rd.dummymetric is not included in the GROUP BY clause and is not aggregated, but it is used in the SELECT statement. will only work if the sql_mode is lowered for MySQL and the GROUP_BY_FULL mode is removed, because there is no aggregation for the dummymetric field in the query. Without this adjustment, MySQL will throw an error
this query was generated here
mysql_and_where.txt doesn't work at all in MySQL. With exception ' Unknown column 'dummymetric' in 'where clause''
the second query was generated here
The SQLite alternatives to the above queries contain the same issues but still work because SQLite performs less strict query validation.
Also, just to double-check, I have reproduced the first query on my own Kubeflow Pipelines setup and it also threw the same error during the tests(dummymetric is just a random alias):

Additionally, since I am creating a container and reusing it for performance reasons, I had to add logic for cleaning the database between tests, which complicated the initialization logic in run_details_test