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 test case for json array variation values (FF-2903) #50

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Jul 30, 2024

Observation

Broken behavior was observed in some SDKs when users create a json variation with top-level arrays.

Changes

  • Adds a discrete test for this behavior to surface all broken SDKs and prevent regressions.
  • Modeled on the existing JSON test but with array values instead of object.

{
"flag": "json-array-config-flag",
"variationType": "JSON",
"defaultValue": [],
Copy link
Member Author

Choose a reason for hiding this comment

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

default is an array

Copy link
Contributor

@schmit schmit left a comment

Choose a reason for hiding this comment

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

Thanks for adding this extra test 💪

Would be awesome to incorporate the following two changes:

  • Add the test case to our tests in the Eppo repo so that we can use that to generate the obfuscated version (this is a pain but better than doing the next point by hand), see https://github.com/Eppo-exp/eppo/pull/9688 for an example
  • Add the new test flag to the obfuscated config

@leoromanovsky
Copy link
Member Author

Add the test case to our tests in the Eppo repo so that we can use that to generate the obfuscated version (this is a pain but better than doing the next point by hand), see https://github.com/Eppo-exp/eppo/pull/9688 for an example

Why is this test needed in the repo - generating an array of json is not "bad". Main goal we have is that SDKs are able to parse it.

Add the new test flag to the obfuscated config

Sure - looking for how to obfuscated. Is there a tool?

@leoromanovsky
Copy link
Member Author

Imported obfuscated test file generated in https://github.com/Eppo-exp/eppo/pull/10269 - confirmed minimal diffs and only new case

Copy link
Contributor

@schmit schmit left a comment

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants