registry-ui icon indicating copy to clipboard operation
registry-ui copied to clipboard

[Bug] Image and layer size is empty

Open loispostula opened this issue 5 years ago • 2 comments

I have the case where the docker registry tells that each layer has a size of 0. This prevents the tag_info template from behind rendered. I can overcome the issue by changing the template to test if there is a size, but it seems to me that this is a bigger problem. As the layer do have a non-0 size

loispostula avatar May 07 '19 08:05 loispostula

Thanks for reporting this! Any error in the logs when viewing such image? Also do you know how to reproduce this, i.e. make it so that you end up with layer of 0b?

roman-vynar avatar May 07 '19 08:05 roman-vynar

Nothing of value really:

2019-05-07 09:08:49	echo: http: panic serving 127.0.0.1:34718: Error rendering template tag_info.html: reflect: call of reflect.Value.Type on zero Value
2019-05-07 09:08:49	2019-05-07 07:08:49 - registry.client - INFO - GET /v2/software/ftp-stadler-ftp/manifests/latest 200 OK
2019-05-07 09:08:49	2019-05-07 07:08:49 - registry.client - INFO - GET /v2/software/ftp-stadler-ftp/manifests/latest 200 OK
2019-05-07 09:08:49	/usr/local/go/src/net/http/server.go:2851 +0x2f5
2019-05-07 09:08:49	created by net/http.(*Server).Serve
2019-05-07 09:08:49	/usr/local/go/src/net/http/server.go:1847 +0x646
2019-05-07 09:08:49	net/http.(*conn).serve(0xc0002ba000, 0xac0fe0, 0xc000596080)
2019-05-07 09:08:49	/usr/local/go/src/net/http/server.go:2741 +0xab
2019-05-07 09:08:49	net/http.serverHandler.ServeHTTP(0xc0001e6410, 0xac08e0, 0xc00016e000, 0xc00018c500)
2019-05-07 09:08:49	/opt/pkg/mod/github.com/labstack/[email protected]+incompatible/echo.go:593 +0x220
2019-05-07 09:08:49	github.com/labstack/echo.(*Echo).ServeHTTP(0xc000290380, 0xac08e0, 0xc00016e000, 0xc00018c500)
2019-05-07 09:08:49	/opt/pkg/mod/github.com/labstack/[email protected]+incompatible/echo.go:490 +0x8a
2019-05-07 09:08:49	github.com/labstack/echo.(*Echo).Add.func1(0xacaca0, 0xc0005c2000, 0x3, 0xc0000298f4)
2019-05-07 09:08:49	/opt/src/github.com/quiq/docker-registry-ui/main.go:146 +0x3e
2019-05-07 09:08:49	main.(*apiClient).viewTagInfo-fm(0xacaca0, 0xc0005c2000, 0xc00028caf0, 0xc0000298fe)
2019-05-07 09:08:49	/opt/src/github.com/quiq/docker-registry-ui/main.go:255 +0x11f1
2019-05-07 09:08:49	main.(*apiClient).viewTagInfo(0xc00018c000, 0xacaca0, 0xc0005c2000, 0xc0004ac270, 0xc00028ca10)
2019-05-07 09:08:49	/opt/pkg/mod/github.com/labstack/[email protected]+incompatible/context.go:389 +0xc9
2019-05-07 09:08:49	github.com/labstack/echo.(*context).Render(0xc0005c2000, 0xc8, 0xa2c09f, 0xd, 0x9c2a00, 0xc0002dd920, 0x5d2, 0xc00037dad3)
2019-05-07 09:08:49	/opt/src/github.com/quiq/docker-registry-ui/template.go:32 +0x25e
2019-05-07 09:08:49	main.(*Template).Render(0xc0001f4090, 0xabc4c0, 0xc000158460, 0xa2c09f, 0xd, 0x9c2a00, 0xc0002dd920, 0xacaca0, 0xc0005c2000, 0xc0000cdc80, ...)
2019-05-07 09:08:49	/usr/local/go/src/runtime/panic.go:513 +0x1b9
2019-05-07 09:08:49	panic(0x9973c0, 0xc000251b70)
2019-05-07 09:08:49	/usr/local/go/src/net/http/server.go:1746 +0xd0
2019-05-07 09:08:49	net/http.(*conn).serve.func1(0xc0002ba000)
2019-05-07 09:08:49	goroutine 2531 [running]:

And here is a "fix" but this doesn't seem to correct the real issues: https://github.com/loispostula/docker-registry-ui/commit/29989a8f408729c6879684f25bfd3c0974e3141c

loispostula avatar May 07 '19 08:05 loispostula

We have made a full rewrite.

roman-vynar avatar Apr 16 '24 11:04 roman-vynar