-
Notifications
You must be signed in to change notification settings - Fork 360
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
Support non-seekable stdin (-
arg) in "fs upload" command
#1672
Conversation
5633607
to
76c9589
Compare
Oh yeah, |
Codecov Report
@@ Coverage Diff @@
## master #1672 +/- ##
==========================================
- Coverage 39.40% 38.92% -0.49%
==========================================
Files 167 167
Lines 13611 13771 +160
==========================================
- Hits 5364 5360 -4
- Misses 7485 7645 +160
- Partials 762 766 +4
Continue to review full report at Codecov.
|
bef56df
to
e0db727
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + minor comments
cmd/lakectl/cmd/input.go
Outdated
func (d *deleteOnClose) Read(p []byte) (n int, err error) { | ||
return d.File.Read(p) | ||
} | ||
|
||
func (d *deleteOnClose) Seek(offset int64, whence int) (int64, error) { | ||
return d.File.Seek(offset, whence) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks!
cmd/lakectl/cmd/input.go
Outdated
|
||
func (d *deleteOnClose) Close() error { | ||
if err := os.Remove(d.Name()); err != nil { | ||
d.File.Close() // Close failure is unimportant on read, but data definitely stays! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't understand this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added "safe if close fails".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
PTAL (also fixed go fmt).
cmd/lakectl/cmd/input.go
Outdated
func (d *deleteOnClose) Read(p []byte) (n int, err error) { | ||
return d.File.Read(p) | ||
} | ||
|
||
func (d *deleteOnClose) Seek(offset int64, whence int) (int64, error) { | ||
return d.File.Seek(offset, whence) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks!
cmd/lakectl/cmd/input.go
Outdated
|
||
func (d *deleteOnClose) Close() error { | ||
if err := os.Remove(d.Name()); err != nil { | ||
d.File.Close() // Close failure is unimportant on read, but data definitely stays! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added "safe if close fails".
Actually pulling once tests passed -- nothing major to cancel approval. Thanks! |
95166e9
to
d5628e2
Compare
Parity with `aws s3 cp - ...` on this.
f1997e1
to
ba2a5b9
Compare
ba2a5b9
to
c3494f0
Compare
Thanks! Pulling once tests pass... |
Parity with
aws s3 cp - ...
on this.