Skip to content
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

[AAP-39136] - Register DAB Feature Flags endpoint #1196

Merged
merged 12 commits into from
Jan 31, 2025

Conversation

zkayyali812
Copy link
Collaborator

@zkayyali812 zkayyali812 commented Jan 23, 2025

  • Adds feature-flag API from the django-ansible-base.
  • Currently only LIST endpoint is added

API is accessible at - /api/eda/v1/feature_flags_state/.

To test, deploy EDA and ensure API is accessible at above endpoint. One can modify the FLAGS variable to see the state reflected at the API endpoint at installtime.

Also satisfies - https://issues.redhat.com/browse/AAP-39595

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (9299379) to head (6214c6c).

@@            Coverage Diff             @@
##             main    #1196      +/-   ##
==========================================
+ Coverage   93.39%   93.41%   +0.01%     
==========================================
  Files         263      264       +1     
  Lines       15086    15118      +32     
==========================================
+ Hits        14090    14122      +32     
  Misses        996      996              
Flag Coverage Δ
unit-int-tests-3.11 93.34% <100.00%> (+0.01%) ⬆️
unit-int-tests-3.12 93.41% <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/settings/default.py 89.16% <100.00%> (+0.23%) ⬆️
tests/integration/api/test_feature_flags.py 100.00% <100.00%> (ø)
tests/integration/api/test_root.py 100.00% <ø> (ø)

@zkayyali812 zkayyali812 marked this pull request as ready for review January 30, 2025 22:46
@zkayyali812 zkayyali812 requested a review from a team as a code owner January 30, 2025 22:46
pyproject.toml Outdated Show resolved Hide resolved
@hsong-rh
Copy link
Contributor

@zkayyali812 the coverage report said there are two missings. Could you improve it?

@zkayyali812
Copy link
Collaborator Author

Hey @hsong-rh ,
I tried to cover these lines for a bit, but haven't been able to figure out a way to sufficiently cover them in our unit testing, but I am able to confirm they work as expected in running deployments.

I was thinking that this may be sufficient for now, and ideally cover them them in our test-suite, once ATF is updated to consume this API. however if you know how I can cover these better, I would love to learn.

src/aap_eda/settings/default.py Outdated Show resolved Hide resolved
src/aap_eda/settings/default.py Outdated Show resolved Hide resolved
@zkayyali812
Copy link
Collaborator Author

@hsong-rh / @Alex-Izquierdo I think I addressed the code coverage here. Not sure if I can retrigger the codecov automation to update its comment above.

hsong-rh
hsong-rh previously approved these changes Jan 31, 2025
@zkayyali812 zkayyali812 merged commit d71dde7 into ansible:main Jan 31, 2025
11 checks passed
@zkayyali812 zkayyali812 deleted the zk/dab/feature-flag branch January 31, 2025 20:12
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