Skip to content

Dockerfile: update go-swagger to fix validation on Go1.16#42592

Merged
AkihiroSuda merged 1 commit intomoby:masterfrom
thaJeztah:update_swagger_fork
Jul 3, 2021
Merged

Dockerfile: update go-swagger to fix validation on Go1.16#42592
AkihiroSuda merged 1 commit intomoby:masterfrom
thaJeztah:update_swagger_fork

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jul 2, 2021

depends on kolyshkin/go-swagger#2
relates to #40353

temporarily using my fork to test this in CI

@thaJeztah thaJeztah added this to the 21.xx milestone Jul 2, 2021
@thaJeztah
Copy link
Member Author

Relates to #42583

@thaJeztah
Copy link
Member Author

LOL... erm, so, 🤷‍♂️

[2021-07-02T13:04:40.975Z] + docker run --rm -t --privileged -v /home/ubuntu/workspace/moby_PR-42592/bundles:/go/src/github.com/docker/docker/bundles -v /home/ubuntu/workspace/moby_PR-42592/.git:/go/src/github.com/docker/docker/.git --name docker-pr2 -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT=57d5dd22a6ca23f548697c546269beee371c9522 -e DOCKER_GRAPHDRIVER -e TEST_FORCE_VALIDATE -e VALIDATE_REPO=https://github.com/moby/moby.git -e VALIDATE_BRANCH=master docker:57d5dd22a6ca23f548697c546269beee371c9522 hack/validate/default
[2021-07-02T13:04:42.866Z] Congratulations!  Seccomp profile generation is done correctly.
[2021-07-02T13:04:42.866Z] Congratulations!  Packages in "./pkg/..." are safely isolated from internal code.
[2021-07-02T13:04:50.960Z] Congratulations!  The swagger spec at "api/swagger.yaml" is valid against swagger specification 2.0
script returned exit code 1

@thaJeztah
Copy link
Member Author

Ah! sigh.. long live suppressing all output, I guess

diff --git a/hack/validate/swagger-gen b/hack/validate/swagger-gen
index 0d000ea39b..f2bea7285e 100755
--- a/hack/validate/swagger-gen
+++ b/hack/validate/swagger-gen
@@ -8,7 +8,7 @@ files=($(validate_diff --diff-filter=ACMR --name-only -- 'api/types/' 'api/swagg
 unset IFS

 if [ -n "${TEST_FORCE_VALIDATE:-}" ] || [ ${#files[@]} -gt 0 ]; then
-       "${SCRIPTDIR}"/../generate-swagger-api.sh 2> /dev/null
+       "${SCRIPTDIR}"/../generate-swagger-api.sh
        # Let see if the working directory is clean
        diffs="$(git diff -- api/types/)"
        if [ "$diffs" ]; then
2021/07/02 16:34:18 trying to read config from /go/src/github.com/docker/docker/api/swagger-gen.yaml
2021/07/02 16:34:18 rendering 1 templates for model ErrorResponse
2021/07/02 16:34:18 name field ErrorResponse
2021/07/02 16:34:18 package field types
2021/07/02 16:34:18 creating "error_response.go" in "api/types" as definition
model: template: schematype:2:18: executing "schemaType" at <(len .AllOf) gt 0>: can't give argument to non-function len .AllOf

@thaJeztah thaJeztah force-pushed the update_swagger_fork branch from 57d5dd2 to e9992b5 Compare July 2, 2021 17:56
@thaJeztah thaJeztah force-pushed the update_swagger_fork branch from e9992b5 to 42d2048 Compare July 2, 2021 20:18
@thaJeztah thaJeztah marked this pull request as ready for review July 2, 2021 20:19
@thaJeztah
Copy link
Member Author

temporarily using my fork to test this in CI

^^ that's no longer true. Not editing the comment though, to prevent Jenkins form restarting the build (https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-42592/7/pipeline/333)

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (relevant stage in Jenkins appears to be passing)

@OladapoAjala
Copy link

@thaJeztah this seems to be solved right?

@thaJeztah
Copy link
Member Author

The issue only affected the Dockerfile we used in our CI, and this PR fixed it yes

@OladapoAjala
Copy link

Alright as my first contribution to Moby do you mind if I go through open issues that might have been solved and point you to them so you can close them.

I noticed a couple of issues that might have been solved but they are still open, this would give first timers a lot of headaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants