Skip to content

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

Merged
beeme1mr merged 7 commits into
open-feature:mainfrom
open-feature-forking:issue/fractional_relative_weighting
Jul 23, 2024
Merged

feat: Change fractional custom op from percentage-based to relative weighting.#91
beeme1mr merged 7 commits into
open-feature:mainfrom
open-feature-forking:issue/fractional_relative_weighting

Conversation

@aepfli

Copy link
Copy Markdown
Member

…eighting.
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli
aepfli requested a review from a team as a code ownerJune 19, 2024 17:26
@codecov

codecovBot commented Jun 19, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.45%. Comparing base (d8e10c7) to head (992b7b9).
Report is 34 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #91 +/- ##
==========================================
+ Coverage 90.55% 92.45% +1.90% 
==========================================
Files 8 12 +4 Lines 180 464 +284 ==========================================
+ Hits 163 429 +266 - Misses 17 35 +18 
FlagCoverage Δ
unittests?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwellmatthewelwell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've added a few styling related comments, but this PR will also need additional test coverage.

I also find the logic quite difficult to follow. Can we try to avoid multiple nested if statements? And can we perhaps make the error logs more descriptive about why they are error cases?

@aepfli

Copy link
Copy Markdown
MemberAuthor

I've added a few styling related comments, but this PR will also need additional test coverage.

I also find the logic quite difficult to follow. Can we try to avoid multiple nested if statements? And can we perhaps make the error logs more descriptive about why they are error cases?

I am working on adding further tests to the test harness. But i can also try to add here more tests. python, as you might have guessed, is not my strong suit. but i will try to adapt

@aepfli

Copy link
Copy Markdown
MemberAuthor

the python sdk only logs and error and continues its targeting evaluation - compared to the other sdks, eg java or js - is this a unintended difference between those, should we also unify this, and instead of logging an error raise an exception?

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli
aepfliforce-pushed the issue/fractional_relative_weighting branch from 67b69cb to 05a8ccaCompareJune 20, 2024 11:39
@Kavindu-Dodan

Kavindu-Dodan commented Jun 21, 2024

Copy link
Copy Markdown

the python sdk only logs and error and continues its targeting evaluation - compared to the other sdks, eg java or js - is this a unintended difference between those, should we also unify this, and instead of logging an error raise an exception?

+1 for this proposal. I had the same doubt when reviewing the PR. To be consistent, yes we should raise exceptions

@gruebelgruebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice work, added just some minor comments

aepfliand others added 2 commits June 26, 2024 08:19
…rovider/flagd/resolvers/process/custom_ops.py
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
…rovider/flagd/resolvers/process/custom_ops.py
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli
aepfliforce-pushed the issue/fractional_relative_weighting branch from 48e44fd to c0f4a55CompareJune 26, 2024 11:00

@gruebelgruebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks, looks good 🍻

@gruebel

Copy link
Copy Markdown
Member

@beeme1mr do you have any idea about the failing uploads to codecov? I thought we fixed that issue or is it something new?

@beeme1mr

Copy link
Copy Markdown
Member

@beeme1mr do you have any idea about the failing uploads to codecov? I thought we fixed that issue or is it something new?

I'm not sure what's wrong. The logs indicate that the codecov secret isn't set but the configuration looks correct and it was working last week.

…rovider/flagd/resolvers/process/custom_ops.py
Co-authored-by: Matthew Elwell <mjelwell89@gmail.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli
aepfliforce-pushed the issue/fractional_relative_weighting branch from 460be94 to 06e7a5cCompareJuly 8, 2024 19:12
@aepfli

Copy link
Copy Markdown
MemberAuthor

Any help for codecov is highly appreciated - it seems that this is the only reason the builds are failing

@beeme1mr

Copy link
Copy Markdown
Member

@aepfli could you please rebase? I think I've resolved the CodeCov issue with this PR.

@aepfli

Copy link
Copy Markdown
MemberAuthor

done i am not sure if anything else is missing here ;) but please let me know

@beeme1mr
beeme1mr merged commit 7b34822 into open-feature:mainJul 23, 2024
Sign up for freeto 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.

5 participants

@aepfli@Kavindu-Dodan@gruebel@beeme1mr@matthewelwell