Skip to content
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

Fix api-gen-docs dependencies #5507

Merged
merged 1 commit into from
Jul 29, 2018
Merged

Conversation

mikesplain
Copy link
Contributor

Currently it looks like api-gen-docs on a clean system doesn't grab all the required components:

docker run -it -v $(pwd):/go/src/k8s.io/kops -w /go/src/k8s.io/kops golang make gen-api-docs

# Follow procedure in docs/apireference/README.md
hack/make-gendocs.sh
# Update the `pkg/openapi/openapi_generated.go`
/go/bin/apiserver-boot build generated --generator openapi --copyright hack/boilerplate/boilerplate.go.txt
make: /go/bin/apiserver-boot: Command not found
Makefile:347: recipe for target 'gen-api-docs' failed
make: *** [gen-api-docs] Error 127

This pr should at least fix that issue and allow us to focus on this error (#5387) more easily.

docker run -it -v $(pwd):/go/src/k8s.io/kops -w /go/src/k8s.io/kops golang make gen-api-docs                                                                                                                                                                                                                                                                     system
# Follow procedure in docs/apireference/README.md
hack/make-gendocs.sh
# Update the `pkg/openapi/openapi_generated.go`
/go/bin/apiserver-boot build generated --generator openapi --copyright hack/boilerplate/boilerplate.go.txt
/go/bin/openapi-gen --input-dirs k8s.io/kops/pkg/apis/kops/v1alpha1 --input-dirs k8s.io/kops/pkg/apis/kops/v1alpha2 --input-dirs k8s.io/kops/pkg/apis/kops -o /go/src --go-header-file hack/boilerplate/boilerplate.go.txt -i k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/util/intstr,k8s.io/api/admission/v1beta1,k8s.io/api/admissionregistration/v1alpha1,k8s.io/api/admissionregistration/v1beta1,k8s.io/api/apps/v1,k8s.io/api/apps/v1beta1,k8s.io/api/apps/v1beta2,k8s.io/api/authentication/v1,k8s.io/api/authentication/v1beta1,k8s.io/api/authorization/v1,k8s.io/api/authorization/v1beta1,k8s.io/api/autoscaling/v1,k8s.io/api/autoscaling/v2beta1,k8s.io/api/batch/v1,k8s.io/api/batch/v1beta1,k8s.io/api/batch/v2alpha1,k8s.io/api/certificates/v1beta1,k8s.io/api/core/v1,k8s.io/api/events/v1beta1,k8s.io/api/extensions/v1beta1,k8s.io/api/imagepolicy/v1alpha1,k8s.io/api/networking/v1,k8s.io/api/policy/v1beta1,k8s.io/api/rbac/v1,k8s.io/api/rbac/v1alpha1,k8s.io/api/rbac/v1beta1,k8s.io/api/scheduling/v1alpha1,k8s.io/api/settings/v1alpha1,k8s.io/api/storage/v1,k8s.io/api/storage/v1alpha1,k8s.io/api/storage/v1beta1,k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1,k8s.io/api/core/v1 --output-package k8s.io/kops/pkg/openapi
go install k8s.io/kops/cmd/kops-server
/go/bin/apiserver-boot build docs --disable-delegated-auth=false --output-dir docs/apireference --server kops-server
2018/07/24 17:37:43 kops-server --etcd-servers=http://localhost:2379 --secure-port=9443 --print-openapi
W0724 17:37:44.538096    5603 authorization.go:34] Authorization is disabled
W0724 17:37:44.538196    5603 authentication.go:55] Authentication is disabled
E0724 17:37:44.541138    5603 cacher.go:271] unexpected ListAndWatch error: storage/cacher.go:/kops/instancegroups: Failed to list *kops.InstanceGroup: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:2379: connect: connection refused
E0724 17:37:44.541160    5603 cacher.go:271] unexpected ListAndWatch error: storage/cacher.go:/kops/clusters: Failed to list *kops.Cluster: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:2379: connect: connection refused
W0724 17:37:44.541677    5603 genericapiserver.go:342] Skipping API kops/v1alpha1 because it has no resources.
2018/07/24 17:37:44 /go/bin/gen-apidocs --build-operations=false --use-tags=true --allow-errors --config-dir=docs/apireference
Could not load json file docs/apireference/openapi-spec/swagger.json as api-spec: json: cannot unmarshal array into Go struct field SwaggerProps.paths of type map[string]json.RawMessage
2018/07/24 17:37:44 error: exit status 1
Makefile:347: recipe for target 'gen-api-docs' failed
make: *** [gen-api-docs] Error 1

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 24, 2018
@chrisz100
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 29, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisz100, mikesplain

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit ed74085 into kubernetes:master Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants