open-policy-agent / open-policy-agent/java-opa-sdk

Disk-persist downloaded bundles across restarts

Open
#62 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bundles services
Dominant language
Java
Stars
16
Forks
24
Avg merge
8h 17m
Merged PRs (30d)
15

Description

BundleDownloader keeps etag and lastModifiedTime in memory only, so every process restart triggers a full re-download even when the upstream bundle hasn't changed. OPA Go persists downloaded bundles to disk and reuses the last-good copy on startup, including when the initial fetch fails.

  • Persist the bundle bytes plus etag / last-modified to a configurable directory.
  • On startup, load and activate the persisted bundle before the first download attempt.
  • If the first download fails, keep serving the persisted bundle instead of failing the plugin.
  • Document the cache layout and how to disable persistence.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BundleDownloader and trace its startup and download lifecycle, then compare the described behavior with OPA Go's persisted bundle handling. Define the configurable cache directory and persisted bundle metadata, load and activate the last-good bundle before fetching, and preserve it when the first fetch fails. Document the cache layout and how persistence is disabled.

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
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.