Skip to content

Feature/ft categories on off setup#12

Merged
soraiayugulis merged 11 commits into
mainfrom
feature/ft-categories-on-off-setup
Jun 12, 2026
Merged

Feature/ft categories on off setup#12
soraiayugulis merged 11 commits into
mainfrom
feature/ft-categories-on-off-setup

Conversation

@soraiayugulis

Copy link
Copy Markdown
Owner

Summary

Phase 0 of the ft-categories-on-off feature — library integration and configuration. Adds the feature-gate-middleware library with GitHub Packages authentication, configures feature flag properties, and creates a FakeFeatureFlagClient for offline testing without ConfigCat SDK key.

Changes

Configuration

  • pom.xml: Added GitHub Packages repository, feature-gate-middleware dependency (0.1.0-SNAPSHOT), and spring-boot-starter-actuator for Micrometer metrics
  • application.yml: Added feature-gate.configcat.sdk-key, feature-gate.watch.enabled, and feature-gate.hi.enabled properties
  • pr-validation.yml: Added GITHUB_TOKEN environment variable to test job for GitHub Packages authentication

Test Infrastructure

  • FakeFeatureFlagClient.java: In-process stub implementation of FeatureFlagClient backed by Map<String, Boolean> for offline testing
  • FakeFeatureFlagClientTest.java: 4 unit tests covering default behavior, flag setting, and unknown flags
  • FeatureFlagTestConfiguration.java: Spring configuration providing FakeFeatureFlagClient as @Primary bean
  • application-test.yml: Test profile configuration with feature-gate auto-configuration disabled
  • BaseIntegrationTest.java: Base class for integration tests with @Import(FeatureFlagTestConfiguration.class) and @ActiveProfiles("test")
  • FeatureFlagContextLoadTest.java: Context load test verifying FakeFeatureFlagClient is loaded without ConfigCat SDK key
  • ApiIntegrationTest.java: Extended from BaseIntegrationTest to inherit feature flag test configuration

Notes

  • Package Correction: The library uses io.architecture.featureflag.core package, not io.featuregate.core as initially documented in the spec
  • Scope Override: feature-gate-middleware dependency scope set to compile to make API classes available for test compilation (library POM has all dependencies as runtime)
  • Actuator Dependency: Added spring-boot-starter-actuator to provide MeterRegistry bean required by watchFeatureFlagAspect
  • All Tests Pass: 120 tests passing with FakeFeatureFlagClient replacing ConfigCatFeatureFlagClient in test context

Checklist

  • GitHub Packages repository configured in pom.xml
  • feature-gate-middleware dependency added
  • GITHUB_TOKEN env added to CI workflow
  • application.yml configured with feature-gate properties
  • FakeFeatureFlagClient implemented with unit tests
  • FeatureFlagTestConfiguration bean created
  • application-test.yml with feature-gate disabled
  • BaseIntegrationTest for global test configuration
  • Integration tests extended to use BaseIntegrationTest
  • All 120 tests passing

@soraiayugulis soraiayugulis self-assigned this Jun 12, 2026
@soraiayugulis soraiayugulis added the enhancement New feature or request label Jun 12, 2026
@soraiayugulis soraiayugulis merged commit 2d487f7 into main Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant