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

Backporting "Fix policy condition calculation" onto release/0.28 #1008

Merged
merged 2 commits into from
Jun 26, 2023

Commits on Jun 16, 2023

  1. Fix policy condition calculation

    When constructing the `Condition` struct we recursively call
    `get_condition` on all the items in a threshold and short-circuit if
    there's an error somewhere (for example, because the policy-path hasn't
    been provided for a specific threshold).
    
    This can cause issues when the user doesn't care about a subtree, because
    we still try to call `get_condition` on all the items and fail if
    something is missing, even if the specific subtree isn't selected and
    won't be used later on.
    
    This commit changes the logic so that we first filter only the `selected`
    items, and then unwrap the error using the question mark. If errors
    happened somewhere else they will be ignored, as it should.
    afilini authored and junderw committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    3ccdb84 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Fix build errors

    junderw committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    9cffaad View commit details
    Browse the repository at this point in the history