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

Add positive match case for feature flag test #408

Open
data-sync-user opened this issue Aug 24, 2023 · 2 comments
Open

Add positive match case for feature flag test #408

data-sync-user opened this issue Aug 24, 2023 · 2 comments
Labels
good-first-issue Good for newcomers

Comments

@data-sync-user
Copy link
Collaborator

After the removal of the test feature flag, the test that checks for the feature_flag metrics tag no longer have a matching case which adds the feature flag tags.

Ideally, there will be at least one test in https://github.com/mozilla-services/merino-py/blob/main/tests/integration/api/v1/suggest/test_suggest.py#L277-L332 which matches some feature flag tags. If this doesn’t seem useful or feasible, then let’s remove the test, as it doesn’t really provide us with any value.

┆Issue is synchronized with this Jira Task

@data-sync-user data-sync-user added the good-first-issue Good for newcomers label Aug 24, 2023
@data-sync-user
Copy link
Collaborator Author

➤ Katrina Anderson commented:

Raphael Pierzina thoughts?
Michelle suggested we investigate test doubling the feature flags, for a more agnostic test. Do you think that’s possible?

@data-sync-user
Copy link
Collaborator Author

➤ Raphael Pierzina commented:

Hi Katrina Anderson!

Can you elaborate on what you mean by “more agnostic”?

Currently feature flags are added as tags to metrics if code calls feature_flags.is_enabled("example").

I think we have two options here: Either skip/delete the integration test you mentioned or define a feature flag for the testing environment and call feature_flags.is_enabled("example") only if settings.current_env == ”testing” in the API handler for /suggest/. The latter will add overhead to calls in production, but that overhead may be negligible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant