-
Notifications
You must be signed in to change notification settings - Fork 160
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: panic if daemon command is invalid #788
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Keming <kemingyang@tensorchord.ai>
we now used 3 error libs in envd, should we stick to one?
|
We should use github.com/cockroachdb/errors |
Ref #27 |
gaocegege
reviewed
Aug 17, 2022
gaocegege
previously approved these changes
Aug 17, 2022
Co-authored-by: Ce Gao <ce.gao@outlook.com> Signed-off-by: Keming <kemingy94@gmail.com>
Please replace it with github.com/cockroachdb/errors |
zwpaper
reviewed
Aug 17, 2022
Signed-off-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: Keming <kemingyang@tensorchord.ai>
There are still 28 ❯ rrg 'fmt.Errorf' -F -w -t go
pkg/remote/sshd/os.go:26: errNoShell = fmt.Errorf("failed to find any shell in the PATH")
pkg/ssh/ssh.go:216: return fmt.Errorf("request for pseudo terminal failed: %w", err)
pkg/ssh/ssh.go:221: return fmt.Errorf("unable to setup stdin for session: %w", err)
pkg/ssh/ssh.go:227: return fmt.Errorf("unable to setup stdout for session: %w", err)
pkg/ssh/ssh.go:238: return fmt.Errorf("unable to setup stderr for session: %w", err)
pkg/ssh/ssh.go:289: return nil, fmt.Errorf("decrypting PEM block failed %w", err)
pkg/ssh/ssh.go:301: return nil, fmt.Errorf("creating signer from encrypted key failed %w", err)
pkg/ssh/ssh.go:309: return nil, fmt.Errorf("parsing plain private key failed %w", err)
pkg/ssh/ssh.go:321: return nil, fmt.Errorf("Parsing PKCS private key failed %w", err)
pkg/ssh/ssh.go:328: return nil, fmt.Errorf("Parsing EC private key failed %w", err)
pkg/ssh/ssh.go:335: return nil, fmt.Errorf("Parsing DSA private key failed %w", err)
pkg/ssh/ssh.go:340: return nil, fmt.Errorf("Parsing private key failed, unsupported key type %q", block.Type)
pkg/docker/docker.go:111: return "", fmt.Errorf("invalid repository name (%s), cannot specify 64-byte hexadecimal strings, please rename it", s)
pkg/metrics/collector.go:30: ErrUnknownCollector := fmt.Errorf("unknown collector: %s", name)
pkg/metrics/collector.go:31: ErrUnknownHandle := fmt.Errorf("unknown handler: %s", name)
pkg/util/ziputil/unzip.go:105: return filenames, fmt.Errorf("%s: illegal file path", fpath)
pkg/lang/ir/util.go:46: return "", nil, fmt.Errorf("language %s is not supported", language)
pkg/ssh/config/ssh_config.go:239: return fmt.Errorf("failed to get info on %s: %w", p, err)
pkg/ssh/config/ssh_config.go:251: return fmt.Errorf("failed to create temporary config file: %w", err)
pkg/ssh/config/ssh_config.go:265: return fmt.Errorf("failed to set permissions to %s: %w", temp.Name(), err)
pkg/ssh/config/ssh_config.go:269: return fmt.Errorf("new config is not valid: %w", err)
pkg/ssh/config/ssh_config.go:273: return fmt.Errorf("failed to move %s to %s: %w", temp.Name(), p, err)
pkg/ssh/config/ssh_config.go:462: return 0, fmt.Errorf("development container not found")
pkg/ssh/config/ssh_config.go:467: return 0, fmt.Errorf("port not found")
pkg/ssh/config/ssh_config.go:472: return 0, fmt.Errorf("invalid port: %s", param.value())
pkg/ssh/config/ssh_config.go:526: return nil, fmt.Errorf("can't open %s: %w", path, err)
pkg/ssh/config/ssh_config.go:533: return nil, fmt.Errorf("fail to decode %s: %w", path, err)
pkg/ssh/config/ssh_config.go:541: return fmt.Errorf("fail to update SSH config file %s: %w", path, err) |
zwpaper
approved these changes
Aug 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Keming kemingyang@tensorchord.ai
The warning may not be noticed by users.
Let it panic so users know something wrong in the
envd
file.