Skip to content

Conversation

@fao89
Copy link
Member

@fao89 fao89 commented Oct 27, 2025

Jira: https://issues.redhat.com/browse/AAP-45879

This PR moves the EDA feature flag source from Settings based feature flags, to platform database level feature flags.
This also makes gateway the provider of this data for the platform.

This is required to enable platform level feature flags.

Gateway is the provider of the feature flag value updates, and is resource synced to EDA/other components.

It can be validated and tested simply with AAP Dev, and requires the following DAB PR to be merged in beforehand -
ansible/django-ansible-base#875
Once the DAB PR is merged, I will update this PR to point back to the upstream devel branch of DAB

To test -

  1. Clone AAP-Dev
  2. make configure-sources
  3. Select DAB, GW, and EDA for sources
  4. make aap
  5. Attempt to hit <GATEWAY_API>/feature_flags/X api endpoint and patch a flags value.
  6. If Gateway Setting RUNTIME_FEATURE_FLAGS == True, the update succeeds and flag value is resource synced to EDA
  7. If Gateway Setting RUNTIME_FEATURE_FLAGS == False, the update fails with error explaining why.

@fao89 fao89 requested a review from a team as a code owner October 27, 2025 13:38
@fao89 fao89 force-pushed the zk/platform-flags branch 3 times, most recently from 36d8e8b to 4e33539 Compare October 27, 2025 14:05
@fao89 fao89 marked this pull request as draft October 27, 2025 14:06
@fao89 fao89 force-pushed the zk/platform-flags branch from 4e33539 to e7af0de Compare October 27, 2025 14:14
@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.61%. Comparing base (55b0619) to head (8f36701).

@@           Coverage Diff           @@
##             main    #1407   +/-   ##
=======================================
  Coverage   94.60%   94.61%           
=======================================
  Files         343      343           
  Lines       21111    21127   +16     
=======================================
+ Hits        19973    19989   +16     
  Misses       1138     1138           
Flag Coverage Δ
unit-int-tests-3.11 94.56% <100.00%> (+<0.01%) ⬆️
unit-int-tests-3.12 94.61% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/aap_eda/api/resource_api.py 100.00% <100.00%> (ø)
src/aap_eda/settings/core.py 100.00% <ø> (ø)
src/aap_eda/settings/default.py 100.00% <ø> (ø)
tests/conftest.py 100.00% <100.00%> (ø)
tests/integration/api/test_feature_flags.py 100.00% <100.00%> (ø)
tests/integration/api/test_root.py 100.00% <ø> (ø)
tests/unit/test_features.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fao89 fao89 marked this pull request as ready for review October 30, 2025 19:06
@fao89
Copy link
Member Author

fao89 commented Nov 4, 2025

@ptoscano I see that you pushed a commit, was it for updating the branch? If so, I can rebase to see if I get a green CI

@ptoscano
Copy link
Contributor

ptoscano commented Nov 4, 2025

@ptoscano I see that you pushed a commit, was it for updating the branch? If so, I can rebase to see if I get a green CI

Yes, it was only a plain rebase, mostly to test recent changes to the coverage reporting for PRs to SonarQube. Apologies that I used it as guinea pig :D

Since the DAB branch it points to is gone (I guess because it was merged?), maybe would you please make it build again? No pressure/hurry. Thanks!

@fao89 fao89 force-pushed the zk/platform-flags branch 2 times, most recently from e83d534 to a31dece Compare November 7, 2025 10:06
zkayyali812
zkayyali812 previously approved these changes Nov 11, 2025
hsong-rh
hsong-rh previously approved these changes Nov 12, 2025
ttuffin
ttuffin previously approved these changes Nov 12, 2025
Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@fao89 fao89 dismissed stale reviews from ttuffin, hsong-rh, and zkayyali812 via 8f36701 November 24, 2025 20:44
@fao89 fao89 force-pushed the zk/platform-flags branch from a31dece to 8f36701 Compare November 24, 2025 20:44
@sonarqubecloud
Copy link

@hsong-rh hsong-rh merged commit 8d8e4d4 into ansible:main Nov 25, 2025
8 checks passed
@fao89 fao89 mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants