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

fix: don't count stats for parent flags, even in get_variant #300

Merged
merged 11 commits into from
Mar 6, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Mar 5, 2024

Description

This PR fixes an issue where parent flags would have metrics counted when you call get_variant on a child flag. This was due to a missing skip_stats argument in the get_variant method of a feature.

I have added a test and the specific data setup that was reported to cause the issue.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@thomasheartman thomasheartman marked this pull request as draft March 5, 2024 09:19
@thomasheartman thomasheartman changed the title test: add a test case that replicates the error fix: don't count stats for parent flags, even in get_variant Mar 5, 2024
@coveralls
Copy link

coveralls commented Mar 6, 2024

Coverage Status

coverage: 96.905%. remained the same
when pulling 605b00e on fix/double-counting-parent-features
into 37c7df4 on main.

@thomasheartman thomasheartman marked this pull request as ready for review March 6, 2024 06:51
Copy link
Contributor

@gardleopard gardleopard left a comment

Choose a reason for hiding this comment

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

Great with tests on this!

@thomasheartman thomasheartman merged commit 31c33eb into main Mar 6, 2024
37 checks passed
@thomasheartman thomasheartman deleted the fix/double-counting-parent-features branch March 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants