open-policy-agent / open-policy-agent/java-opa-sdk
Retry uploads with exponential backoff
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 16
- Forks
- 24
- Avg merge
- 8h 17m
- Merged PRs (30d)
- 15
Description
DecisionLogPlugin.DecisionLogs.flush drains the buffer into a batch and calls sendToService, which catches and logs exceptions. The drained events are then gone — a transient HTTP failure (503, network blip) silently loses the batch.
- Hold the batch separately from the buffer until the upload succeeds.
- Retry on failure with exponential backoff and a configurable max attempts.
- On final failure, surface a status event (depends on the future per-plugin status work) and either re-queue at the head of the buffer or persist (depends on the disk-persistence follow-up).
- Tests: 5xx then success retains all events; permanent failure surfaces an error and doesn't loop forever.
- Coordinates with #76 (bounded buffer) — a permanently failing upload should still respect the cap.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at DecisionLogPlugin.DecisionLogs.flush and sendToService, then review the existing upload and buffering tests. Check issue #76 and the planned per-plugin status and disk-persistence work before settling the final-failure behavior. Done means transient 5xx failures retain all events and eventually succeed, while permanent failures surface an error, terminate after the configured attempts, and respect the buffer cap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100