-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Add output to signal if a test result was cached #13588
Comments
Additionally, the feature could use different signaling for "memoized" vs. "cached". |
We should definitely do this, yea. In fact, I promised @g-cassie I'd open a ticket about it a while back... oops. Thanks! |
#13590 exposes the information needed to do this. In a followup change, the |
To prepare for #13588, exposes the `ProcessResultMetadata` type to `Python`, and adds the `RunId` that a `ProcessResult` was generated in to its metadata. Collectively, this will allow `@rule` code which is interested in being invalidated for every run (probably only `@goal_rule`s) to render information about whether processes hit the cache, or were memoized.
I'm going to have to focus on other things for a bit. Maybe someone else would be interested in picking up the rendering changes, as described above? |
@stuhood Had a quick play with this, looks straightforward. But not sure how to get the current process run id though in the |
Ah, yea: sorry that that wasn't clear! #13590 added an intrinsic that exposes @goal_rule
def run_tests(
console: Console,
..,
run_id: RunId, # NEW
) -> TestGoal:
.. |
@riisi do you intend to implement this? |
Yes, been a bit busy this week but will come back to this tomorrow.
… On 11 Dec 2021, at 19:00, Yoav Alon ***@***.***> wrote:
@riisi do you intend to implement this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Thoughts on this layout? I'd slightly prefer columns like the Bazel output but this is the least change to get this in, and I don't want to mis-align with the outputs from the other goals - that might require a larger discussion. The possible cache results are
|
@riisi I would appreciate a sort-by option, where you can get the final output sorted by time |
BTW you absolutely can add columns (in a followup) if you like. There is no requirement that different goal outputs be consistent, and they aren't really today. |
I'd say "cached remotely", so it mirrors "cached locally"? |
A concern I'd have is when your terminal isn't wide enough, that wrapping might look even worse. We intentionally use soft wrapping with the output of That's probably not a show stopper and I think that columns would be a net win. Although, doing it in a dedicated followup probably makes sense. |
Fixes #13588. [ci skip-rust] [ci skip-build-wheels]
Fixes pantsbuild#13588. [ci skip-rust] [ci skip-build-wheels]
Is your feature request related to a problem? Please describe.
Coming from Bazelland, it was very nice to see which tests actually ran and which ones didn't due to caching.
Output looks roughly like:
This raised the confidence in the build tool's ability to cache entire test runs, and in our understanding of the cache invalidation.
Describe the solution you'd like
A similar output for
./pants test
(maybe other rules as well,lint
/fmt
/etc...).Describe alternatives you've considered
The stats helps, but isn't quite the same.
Additional context
N/A
The text was updated successfully, but these errors were encountered: