Skip to content

Move to Runtime Platform Flags #1346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zkayyali812
Copy link
Collaborator

@zkayyali812 zkayyali812 commented Jun 11, 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#736
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.

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.92%. Comparing base (f82dabc) to head (4aeb9d1).

@@           Coverage Diff           @@
##             main    #1346   +/-   ##
=======================================
  Coverage   93.91%   93.92%           
=======================================
  Files         320      320           
  Lines       18827    18843   +16     
=======================================
+ Hits        17682    17698   +16     
  Misses       1145     1145           
Flag Coverage Δ
unit-int-tests-3.11 93.86% <100.00%> (+<0.01%) ⬆️
unit-int-tests-3.12 93.92% <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.

Copy link

@zkayyali812 zkayyali812 marked this pull request as ready for review June 18, 2025 17:47
@zkayyali812 zkayyali812 requested a review from a team as a code owner June 18, 2025 17:47
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.

2 participants