Repository navigation
Conversation
9 tasks
Macbet
force-pushed
the
refactor/spring-core-retry
branch
2 times, most recently
from
November 29, 2026 01:17
08d467d to
f27410a
Compare
Macbet
force-pushed
the
refactor/spring-core-retry
branch
from
November 29, 2026 01:37
f27410a to
f1e7c5e
Compare
Macbet
force-pushed
the
refactor/spring-core-retry
branch
2 times, most recently
from
November 29, 2026 10:05
32bb3de to
dd5e077
Compare
Macbet
force-pushed
the
refactor/spring-core-retry
branch
from
November 29, 2026 10:32
dd5e077 to
44138d4
Compare
Macbet
force-pushed
the
refactor/spring-core-retry
branch
from
November 29, 2026 12:58
44138d4 to
56a7e09
Compare
Macbet
force-pushed
the
refactor/spring-core-retry
branch
from
November 29, 2026 19:29
56a7e09 to
d15f476
Compare
Six hand-written retry loops (storage backends in both modules, the TerrakubeClient proxy, job context patches, version pinning and the final plan/apply snapshot) slept and counted attempts on their own. They now use RetryTemplate from spring-core, with no new dependency. Attempt counts, delays, which failures are retried, the exceptions callers see (including an InterruptedException cause when a backoff is interrupted) and the Micrometer metrics are unchanged; new tests pin the delay sequences and the interrupt paths. @retryable does not fit here: TerrakubeClient comes from an external jar and most loops retry on a returned value rather than an exception. StructuredOutputPersistenceQueue keeps its own loop, because it carries on after an interrupt and RetryTemplate always stops on one. Refs #4052
…pply Plan and apply each carried the same retry setup for the final snapshot patch. It now lives in FinalSnapshotPatcher, with the same three attempts and 200 ms / 400 ms delays. Also do the retry-count arithmetic in long and use unnamed patterns for unused catch parameters, as SonarCloud flagged. Refs #4052
StorageRetryMetrics existed twice, differing only in metric prefix and exception type. The logic now lives in common as StorageRetrySupport; both modules keep their StorageRetryMetrics class, metric names and exception types. Refs #4052
StorageRetrySupport is abstract, and its javadoc no longer suggests the executor's http backend uses it. Refs #4052
Drops the RetryableCall interface whose throws Exception Sonar flagged (java:S112); java.util.concurrent.Callable has the same shape.
Macbet
force-pushed
the
refactor/spring-core-retry
branch
from
November 29, 2026 19:34
d15f476 to
dea1751
Compare
|
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.



What changed and why?
Part 3 of #4052. Stacked on the Redis pull request.
Six hand-written retry loops slept and counted attempts on their own: the storage backends in both modules, the
TerrakubeClientproxy, job context patches, version pinning and the final plan / apply snapshot. They now useRetryTemplatefrom spring-core, with no new dependency.Attempt counts, delays, which failures are retried, the exceptions callers see and the Micrometer metrics are unchanged. That includes the
InterruptedExceptioncause when a backoff is interrupted, which the AWS and Azure state backends rely on to tell "storage unavailable" from "not found".@Retryabledoes not fit here:TerrakubeClientcomes from an external jar, and most loops retry on a returned value rather than an exception.StructuredOutputPersistenceQueuekeeps its own loop, because it carries on after an interrupt andRetryTemplatealways stops on one.Testing