Skip to content

Move to Runtime Platform Flags#16148

Merged
thedoubl3j merged 2 commits intoansible:develfrom
fao89:zk-platform-flags
Nov 25, 2025
Merged

Move to Runtime Platform Flags#16148
thedoubl3j merged 2 commits intoansible:develfrom
fao89:zk-platform-flags

Conversation

@fao89
Copy link
Copy Markdown
Member

@fao89 fao89 commented Oct 27, 2025

Move to Runtime Platform Flags

ISSUE TYPE

  • New or Enhanced Feature

COMPONENT NAME

  • API

ADDITIONAL INFORMATION
This PR moves the source of truth for feature flags from components to the platform, inheriting and leveraging platform flags.
This PR requires - ansible/django-ansible-base#875 to be merged in first.

@github-actions github-actions bot added component:api dependencies Pull requests that update a dependency file labels Oct 27, 2025
@fao89 fao89 marked this pull request as draft October 27, 2025 15:07
@fao89 fao89 force-pushed the zk-platform-flags branch from 5f6ba99 to 58f9133 Compare October 27, 2025 15:29
@AlanCoding

This comment was marked as resolved.

@fao89 fao89 force-pushed the zk-platform-flags branch from 58f9133 to a188433 Compare October 28, 2025 17:30
@fao89 fao89 marked this pull request as ready for review October 30, 2025 19:06
@Spredzy Spredzy requested a review from AlanCoding November 4, 2025 11:17
Comment thread requirements/requirements_git.txt Outdated
git+https://github.com/ansible/ansible-runner.git@devel#egg=ansible-runner
awx-plugins-core @ git+https://github.com/ansible/awx-plugins.git@devel#egg=awx-plugins-core[credentials-github-app]
django-ansible-base @ git+https://github.com/ansible/django-ansible-base@devel#egg=django-ansible-base[rest-filters,jwt_consumer,resource-registry,rbac,feature-flags]
django-ansible-base @ git+https://github.com/fao89/django-ansible-base@phase2/feature-flags/poc#egg=django-ansible-base[rest-filters,jwt_consumer,resource-registry,rbac,feature-flags]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to be reset

@fao89 fao89 force-pushed the zk-platform-flags branch from a188433 to e39480a Compare November 24, 2025 20:38
@github-actions github-actions bot removed the dependencies Pull requests that update a dependency file label Nov 24, 2025
@fao89 fao89 force-pushed the zk-platform-flags branch 2 times, most recently from d7c4920 to 10f9065 Compare November 24, 2025 21:18
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Nov 24, 2025
@fao89 fao89 force-pushed the zk-platform-flags branch 2 times, most recently from 8d3853d to d5083f3 Compare November 24, 2025 21:52
Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@fao89 fao89 force-pushed the zk-platform-flags branch from d5083f3 to 571cb37 Compare November 25, 2025 11:47
@fao89 fao89 force-pushed the zk-platform-flags branch from 63fce97 to 53905bb Compare November 25, 2025 13:22
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Comment on lines +155 to +156
# Filter out files that are excluded by .coveragerc to avoid coverage conflicts
# This prevents SonarCloud from analyzing files that have no coverage data
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlanCoding could you help me understand why sonar fails?
test is there but it seems coveragerc is making sonar blind

Copy link
Copy Markdown
Member

@thedoubl3j thedoubl3j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the workflow updates @fao89. the new workflow stuff will not take effect until the PR merges so the gate will never actually be met in this PR. I think merging as things stand is fine by me.

@thedoubl3j thedoubl3j merged commit 2b2f2b7 into ansible:devel Nov 25, 2025
17 of 18 checks passed
Jaapis pushed a commit to Jaapis/awx that referenced this pull request Feb 4, 2026
…7221)

* Move to Runtime Platform Flags (ansible#16148)

* move to platform flags
cherrypick from: ansible#16148

Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>

Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* Update tests to use flags.state API for runtime platform flags

Tests updated:
- test_indirect_host_counting: use enable_flag()/disable_flag()
- test_cleanup_old_audit_records: use enable_flag()/disable_flag()
- TestGenericRun::test_awx_task_env: use @pytest.mark.django_db instead of mock

For test classes with many tests (TestJobCredentials, TestInventoryUpdateCredentials),
keep mock_flag_enabled fixtures to avoid adding @pytest.mark.django_db to 60+ tests.

---------

Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:api dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants