Repository navigation
Unit test for golang gzip backward compatibility - #136
Conversation
| require.NoError(t, err, "gzipWriterTest_") | ||
| //defer os.Remove(output.Name()) | ||
|
|
||
| zip := gzip.NewWriter(output) |
There was a problem hiding this comment.
zip.Close() should be called after this line with defer zip.Close()
There was a problem hiding this comment.
oh I see it's in a for loop, maybe we just need to use if/else instead of NoError stuff and close the writer on errors /cc @mtrmac
There was a problem hiding this comment.
@runcom Writer needs to be closed before I can read back results.
2bca753 to
340515a
Compare
| for _, test := range cases { | ||
| payload, err := ioutil.ReadFile(test.name) | ||
|
|
||
| output, err := ioutil.TempFile(os.TempDir(), "gzipWriterTest_") |
There was a problem hiding this comment.
Couldn’t this just use a bytes.Buffer or something? (Not blocking as such, and does not resolve the fundamental issues of course.)
Um, no? What depends on this beside signing? For signing,
Finally, if this test ever fails, what is our plan? |
|
On 25/10/16 07:15 -0700, Miloslav Trmač wrote:
This is not because the signing depends on it, but the stability of
|
|
On 25/10/16 07:14 -0700, Miloslav Trmač wrote:
+1 |
340515a to
b150ded
Compare
The signed content is by definition stable when it is copied around as the blobs that are stored in registries ( AFAICT, whatever we do, copying images around including the signatures and keeping the signatures valid requires users to change their workflow. So, why not point them to a workflow which will 1) by definition and construction always reliably work 2) do a much more efficient direct copy without extracting tarballs and making temporary copies all over |
|
tests busted with golang 1.6 (#137) figuring out how to fix them other than just refusing golang 1.6 and working with 1.7 from now on. |
|
Why not just work with golang 1.7 and be done with it. |
|
I will be fine with that I guess, @mtrmac ? |
|
If this works for relevant downstreams, sure, why not. I like new toys 😁 |
|
@jwhonce Please rebase, I'll merge afterward |
Signing and several other new features depend on golang's gzip returning consistent results, this test is designed to fail if golang should change its implementation https://trello.com/c/xSzKLN6O Signed-off-by: Jhon Honce <[email protected]>
b150ded to
08037d5
Compare
|
Hum, with F24, golang-1.6.3-3.fc24.x86_64 , gzip-1.6-10.fc24.x86_64 : Now what? (This makes my development work noticeably harder.) |
|
@mtrmac I will look into what is different here. |
|
A week later… I have taken a quick look, and based on https://go.googlesource.com/go/+log/master/src/compress I’m fairly sure we don’t have anyone available to commit to maintaining a viable fork of the upstream compression implementation. So, proposing #157 . |
cmd: skopeo: fix version
Signing and several other new features depend on golang's gzip returning
consistent results, this test is designed to fail if golang should
change its implementation
https://trello.com/c/xSzKLN6O
Signed-off-by: Jhon Honce [email protected]