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

do not fatally exit from serve commands #1016

Conversation

joelanford
Copy link
Member

@joelanford joelanford commented Aug 24, 2022

Signed-off-by: Joe Lanford joe.lanford@gmail.com

Description of the change:

This commit ensures that we always cleanly return an error from the
serve function, thus ensuring that defered cleanups always happen.

Motivation for the change:

When we fatally exit directly in the serve functions, we do not give a
chance for the registered cleanup functions to run, resulting in
temporary files being left behind.

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

When we fatally exit directly in the serve functions, we do not give a
chance for the registered cleanup functions to run, resulting in
temporary files being left behind.

This commit ensures that we always cleanly return an error from the
serve function, thus ensuring that defered cleanups always happen.

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@openshift-ci openshift-ci bot requested review from exdx and grokspawn August 24, 2022 13:19
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2022
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #1016 (852667e) into master (166ed6b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1016   +/-   ##
=======================================
  Coverage   52.97%   52.97%           
=======================================
  Files         105      105           
  Lines        9606     9606           
=======================================
  Hits         5089     5089           
  Misses       3562     3562           
  Partials      955      955           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, joelanford

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dinhxuanvu,joelanford]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 215f413 into operator-framework:master Aug 24, 2022
@joelanford joelanford deleted the no-fatal-serve-exit branch August 24, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants