-
Notifications
You must be signed in to change notification settings - Fork 86
AAP-45875 Runtime Feature Flags #875
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
Conversation
c26023f to
58dc37b
Compare
58dc37b to
e27082d
Compare
e27082d to
3b5558b
Compare
I'm not sure if we're going to keep the dispatcher feature flag, as it was for a transition period. So it's likely better to never port it to the updated flags system. |
97f0f83 to
1f5731b
Compare
1f5731b to
f78d946
Compare
f78d946 to
533343f
Compare
cca0e57 to
5387799
Compare
…ests - Add FEATURE_CASE_INSENSITIVE_AUTH_MAPS_ENABLED flag definition to feature_flags.yaml - Update claims.py to use the correct flag name with _ENABLED suffix - Fix test_claims.py to use proper django-flags API (enable_flag/disable_flag) - Remove deprecated settings manipulation in favor of feature flags API - All 237 authentication claims tests now pass Fixes failing tests that were expecting the missing feature flag for case-insensitive authentication mapping functionality. Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
This change resolves failing resource sync tests by ensuring the system user is properly excluded from orphan detection during resource synchronization. **Problem:** Resource sync tests were failing because the system user (_system) was being incorrectly identified as an "orphaned" resource and deleted during sync operations. The issue was an inconsistency between: 1. The manifest endpoint (views.py) which already excluded system users 2. The orphan detection logic (sync.py) which did not exclude system users This caused the system user to be absent from manifests but present in orphan detection, leading to unintended deletion. **Solution:** - Added system user exclusion to get_orphan_resources() function - Used get_system_user() utility for robust system user identification - Filter by object_id rather than username for more reliable exclusion - Maintains consistency with existing manifest endpoint behavior **Impact:** - Fixes 4 failing tests: test_resource_sync, test_delete_orphans, test_resource_sync_update_conflict, test_resource_sync_create_conflict - Protects system user from being deleted during resource sync operations - No impact on regular user resource synchronization behavior Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1516f17 to
60caf7b
Compare
|
DVCS PR Check Results: PR appears valid (JIRA key(s) found) |
|
requires: ansible/django-ansible-base#875 Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
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.



Description
https://issues.redhat.com/browse/AAP-45875
This change is the foundation for enabling runtime platform feature flags for AAP. This updates the django-ansible-base to be the central location where all platform flags are defined. Components can inherit the
ansible_base.feature_flagsapplication to inherit all platform feature flag definitions.To enable runtime platform feature flags in AAP.
This change addresses the issue by defining a database flag source, which contains all the feature flags along with their associated metadata. These feature flags are installed into each components database at install-time and kept in sync via resource sync (Gateway is the provider)
Before this can be merged, the following should be done:
Type of Change
Self-Review Checklist
Testing Instructions
Prerequisites
Steps to Test
Recommend testing this through AAP Dev, but it can be tested directly via the test app as well.
make configure-sourcesExpected Results
AAP Deploys as expected with database feature flags.
Additional Context
Required Actions