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

Unsupported method returns no error, may cause misleading success result in grpc call #328

Closed
chrisxuwq opened this issue Jan 26, 2021 · 1 comment
Assignees
Labels

Comments

@chrisxuwq
Copy link

core/engine/virt/virt.go

Lines 185 to 189 in c5f33e0

// VirtualizationCopyTo copies one.
func (v *Virt) VirtualizationCopyTo(ctx context.Context, ID, target string, content io.Reader, AllowOverwriteDirWithFile, CopyUIDGID bool) (err error) {
log.Warnf("VirtualizationCopyTo does not implement")
return
}

Just use eru-cli to call send cmd line and it shows result is successful, but actually it fails cuz this method did not implement.
Maybe return an error would be better to avoid misleading successful message?

@chrisxuwq
Copy link
Author

and also there's other not implemented methods for yavirt

@CMGS CMGS added the bug label Feb 17, 2021
CMGS pushed a commit that referenced this issue Aug 6, 2021
* 1.Fix issue 328 by returning error.
2.Remove named return for better code readability.
3.Rename variable name colliding with import name.

* 1.Add ErrFunctionNotImplemented to handle error.
2.Add space between // and comments

* Add comment for exported function.

Co-authored-by: Jiabao Gu <jiabao.gu@shopee.com>
@CMGS CMGS closed this as completed Aug 6, 2021
CMGS added a commit that referenced this issue Aug 16, 2021
CMGS added a commit that referenced this issue Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants