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

Allow overriding risk magnitudes #1353

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Allow overriding risk magnitudes #1353

merged 2 commits into from
Jul 18, 2024

Conversation

jaym
Copy link
Contributor

@jaym jaym commented Jul 2, 2024

Allows overriding the risk magnitude for a risk and completely disabling a risk.

After #1352

Copy link
Contributor

github-actions bot commented Jul 2, 2024

Test Results

  1 files  ±0   24 suites  ±0   18s ⏱️ -1s
394 tests +1  393 ✅ +1  1 💤 ±0  0 ❌ ±0 
395 runs  +1  394 ✅ +1  1 💤 ±0  0 ❌ ±0 

Results for commit fe5e731. ± Comparison against base commit 60af2da.

♻️ This comment has been updated with latest results.

@jaym jaym marked this pull request as draft July 2, 2024 22:36
@jaym jaym force-pushed the jdm/risk-magnitude-override branch 2 times, most recently from 2ec3464 to 449115e Compare July 11, 2024 18:49
@jaym jaym marked this pull request as ready for review July 11, 2024 20:00
float magnitude = 71;
bool is_absolute = 72;
float deprecated_v11_magnitude = 71;
bool deprecated_v11_is_absolute = 72;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Could you please add a comment what to use instead?

@@ -645,7 +653,7 @@ message ScoreDelta {
message ScoredRiskFactor {
string mrn = 1;
float risk = 2;
bool is_absolute = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I know, we save a risk factor struct in the backend. Do you know whether it is this one? Would this break the unmarshal of already saved risk factors?

}

if riskFactor.Action != explorer.Action_UNSPECIFIED {
existing.Action = riskFactor.Action
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps an edge case:
Could the same risk factor be defined in multiple policies?
This line would then mean that the last non-unspecified action wins. Is this as it should be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya, i think that problem already exists. But if its defined in the space policy it will win

@jaym jaym force-pushed the jdm/risk-magnitude-override branch from 449115e to fe5e731 Compare July 17, 2024 20:57
@jaym jaym merged commit a13b709 into main Jul 18, 2024
14 checks passed
@jaym jaym deleted the jdm/risk-magnitude-override branch July 18, 2024 15:06
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants