-
Notifications
You must be signed in to change notification settings - Fork 465
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
ci: Remember failed workflows/td files and run them first in CI #31263
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
misc/python/materialize/test_analytics/setup/tables/03-build-job-failure.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- Copyright Materialize, Inc. and contributors. All rights reserved. | ||
-- | ||
-- Use of this software is governed by the Business Source License | ||
-- included in the LICENSE file at the root of this repository. | ||
-- | ||
-- As of the Change Date specified in that file, in accordance with | ||
-- the Business Source License, use of this software will be governed | ||
-- by the Apache License, Version 2.0. | ||
|
||
-- part of a build job that failed, can be a testdrive file or a workflow | ||
CREATE TABLE build_job_failure ( | ||
build_job_id TEXT NOT NULL, | ||
part TEXT NOT NULL | ||
); | ||
|
||
ALTER TABLE build_job_failure OWNER TO qa; | ||
GRANT SELECT, INSERT, UPDATE ON TABLE build_job_failure TO "hetzner-ci"; |
27 changes: 27 additions & 0 deletions
27
misc/python/materialize/test_analytics/setup/views/03-build-failure.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- Copyright Materialize, Inc. and contributors. All rights reserved. | ||
-- | ||
-- Use of this software is governed by the Business Source License | ||
-- included in the LICENSE file at the root of this repository. | ||
-- | ||
-- As of the Change Date specified in that file, in accordance with | ||
-- the Business Source License, use of this software will be governed | ||
-- by the Apache License, Version 2.0. | ||
|
||
CREATE OR REPLACE MATERIALIZED VIEW mv_build_job_failed_on_branch AS | ||
SELECT build_step_key, branch, part | ||
FROM build | ||
JOIN build_job ON build.build_id = build_job.build_id | ||
JOIN build_job_failure ON build_job.build_job_id = build_job_failure.build_job_id; | ||
|
||
CREATE OR REPLACE MATERIALIZED VIEW mv_build_job_failed AS | ||
SELECT build_step_key, part | ||
FROM build_job | ||
JOIN build_job_failure ON build_job.build_job_id = build_job_failure.build_job_id; | ||
|
||
CREATE DEFAULT INDEX ON mv_build_job_failed_on_branch; | ||
CREATE DEFAULT INDEX ON mv_build_job_failed; | ||
|
||
ALTER MATERIALIZED VIEW mv_build_job_failed_on_branch OWNER TO qa; | ||
GRANT SELECT ON TABLE mv_build_job_failed_on_branch TO "hetzner-ci"; | ||
ALTER MATERIALIZED VIEW mv_build_job_failed OWNER TO qa; | ||
GRANT SELECT ON TABLE mv_build_job_failed TO "hetzner-ci"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This part is what I'm unsure about in this PR. We collect the test failures at the end of the test run and only then mark the test as failed and write the annotation. Changing this would be a really major change.
So we currently have two options:
I'm currently going with the second approach, but that means you only notice an early failure if you check the logs manually.
So I don't see a way around changing the annotation logic to be able to annotate during runs already, if we want faster feedback and still run all parts after failures. Opinions?
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.
I think it's worth running all tests, to avoid death by a thousand cuts.
If someone cancels a workflow, can we still collect any failures that happened so far?
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.
Yes.
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.
Okay, perfect. I already tend to watch CI for early failures and can cancel as necessary, so this seems like the best option. Nice!