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

Fixes error in go_pkg() #84664

Merged
merged 1 commit into from Nov 2, 2019
Merged

Conversation

seans3
Copy link
Contributor

@seans3 seans3 commented Nov 1, 2019

  • Fixes error in go_pkg() python function (there is no maxsplit parameter to the string replace method).

How to reproduce:

$ bazel test //pkg/...

results in the following error:

ERROR: /usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl:44:30: Traceback (most recent call last):
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/pkg/generated/openapi/BUILD", line 6
		gen_openapi(<3 more arguments>)
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl", line 67, in gen_openapi
		go_genrule(<6 more arguments>)
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl", line 74, in go_genrule
		" ".join(<1 more arguments>)
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl", line 83, in " ".join
		",".join(<1 more arguments>)
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl", line 83, in ",".join
		go_pkg(pkg)
	File "/usr/local/google/home/seans/go/src/k8s.io/kubernetes/build/code_generation.bzl", line 44, in go_pkg
		pkg.replace("staging/src/", <2 more arguments>)
unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string'
ERROR: package contains errors: pkg/generated/openapi
ERROR: error loading package 'pkg/generated/openapi': Package 'pkg/generated/openapi' contains errors

The operative error message is:

unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string'

/kind bug
/priority important-soon

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 1, 2019
@BenTheElder
Copy link
Member

fixes #84044 (previous PR stuck in CLA woes)

@@ -59,7 +60,7 @@ def applies(pkg, prefixes, default):
return True
return False

def gen_openapi(outs, output_pkg, include_pkgs=[], exclude_pkgs=[]):
def gen_openapi(outs, output_pkg, include_pkgs = [], exclude_pkgs = []):
Copy link
Member

Choose a reason for hiding this comment

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

we'll see if CI (hack/update-bazel.sh) agrees with this change ;-)

@BenTheElder
Copy link
Member

/lgtm
/approve
thanks!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, seans3

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 Nov 1, 2019
@seans3
Copy link
Contributor Author

seans3 commented Nov 1, 2019

/retest

1 similar comment
@seans3
Copy link
Contributor Author

seans3 commented Nov 1, 2019

/retest

@seans3
Copy link
Contributor Author

seans3 commented Nov 1, 2019

/sig release

@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 1, 2019
@seans3
Copy link
Contributor Author

seans3 commented Nov 1, 2019

/cc @DirectXMan12

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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. 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.

None yet

3 participants