Repository navigation
Make ValidatesRunner faster: Cache and reuse shared metrics pipeline execution in MetricsTest - #40322
Merged
kennknowles merged 1 commit intoSep 30, 2026
Conversation
kennknowles
approved these changes
Sep 29, 2026
| result.waitUntilFinish(); | ||
| return result; | ||
| String cacheKey = | ||
| pipeline.getOptions().getRunner().getName() |
Member
There was a problem hiding this comment.
I don't have a lot of context, but I do have concerns.
- There is nothing in the cache key to identify the pipeline. Is there just one pipeline possible here? Reading this file, I guess so? The tests are really poor, with mysterious action-at-a-distance between magic values in the
runPipelineWithMetricshelper and theassertGaugesand so on. I know you aren't here to fix this... - This is a
protectedmethod so presumably used in test suites that extend this one? Frankly this is an anti-pattern that we should have a coding agent eliminate, in favor of simple control flow by calling helper methods. And of course if someone overrides the protected method, they lose the caching and the coherence between the test methods and the run pipeline method.
Honestly, having an agent fully rewrite this file might be nice.
Contributor
Author
There was a problem hiding this comment.
yeah - I think the bigger problem is that this MetricsTest stuff is old and crufty. Maybe we want to just rewrite it all instead of trying to hack around it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Caches the read-only PipelineResult from runPipelineWithMetrics() per runner configuration so CommittedMetricTests and AttemptedMetricTests reuse a single pipeline execution.