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

fix: Ensure exit with non-zero code when error occurs #358

Merged
merged 4 commits into from
Jul 21, 2022

Conversation

lenny-goodell
Copy link
Member

fixes #318

Signed-off-by: Leonard Goodell [email protected]

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-bootstrap/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?) Not unit testable
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?) N/A

Testing Instructions

Use this branch in device SDK and Device Rest
Run Device Rest
Press control C
Verify echo $? returns 0
Run Device Rest
Run Device Rest in another terminal
Verify if fails due to port bind error
Verify echo $? returns 1

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

Codecov Report

Merging #358 (e354950) into main (1361f04) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
- Coverage   60.37%   60.33%   -0.05%     
==========================================
  Files          22       22              
  Lines        1378     1379       +1     
==========================================
  Hits          832      832              
- Misses        512      513       +1     
  Partials       34       34              
Impacted Files Coverage Δ
bootstrap/handlers/httpserver.go 14.81% <0.00%> (-0.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1361f04...e354950. Read the comment docs.

bootstrap/handlers/httpserver.go Outdated Show resolved Hide resolved
@lenny-goodell lenny-goodell requested a review from cloudxxx8 July 20, 2022 22:51
bootstrap/handlers/httpserver.go Show resolved Hide resolved
bootstrap/handlers/httpserver.go Outdated Show resolved Hide resolved
bootstrap/bootstrap.go Show resolved Hide resolved
Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

Also add comment why not logging error

Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Copy link

@ajcasagrande ajcasagrande left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell lenny-goodell merged commit 816d4c9 into edgexfoundry:main Jul 21, 2022
@lenny-goodell lenny-goodell deleted the exit-code branch July 21, 2022 18:24
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.

Device Service Exits With Success If Port Bind Fails
4 participants