-
Notifications
You must be signed in to change notification settings - Fork 25
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
WIP: mtr run that runs last N failed tests #178
Conversation
Changed to use a custom step to fetch the steps since @util.renderer Things to solve:
|
There still are some problems that I didn't manage to solve today. The builder https://buildbot.mariadb.org/#/builders/201 is modified to run with the new setup. Here is an example of a generated MTR command:
Currently not sure why this returns:
|
|
fixed func_kdf issue |
@vuvova updated so now the builder runs using the latest version. I have observed the following new issues:
I find 2 a bit concerning since I have no idea what might cause that, but maybe |
@@ -25,7 +25,7 @@ def run(self): | |||
|
|||
if master_branch: | |||
query = """ | |||
select concat(test_name,',',test_variant) from (select id, test_name,test_variant from test_failure,test_run where branch like '%%%s%%' and test_run_id=id order by test_run_id desc limit %d) x group by test_name,test_variant order by max(id) desc limit %d | |||
select concat(test_name,',',test_variant) from (select id, test_name,test_variant from test_failure,test_run where branch='%s' and test_run_id=id order by test_run_id desc limit %d) x group by test_name,test_variant order by max(id) desc limit %d |
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.
For better readability, I suggest using Python's format:
query = f"""
select concat(test_name, ',', test_variant)
from
(select id, test_name, test_variant
from test_failure, test_run
where
branch = '{master_branch}' and test_run_id = id
order by test_run_id desc
limit {overlimit}) x
group by test_name, test_variant
order by max(id) desc
limit {limit}
"""
tests = yield self.mtrDbPool.runQuery(query)
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.
Also, consider the following changes to make it easier for new contributors to understand the code:
- using JOIN instead of the equality in the WHERE clause for readability (I don't know by looking at that query which table has column
test_run_id
and which hasid
, I can guess, but being explicit is only 6 more characters 😄 ) - table aliases for
test_failure
(such as tf) andtest_run
(such as tr), and specify columns in the select list with:
tf.id
,tf.test_name
,tf.test_variant
.
I don't understand it.
Yes, but The reason could the one from the
|
@vuvova I changed the code to use Related to 1, I have no idea. I have manually tested in the same environment and I get the same error. Also, I have seen this repeated for other tests. If you have any suggestions please let me know, |
Short update: The fetching of data now with I have identified one more failure |
Bump to php-8.2 and new npm versions
8b053e1
to
93d9479
Compare
The last failure (missing This will be fixed in the second checkbox item from the PR description |
okay, there's a problem. buildbot only has a list of "changed files", it cannot tell if they were added deleted or modified. Meaning, we cannot delete removed tests from the list. |
@vuvova I guess we can set a property and get the information from git. I am thinking something similar to 2134d03, but I guess a bit more complicated to take all commits into account. Also FYI I needed to revert the s390x builders since some other changes needed to go live. I'll work on rebasing this PR and get them back to using it, but for now they are not. |
I've already added a feature to mtr to ignore unknown tests (MariaDB/server@d5773bc), so no need to go to git. Let's wait for it to be merged up, then we'll continue. Besides, this "spider_changed" seems overcomplicated, you can simply grep for |
as that's what the branch protection protects
FetchTestData now extends MTR and uses runQueryWithRetry to improve database connection reliability.
also, rename "failed_tests" property to "tests_to_run"
ef041e9
to
76f73f6
Compare
and don't run galera for getLastNFailedBuildFactory
amd64-debian-10 and amd64-fedora-38 now only run the last N failed tests
This is work-in-progress commit to have fast branch protection builders with a guarantee that a test, once failed, is fixed before further pushes are allowed. It works by running last N failed tests.
Note:
After it is made to work and proves useful, needs to be extended as:
MTR.runQueryWithRetry
instead ofrunQuery
and remove removed tests from the list