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 an issue with verify_client.sh #805

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

figo
Copy link
Contributor

@figo figo commented Mar 5, 2019

no need to copy files back from tmp folder.
also CI will call make clientset, so we need to
run make gazelle on clientset target.

What this PR does / why we need it:
run script/ci-test.sh failed, the current ci reporting pass only because
bazel is not available at CI image, bazel been skipped, fix is opened at kubernetes/test-infra#11642,

N/A

cc @vincepri @detiber

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 5, 2019
@k8s-ci-robot k8s-ci-robot requested review from krousey and vincepri March 5, 2019 23:02
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 5, 2019
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 5, 2019
@@ -101,6 +100,7 @@ clientset: ## Generate a typed clientset
--listers-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
--output-package sigs.k8s.io/cluster-api/pkg/client/informers_generated \
--go-header-file=./hack/boilerplate.go.txt
$(MAKE) gazelle
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep this with generate? Bazel files might need to be updated after go generate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, we need it at both places to make Makefile target idempotent, the ci script verify_clientset.sh call make clientset, i will update the PR, thanks

Copy link
Member

Choose a reason for hiding this comment

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

I was seeing issues with calling gazelle at the end of clientset where it was generating the wrong paths in the bazel build files, which was the reason for moving it to the generate target.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@detiber i replied in another code line thread, thanks

no need to copy files back from tmp folder.
also CI will call make clientset, so we need to
run make gazelle on clientset target.

echo "diffing ${DIFFROOT} against freshly generated codegen"
ret=0
diff -Naupr "${DIFFROOT}" "${TMP_DIFFROOT}" -x '*.bazel' -x 'BUILD' || ret=$?
cp -a "${TMP_DIFFROOT}"/* "${DIFFROOT}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@detiber i think this is line that causing issue you are seeing (correct me if not the same issue),
make gazelle will generate bazel under the _tmp, then it copy files from _tmp to main repo,
then main repo got the bazel files which point to _tmp which is wrong.

what i found is: we don't need to copy those clientset files from _tmp to main repo.
(i guess originally been done this way because: make gazelle is not called after clientset been generated, but thats only my guess)

@detiber
Copy link
Member

detiber commented Mar 6, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2019
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: figo, vincepri

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2019
@k8s-ci-robot k8s-ci-robot merged commit ff71371 into kubernetes-sigs:master Mar 6, 2019
@vincepri vincepri added this to the v1alpha1 milestone Mar 21, 2019
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants