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

Include criteria which imply the required criteria in suggest output #614

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

mystor
Copy link
Collaborator

@mystor mystor commented May 24, 2024

For most consumers using exclusively the default criteria, this will only impact the output for safe-to-run recommendations to mention that safe-to-deploy would also be applicable. For consumers using more complex criteria, this may increase the size of the suggest output more substantially.

This change does impact JSON output, but only for strings generally intended for human consumption. If a script was previously parsing these strings it may be broken by the change.

Fixes #613

For most consumers using exclusively the default criteria, this will
only impact the output for `safe-to-run` recommendations to mention that
`safe-to-deploy` would also be applicable. For consumers using more
complex criteria, this may increase the size of the suggest output more
substantially.

This change does impact JSON output, but only for strings generally
intended for human consumption. If a script was previously parsing these
strings it may be broken by the change.

Fixes mozilla#613
src/criteria.rs Outdated
@@ -177,6 +177,16 @@ impl CriteriaMapper {
pub fn criteria_index(&self, criteria_name: CriteriaStr<'_>) -> usize {
self.index[criteria_name]
}

/// Yields the indicies for all criteria which imply the the given criteria.
Copy link
Contributor

Choose a reason for hiding this comment

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

optional nitty nit: s/the the/the/

@anforowicz
Copy link
Contributor

Thanks! LGTM (although I am not sure if it counts because I am not a real owner / reviewer of this project).

Copy link
Collaborator

@afranchuk afranchuk left a comment

Choose a reason for hiding this comment

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

This looks good.

I'd like to bring up a complaint in the human-readable output that I've had prior to this PR. We say "recommended audits for safe-to-run (or safe-to-deploy):", however to me that sentence structure makes it sound like those are audits you need to do to meet some "safe-to-run" objective overall. This doesn't make sense in context since you should be told the criteria which the audits must meet, however it still throws me off when I read it. I think it's clearer if the wording is "recommended safe-to-run (or safe-to-deploy) audits:" or "recommended audits {meeting,satisfying} safe-to-run (or safe-to-deploy):".

src/criteria.rs Outdated Show resolved Hide resolved
Co-authored-by: Alex Franchuk <alex.franchuk@gmail.com>
@mystor mystor merged commit dd6d847 into mozilla:main Jun 5, 2024
8 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.

Clarify which audits are recommended when X implies Y criteria
3 participants