Open razzeee opened 3 years ago
Maybe related to golang update from 1.13 to 1.16 from this commit (https://github.com/docker/cli/commit/a477a727fccdcd392ad495076b99c359af8f8d18)
Because of this text/template change in golang 1.14: https://golang.org/doc/go1.14#text/template
Steps to reproduce the issue:
Output of 20.10.7: Timescale https://www.timescale.com Output of 20.10.8: Template parsing error: template: :1:3: executing "" at <(index .Config.Labels "maintainer") (0)>: can't give argument to non-function index .Config.Labels "maintainer"
Go Template has to be modified to:
docker inspect --format='{{if (index .Config.Labels \"maintainer\")}}{{index .Config.Labels \"maintainer\"}}{{else}}0{{end}}' timescale/timescaledb:latest-pg12
@thaJeztah @razzeee PTL
Thanks for the ping; yes this looks indeed caused by that change in Golang.
Go mentions:
As always, there are various minor changes and updates to the library, made with the Go 1 promise of compatibility in mind.
But that compatibility is limited;
Compatibility is at the source level. Binary compatibility for compiled packages is not guaranteed between releases.
And they document it as a bugfix, which probably is considered an additional exception;
The erroneous case never worked as expected, and will now be reported with an error can't give argument to non-function.
Not sure there's much we can do 🤔
Description Running 20.10.8 we're getting errors with our template parsing.
Steps to reproduce the issue:
docker run --detach --network="$NETWORK_NAME" $(echo --env LOG_LEVEL=$(docker inspect --format='{{((index .Config.Labels "loglevel") 0)}}' $IMAGE_NAME:$IMAGE_TAG_FEATURE))
Describe the results you received:
Describe the results you expected: It should parse without an error, as it does with version 20.10.7 - a breaking change with a bugfix version is surprising.
Additional environment details (AWS, VirtualBox, physical, etc.): Virtual runner controlled via gitlab