Skip to content

CI: Code checks ensure return status is handled #30457

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

Merged
merged 2 commits into from
Dec 25, 2019
Merged

CI: Code checks ensure return status is handled #30457

merged 2 commits into from
Dec 25, 2019

Conversation

alimcmaster1
Copy link
Member

@alimcmaster1 alimcmaster1 commented Dec 24, 2019

Follow up from discussion here. #30370 (comment)

Seems like we are not return the return code of all these code checks - unless I am missing something?

Expected this to fail on master until #30455 is merged

cc. @WillAyd @datapythonista

@alimcmaster1 alimcmaster1 added CI Continuous Integration Clean labels Dec 24, 2019
@alimcmaster1 alimcmaster1 added this to the 1.0 milestone Dec 24, 2019
@alimcmaster1 alimcmaster1 changed the title CLN: Code checks ensure return status is handled CI: Code checks ensure return status is handled Dec 24, 2019
@WillAyd
Copy link
Member

WillAyd commented Dec 24, 2019

Hmm OK - so I guess none of these were doing anything before? Do they all return the same value on failure or is it possible for a -1 return to clash with a +1 return now?

@alimcmaster1
Copy link
Member Author

Hmm OK - so I guess none of these were doing anything before? Do they all return the same value on failure or is it possible for a -1 return to clash with a +1 return now?

Yeah I believe these were not doing anything before.. all our other uses of invgrep update RET afterwards.

Believe our invgrep only returns [0,1] in code_checks.sh, so no need to worry about return values < 0 unless i'm missing something?

function invgrep {
    # grep with inverse exist status and formatting for azure-pipelines
    #
    # This function works exactly as grep, but with opposite exit status:
    # - 0 (success) when no patterns are found
    # - 1 (fail) when the patterns are found

@WillAyd
Copy link
Member

WillAyd commented Dec 24, 2019

OK lgtm then. @datapythonista care to take a look?

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Strange that we missed this before, but yes, this seems to make sense.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Strange that we missed this before, but yes, this seems to make sense.

@alimcmaster1
Copy link
Member Author

alimcmaster1 commented Dec 24, 2019

Will merge master once Marc has had a look. (Code checks should then pass since #30455 is now merged)

Example with CI failing as expected: https://github.com/pandas-dev/pandas/runs/362659323#step:4:10

@alimcmaster1
Copy link
Member Author

Strange that we missed this before, but yes, this seems to make sense.

Great thanks for taking a look - much appreciated!

@datapythonista datapythonista merged commit 1593023 into pandas-dev:master Dec 25, 2019
@datapythonista
Copy link
Member

Thanks for spotting and fixing those @alimcmaster1

For reference, this was introduced here: #29318

Not sure if for consistency/clarity we could have a separate error message for each of those, like everywhere else in the file. But not really important.

AlexKirko pushed a commit to AlexKirko/pandas that referenced this pull request Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Clean
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants