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

CLI allows "disabling" total project threshold #288

Closed
kylewillmon opened this issue Apr 22, 2022 · 1 comment · Fixed by #329
Closed

CLI allows "disabling" total project threshold #288

kylewillmon opened this issue Apr 22, 2022 · 1 comment · Fixed by #329
Labels
bug Something isn't working medium priority Should be handled as soon as possible

Comments

@kylewillmon
Copy link
Contributor

In the phylum project set-thresholds command, using a score of 0 (zero) for the "TOTAL PROJECT Threshold" claims that this is "disabling" the threshold:

✔ TOTAL PROJECT Threshold · 0

Disabling total project risk domain

However, in the UI, there is no option to disable the total project threshold. The individual risk domains all have sliders next to them, but the total project threshold does not:

total-project-threshold

So this threshold is actually enabled with a value of 0

@kylewillmon kylewillmon added bug Something isn't working needs triage Needs to be reviewed or assigned labels Apr 22, 2022
@cd-work
Copy link
Contributor

cd-work commented Apr 22, 2022

This seems related to #287 (comment). There's no way to know if a threshold was actually disabled or not.

@louislang louislang added medium priority Should be handled as soon as possible and removed needs triage Needs to be reviewed or assigned labels Apr 25, 2022
cd-work added a commit that referenced this issue Apr 29, 2022
Previously, when setting the project thresholds from the CLI, a value of
`0` would automatically disable the specified threshold. This does not
correctly represent the backend configuration, since some thresholds
cannot be disabled and it is possible to have a threshold enabled with a
value of `0`.

To address both of these issues, an explicit `Disabled` option has been
added to the interactive `set-thresholds` command, which allows
controlling the `active` state of the threshold independently from its
value.

To ensure that the "Total Project" threshold is not disabled, a special
case has been added which will inform the user that a value must be set
for this threshold.

Closes #288.
cd-work added a commit that referenced this issue May 2, 2022
Previously, when setting the project thresholds from the CLI, a value of
`0` would automatically disable the specified threshold. This does not
correctly represent the backend configuration, since some thresholds
cannot be disabled and it is possible to have a threshold enabled with a
value of `0`.

To address both of these issues, an explicit `Disabled` option has been
added to the interactive `set-thresholds` command, which allows
controlling the `active` state of the threshold independently from its
value.

To ensure that the "Total Project" threshold is not disabled, a special
case has been added which will inform the user that a value must be set
for this threshold.

Closes #288.
cd-work added a commit that referenced this issue May 3, 2022
Previously, when setting the project thresholds from the CLI, a value of
`0` would automatically disable the specified threshold. This does not
correctly represent the backend configuration, since some thresholds
cannot be disabled and it is possible to have a threshold enabled with a
value of `0`.

To address both of these issues, an explicit `Disabled` option has been
added to the interactive `set-thresholds` command, which allows
controlling the `active` state of the threshold independently from its
value.

To ensure that the "Total Project" threshold is not disabled, a special
case has been added which will inform the user that a value must be set
for this threshold.

Closes #288.
cd-work added a commit that referenced this issue May 3, 2022
Previously, when setting the project thresholds from the CLI, a value of
`0` would automatically disable the specified threshold. This does not
correctly represent the backend configuration, since some thresholds
cannot be disabled and it is possible to have a threshold enabled with a
value of `0`.

To address both of these issues, an explicit `Disabled` option has been
added to the interactive `set-thresholds` command, which allows
controlling the `active` state of the threshold independently from its
value.

To ensure that the "Total Project" threshold is not disabled, a special
case has been added which will inform the user that a value must be set
for this threshold.

Closes #288.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium priority Should be handled as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants