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

feat: Change fractional custom op from percentage-based to relative weighting. #828 #833

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented Jun 19, 2024

Related Issues

Fixes #828

@aepfli
Copy link
Member Author

aepfli commented Jun 19, 2024

i am not sure that my change caused the ci to fail. maybe i misread the log, but could some body of the maintainers restart the build

@aepfli aepfli force-pushed the issue/828_fractional_relative_weighting branch from 68f77f8 to 8f8e93f Compare June 19, 2024 12:30
…eighting. open-feature#828

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli aepfli force-pushed the issue/828_fractional_relative_weighting branch from 8f8e93f to ddbcc84 Compare June 19, 2024 13:35
@aepfli
Copy link
Member Author

aepfli commented Jun 19, 2024

okay i am realizing that the e2e tests are failing, i need to investigate, what might be the issue - do i maybe need to update some dependencies - or do you see an error in my implementation?

@toddbaert
Copy link
Member

okay i am realizing that the e2e tests are failing, i need to investigate, what might be the issue - do i maybe need to update some dependencies - or do you see an error in my implementation?

I'll try to debug locally and see. It's possible you are just very unlucky though and this is unrelated, because the assert that's failing doesn't seem to do with fractional at all... but these tests are usually very reliable and not flacky so 🤷

I will re-run to double-check

@toddbaert
Copy link
Member

It's the assertion in the_provider_configuration_changed_handler_must_run. It is consistently failing. I'm surprised though, it doesn't really have to do with fractional.

@toddbaert
Copy link
Member

toddbaert commented Jun 19, 2024

If you rebase on or merge main the e2e suite should work now.

See: #834

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli aepfli force-pushed the issue/828_fractional_relative_weighting branch from 5cbf293 to 0ab0e71 Compare June 19, 2024 16:25
@aepfli
Copy link
Member Author

aepfli commented Jun 19, 2024

relates also to: open-feature/flagd#1282 - for tracking purpose in the main ticket

@Kavindu-Dodan Kavindu-Dodan added this to the flagd-0.8.4 milestone Jun 20, 2024
Copy link
Collaborator

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

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

Other than the nit, looks good 🙌

…s/flagd/resolver/process/targeting/FractionalTest.java

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Copy link
Member

@thisthat thisthat left a comment

Choose a reason for hiding this comment

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

LGTM but I'd suggest to add the example reported in #828 for testing purpose to validate that if we have a 50/50 (or 25/25/25/25) it's equivalent to 1/1 (or 1/1/1/1)

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli
Copy link
Member Author

aepfli commented Jun 27, 2024

LGTM but I'd suggest to add the example reported in #828 for testing purpose to validate that if we have a 50/50 (or 25/25/25/25) it's equivalent to 1/1 (or 1/1/1/1)

@thisthat i modified the tests, and added some more, each test is now an own json file, with a rule and an expected result, this allows us to easier add test cases in the future - i hope this is fine.

Copy link
Member

@thisthat thisthat left a comment

Choose a reason for hiding this comment

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

Thanks a lot @aepfli :shipit:

@toddbaert toddbaert merged commit 2e5c146 into open-feature:main Jun 27, 2024
4 checks passed
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.

[FEATURE] Change fractional custom op from percentage-based to relative weighting.
5 participants