Skip to content

Fix error handling.#697

Merged
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
brendandburns:pf
Sep 17, 2019
Merged

Fix error handling.#697
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
brendandburns:pf

Conversation

@brendandburns
Copy link
Copy Markdown
Contributor

Fixes #686

cc @ceeaspb please see if this addresses your issue.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 10, 2019
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 10, 2019
@yue9944882
Copy link
Copy Markdown
Member

ci unhappy @brendandburns

@brendandburns
Copy link
Copy Markdown
Contributor Author

CI is fixed now, please take a look.

Thanks!

synchronized (ExecProcess.this) {
// Try for a pretty unique error code, so if someone searches they'll find this
// code.
statusCode = -1975219;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

https://tools.ietf.org/html/rfc6455#section-7.4

   3000-3999

      Status codes in the range 3000-3999 are reserved for use by
      libraries, frameworks, and applications.  These status codes are
      registered directly with IANA.  The interpretation of these codes
      is undefined by this protocol.

according to the RFC, negative status code doesn't seem recommended.. how about a unique number ranged in 3000-3999?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a proces status code, not an HTTP/WebSocket status code. I think a process status code can be whatever you want it to be (and negative numbers are definitely allowed.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh tricked.. yes it's exit code from remote process.

@yue9944882
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 10320ef into kubernetes-client:master Sep 17, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copyFileFromPod (and likely exec) does not propagate errors

3 participants