-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Default clientset_pkg and clientset_name variables #120877
Conversation
@@ -233,6 +233,9 @@ if grep -qw "lister" <<<"${GENS}"; then | |||
fi | |||
|
|||
if grep -qw "informer" <<<"${GENS}"; then | |||
CLIENTSET_PKG="${CLIENTSET_PKG_NAME:-clientset}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines exist above but maybe were not triggered. Can we do this instead:
diff --git a/staging/src/k8s.io/code-generator/generate-internal-groups.sh b/staging/src/k8s.io/code-generator/generate-internal-groups.sh
index db1f93f43ff..9676fac313b 100755
--- a/staging/src/k8s.io/code-generator/generate-internal-groups.sh
+++ b/staging/src/k8s.io/code-generator/generate-internal-groups.sh
@@ -120,6 +120,9 @@ for GVs in ${GROUPS_WITH_VERSIONS}; do
done
done
+CLIENTSET_PKG="${CLIENTSET_PKG_NAME:-clientset}"
+CLIENTSET_NAME="${CLIENTSET_NAME_VERSIONED:-versioned}"
+
if grep -qw "deepcopy" <<<"${GENS}"; then
# Nuke existing files
for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do
@@ -187,9 +190,6 @@ if grep -qw "applyconfiguration" <<<"${GENS}"; then
fi
if grep -qw "client" <<<"${GENS}"; then
- CLIENTSET_PKG="${CLIENTSET_PKG_NAME:-clientset}"
- CLIENTSET_NAME="${CLIENTSET_NAME_VERSIONED:-versioned}"
-
# Nuke existing files
root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/${CLIENTSET_PKG}/${CLIENTSET_NAME}" 2>/dev/null || true)"
if [ -n "${root}" ]; then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines exist above but maybe were not triggered. Can we do this instead:
Correct, but those are only invoked when generating client, if you invoke informer separately from client it won't.
Also, that was the other option I was considering - updated.
86dee3d
to
9b32d2f
Compare
/triage accepted |
/test unit |
@soltysh: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks! /lgtm |
LGTM label has been added. Git tree hash: c51b34ff238a5d01c528463fc44bb0510cac7ec3
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: soltysh, thockin 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 |
/kind bug
/kind regression
What this PR does / why we need it:
Looks like during refactoring in #117262 something was missed.
Now when I use the deprecated script I'm getting:
This PR adds the missing defaulting where it should be.
Special notes for your reviewer:
/assign @thockin @liggitt
Does this PR introduce a user-facing change?