witty-crayon-22786
08/28/2023, 10:21 PMProcess property “invisible to the cache, but not to memoization”:witty-crayon-22786
08/28/2023, 10:24 PMget_digest method is used by the local cache, where we don’t actually need to maintain compliance with any standards about what should go into the digest: https://github.com/pantsbuild/pants/blob/7f257fdf64f11e0064cd6d56a1e1d5d36507ad3f/src/rust/engine/process_execution/src/lib.rs#L976C5-L995 … having said that, that method currently uses the exact same cache entry definition as our other process execution, because it delegates to make_execute_request : https://github.com/pantsbuild/pants/blob/7f257fdf64f11e0064cd6d56a1e1d5d36507ad3f/src/rust/engine/process_execution/src/lib.rs#L1065-L1296witty-crayon-22786
08/28/2023, 10:25 PMmake_execute_request converts a Process struct into an Action and a Command, which are the protobuf/REAPI level definitions of a process: they are used for remote execution and remote caching, and so are standardizedwitty-crayon-22786
08/28/2023, 10:26 PMProcess, but then not include it when creating an `Action`/`Command` from a Process in make_execute_requestwitty-crayon-22786
08/28/2023, 10:29 PMwitty-crayon-22786
08/28/2023, 10:29 PMwitty-crayon-22786
08/28/2023, 10:33 PMretries property to Process and have that be implemented by a CommandRunner layer (similar to our bounded, cache, switched , etc CommandRunners, in this directory).
in that approach, you would add a retries or attempts property to Process, and then your CommandRunner would retry the process in a loop until it got a success or until it ran out of attempts.witty-crayon-22786
08/28/2023, 10:35 PMwitty-crayon-22786
08/28/2023, 10:35 PMProcess to trigger the retry)witty-crayon-22786
08/28/2023, 10:38 PMbitter-ability-32190
08/28/2023, 11:16 PMwitty-crayon-22786
08/28/2023, 11:16 PMbitter-ability-32190
08/28/2023, 11:16 PMbitter-ability-32190
08/28/2023, 11:16 PMbitter-ability-32190
08/28/2023, 11:16 PMaverage-vr-56795
08/29/2023, 9:09 PMcareful-address-89803
08/30/2023, 4:24 AMcareful-address-89803
09/05/2023, 2:09 AMmake_execute_request just works. An advantage of this is that it allows for the caller implement custom retry logic. For example, the Test goal could rebuild the batches to include only the failed tests. (This may or may not be a good thing. If tests fail because they're concurrency unsafe, rerunning only the failed ones may reduce the concurrency and mask the problem). The disadvantage is that all callers need to have some logic for retrying processes.
Check it out here: https://github.com/pantsbuild/pants/pull/19760