-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
chore: use before_request hook for dynamic routes #14568
chore: use before_request hook for dynamic routes #14568
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #14568 +/- ##
==========================================
- Coverage 77.47% 77.30% -0.18%
==========================================
Files 958 959 +1
Lines 48486 48512 +26
Branches 5679 5681 +2
==========================================
- Hits 37565 37500 -65
- Misses 10721 10812 +91
Partials 200 200
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0c10565
to
4a5833c
Compare
Is there any test coverage for the affected endpoints? |
@robdiciuccio yes and no. The feature flags are |
@benjreinhart Would be nice to have some tests to ensure the 404 response is working as intended. I realize it's a bit out of scope since these didn't exist in the first place, but hey, more test coverage! |
77cdaf9
to
5e7dd5b
Compare
d5105d0
to
5700897
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice test enhancements!
* chore: use before_request hook for dynamic routes * Shorten hook names * Introduce with_feature_flags and update thumbnail tests * Disable test that fails in CI but not locally * Add test for reports
* chore: use before_request hook for dynamic routes * Shorten hook names * Introduce with_feature_flags and update thumbnail tests * Disable test that fails in CI but not locally * Add test for reports
* chore: use before_request hook for dynamic routes * Shorten hook names * Introduce with_feature_flags and update thumbnail tests * Disable test that fails in CI but not locally * Add test for reports
SUMMARY
This PR leverages a new FAB feature to allow certain features to be enabled/disabled at runtime rather than once during boot. Routes will 404 if features are disabled, which is the same functionality present today. It also presents a consistent way to handle conditional route availability, giving us an opportunity to unify how this type of thing is handled.
Notes
This PR also introduces a new pattern for enabling/disabling feature flags per test using the
with_feature_flags
decorator. Example:TEST PLAN
Manual/unit/fab tests.
cc @dpgaspar @robdiciuccio @craig-rueda