feat: add GCP Parameter Manager and Secret Manager OpenFeature providers#1
Merged
feat: add GCP Parameter Manager and Secret Manager OpenFeature providers#1
Conversation
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
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.
Adds two new OpenFeature Java providers backed by GCP-native storage:
providers/gcp-parameter-manager: Reads feature flags from Google CloudParameter 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 CloudSecret Manager (google-cloud-secretmanager:2.57.0). Identical
configuration surface with secretVersion, cacheExpiry, cacheMaxSize,
and secretNamePrefix options.
Both providers:
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