Skip to content

Conversation

@stbenjam
Copy link
Member

@stbenjam stbenjam commented Nov 17, 2025

Similar to #30445, but includes duration information for all tests from BigQuery. Not sure if the duration JSON generator should live here or elsewhere, probably elsewhere given the dependency size (ci-tools?)

Add test duration query functionality from BigQuery and implement duration-aware test sorting to optimize test suite execution order. Includes new "generate durations" command and required dependencies.

Add test duration query functionality from BigQuery and implement
duration-aware test sorting to optimize test suite execution order.
Includes new "generate durations" command and required dependencies.

Co-Authored-By: Claude <[email protected]>
@openshift-ci-robot
Copy link

Pipeline controller notification
This repository is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. Review these jobs and use /test <job> to manually trigger optional jobs most likely to be impacted by the proposed changes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 17, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stbenjam

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added vendor-update Touching vendor dir or related files approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2025
@stbenjam stbenjam changed the title feat(tests): add BigQuery-based test duration tracking TRT-2423: feat(tests): add BigQuery-based test duration tracking Nov 17, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 17, 2025

@stbenjam: This pull request references TRT-2423 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

In response to this:

Add test duration query functionality from BigQuery and implement duration-aware test sorting to optimize test suite execution order. Includes new "generate durations" command and required dependencies.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 17, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 17, 2025

@stbenjam: This pull request references TRT-2423 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

In response to this:

Similar to 30445, but includes duration information for all tests from BigQuery. Not sure if the duration JSON generator should live here or elsewhere, probably elsewhere given the dependency size (ci-tools?)

Add test duration query functionality from BigQuery and implement duration-aware test sorting to optimize test suite execution order. Includes new "generate durations" command and required dependencies.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 17, 2025

@stbenjam: This pull request references TRT-2423 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

In response to this:

Similar to #30445, but includes duration information for all tests from BigQuery. Not sure if the duration JSON generator should live here or elsewhere, probably elsewhere given the dependency size (ci-tools?)

Add test duration query functionality from BigQuery and implement duration-aware test sorting to optimize test suite execution order. Includes new "generate durations" command and required dependencies.

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 openshift-eng/jira-lifecycle-plugin repository.

@stbenjam
Copy link
Member Author

/test e2e-aws-ovn-fips

}

// buildQuery constructs the BigQuery SQL query
func (o *DurationsOptions) buildQuery() string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested it with openshift-ci-data-analysis.ci_data.JobTestSummaryByDate noted in TRT-2389? Thought being that using the daily summary would be more cost effective over time. Also considered this being part of jobrunhistoricaldataanalyzer

Copy link
Member Author

@stbenjam stbenjam Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JobTestSummaryByDate appears to be job-level data? I only care about average test duration

Copy link
Member Author

@stbenjam stbenjam Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, maybe TestsSummaryByDate? It is still grouped by job. I'm not sure I care about job-level data, I just need a rough estimate for test duration, and my JUnit query is only 13GB here and I'd guess we only care to run it at most once a day or week.

I'm a little concerned about building things in our repos on bespoke tables without schema management, especially if we'll plan to eventually try to change our data sources. Relying on JUnit makes various things easier to move en masse if we need to because its widely used

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, openshift-ci-data-analysis.ci_data.TestsSummaryByDate my bad.

We have a whole process setup that does this already for disruption and alert data. We have a job that runs weekly to update the data. It would make sense to me to have this logic running in the same process and if ci-tool already works with biq query then keeping the logic over there makes more sense to me as well.

var testDurationsData []byte

// TestDurationData represents the duration information for a single test
type TestDurationData struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have been talking about including more than just the duration data with the test names so we can consider things like pass rate over a period of time to consider dropping tests that never fail, etc. That would be good to consider here as well if possible.

@neisw
Copy link
Contributor

neisw commented Nov 18, 2025

/test e2e-aws-ovn-fips

@neisw
Copy link
Contributor

neisw commented Nov 18, 2025

Interesting that 30493 - aws-ovn-fips ran for 2h59m9s but 30445 - aws-ovn-fips was 2h17m31s that one is out of date so not a fair comparison I guess.

@neisw
Copy link
Contributor

neisw commented Nov 18, 2025

/test e2e-aws-ovn-fips

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 18, 2025

@stbenjam: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-fips df48c54 link true /test e2e-aws-ovn-fips
ci/prow/e2e-metal-ipi-ovn-ipv6 df48c54 link true /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@neisw
Copy link
Contributor

neisw commented Nov 19, 2025

Most recent aws-ovn-fips run for #30445 was for 2h49m37s which lines up with your 2h51m17s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. vendor-update Touching vendor dir or related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants