Skip to content

feat: add GCP Parameter Manager and Secret Manager OpenFeature providers#1

Merged
mahpatil merged 3 commits intomainfrom
claude/gcp-storage-support-NEs9n
Apr 7, 2026
Merged

feat: add GCP Parameter Manager and Secret Manager OpenFeature providers#1
mahpatil merged 3 commits intomainfrom
claude/gcp-storage-support-NEs9n

Conversation

@mahpatil
Copy link
Copy Markdown
Owner

@mahpatil mahpatil commented Apr 4, 2026

Adds two new OpenFeature Java providers backed by GCP-native storage:

  • providers/gcp-parameter-manager: Reads feature flags from Google Cloud
    Parameter Manager (google-cloud-parametermanager:0.31.0). Supports
    flag keys mapping directly to parameter names with optional prefix,
    configurable version (default "latest"), TTL-based in-memory cache
    (default 5 min, 500 entries), and Application Default Credentials
    with optional explicit GoogleCredentials.

  • providers/gcp-secret-manager: Reads feature flags from Google Cloud
    Secret Manager (google-cloud-secretmanager:2.57.0). Identical
    configuration surface with secretVersion, cacheExpiry, cacheMaxSize,
    and secretNamePrefix options.

Both providers:

  • Implement all 5 OpenFeature evaluation methods (bool/string/int/double/object)
  • Parse JSON values into OpenFeature Value/MutableStructure for object flags
  • Map GCP NotFoundException → FlagNotFoundError, other errors → GeneralError
  • Pass all quality gates: Checkstyle, PMD, SpotBugs, Spotless
  • Include 41 unit tests each (FlagCache, FlagValueConverter, provider tests)
  • Include @tag("integration") tests gated by GCP_PROJECT_ID env var

Registers both modules in root pom.xml, release-please-config.json, and
.release-please-manifest.json at version 0.0.1.

https://claude.ai/code/session_017KfN53GLayq9uci3NXuAn4

claude and others added 3 commits April 4, 2026 19:12
Adds two new OpenFeature Java providers backed by GCP-native storage:

- `providers/gcp-parameter-manager`: Reads feature flags from Google Cloud
  Parameter Manager (google-cloud-parametermanager:0.31.0). Supports
  flag keys mapping directly to parameter names with optional prefix,
  configurable version (default "latest"), TTL-based in-memory cache
  (default 5 min, 500 entries), and Application Default Credentials
  with optional explicit GoogleCredentials.

- `providers/gcp-secret-manager`: Reads feature flags from Google Cloud
  Secret Manager (google-cloud-secretmanager:2.57.0). Identical
  configuration surface with secretVersion, cacheExpiry, cacheMaxSize,
  and secretNamePrefix options.

Both providers:
- Implement all 5 OpenFeature evaluation methods (bool/string/int/double/object)
- Parse JSON values into OpenFeature Value/MutableStructure for object flags
- Map GCP NotFoundException → FlagNotFoundError, other errors → GeneralError
- Pass all quality gates: Checkstyle, PMD, SpotBugs, Spotless
- Include 41 unit tests each (FlagCache, FlagValueConverter, provider tests)
- Include @tag("integration") tests gated by GCP_PROJECT_ID env var

Registers both modules in root pom.xml, release-please-config.json, and
.release-please-manifest.json at version 0.0.1.

https://claude.ai/code/session_017KfN53GLayq9uci3NXuAn4
…oviders

Creates two standalone Maven sample applications under samples/ to demonstrate
end-to-end usage of the GCP OpenFeature providers against a real GCP project.

samples/gcp-secret-manager-sample/
- SecretManagerSampleApp.java — evaluates 5 flag types (bool/string/int/double/object)
  using GcpSecretManagerProvider with ADC and a 30s TTL cache
- setup.sh / teardown.sh — gcloud commands to create/delete the sample secrets
- pom.xml — standalone Maven project with exec-maven-plugin
- README.md — step-by-step instructions with expected output and troubleshooting

samples/gcp-parameter-manager-sample/
- ParameterManagerSampleApp.java — identical scenario for GcpParameterManagerProvider
  with locationId="global" and parameterNamePrefix="of-sample-"
- setup.sh / teardown.sh — gcloud commands for Parameter Manager API
- pom.xml / README.md — same structure as Secret Manager sample

Feature flags demonstrated (e-commerce scenario):
  dark-mode (bool), banner-text (string), max-cart-items (int),
  discount-rate (double), checkout-config (JSON object)

Samples are NOT added to the root multi-module build (no quality gate overhead).
Run `mvn install -DskipTests` from repo root first, then `mvn exec:java` in each sample.

https://claude.ai/code/session_017KfN53GLayq9uci3NXuAn4
@mahpatil mahpatil merged commit 5258cda into main Apr 7, 2026
@mahpatil mahpatil deleted the claude/gcp-storage-support-NEs9n branch April 7, 2026 21:40
@mahpatil mahpatil restored the claude/gcp-storage-support-NEs9n branch April 7, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants