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

⚠️ Switch Outcome type to string #4006

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

spencerschrock
Copy link
Member

What kind of change does this PR introduce?

structured result cleanup which is technically a breaking change

What is the current behavior?

Outcome is an int based type

What is the new behavior (if this is a feature change)?**

Outcome is a string based type, which leads to better output format

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Related to #2928 (comment)

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

Originally, these were introduced as ints to enable ordering between them.
Today, I don't see the value in doing that, and it makes the output less readable.

Signed-off-by: Spencer Schrock <[email protected]>
previously, OutcomeNegative had the integer value of 0. So some tests
didnt specify the outcome and happened to pass due to the zero value.
This also fixes the tests names while I was here.

Signed-off-by: Spencer Schrock <[email protected]>
this change demonstrates the reason for this PR.
Human readable outcomes are good!

Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock requested a review from a team as a code owner April 5, 2024 18:56
@spencerschrock spencerschrock requested review from naveensrinivasan and justaugustus and removed request for a team April 5, 2024 18:56
@spencerschrock spencerschrock requested review from laurentsimon and removed request for naveensrinivasan April 5, 2024 18:56
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Merging #4006 (b4c7bed) into main (b118c19) will increase coverage by 3.79%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4006      +/-   ##
==========================================
+ Coverage   66.70%   70.49%   +3.79%     
==========================================
  Files         223      223              
  Lines       16070    16070              
==========================================
+ Hits        10719    11329     +610     
+ Misses       4688     4021     -667     
- Partials      663      720      +57     

Copy link
Contributor

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

You'll do the change from positive/negative -> true/false in another PR I suppose. LGTM

@spencerschrock
Copy link
Member Author

You'll do the change from positive/negative -> true/false in another PR I suppose. LGTM

Yes. And that will also be 2 changes so the important changes don't get lost in a big diff.

  1. A mechanical Positive -> True and Negative -> False change. Plus the necessary log changes.
  2. Flipping the negative probes. e.g notArchived -> archived

@spencerschrock spencerschrock merged commit ba4fb1b into ossf:main Apr 8, 2024
36 checks passed
@spencerschrock spencerschrock deleted the outcome-string branch April 8, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants