-
Notifications
You must be signed in to change notification settings - Fork 136
Moving cluster logic into it's own object #649
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chasain The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @chasain. Thanks for your PR. I'm waiting for a bazelbuild member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Hi @chasain any thoughts on how you might unit test this new behavior? |
There also is no way to e2e test with Bazel 4.0 (#639 (comment)). Not sure if that'd impact anything here. |
Looks like this is the tracker for that: GoogleCloudPlatform/container-definitions#12037 |
(does reopening cause buildkite to retry? looks like no) |
/ok-to-test |
The e2e tests provide a good signal again, will you push a commit which addresses the |
Hey, was dealing with some personal stuff last week, I'll take a look at it this week. |
No problem, thanks for you patience with the e2e errors and for contributing to this repo! Will review it again once there's a new commit up. |
@@ -1 +1 @@ | |||
3.5.0 | |||
4.0.0 |
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.
We don't have 4.0.0
images yet on account of the fact that launcher.gcr.io/google/bazel
hasn't published any images since 3.5.0
- We'll either need to wait for that to get fixed (there's an open issue somewhere to publish them (which no one seems to be addressing)
- Or else change the Dockerfile to install both targeted versions of bazel using some other mechanism (aka building both from source)
rules_k8s/images/gcloud-bazel/Dockerfile
Line 19 in 32df719
FROM launcher.gcr.io/google/bazel:${OLD_VERSION} as old |
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.
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.
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.
The buildkite job just does bazelisk build //...
which is an important signal.
Actually using the outputs to talk to kubectl is handled by the pull-rules-k8s-e2e job which has an image with both 3.5.0 and 3.0.0, which can be chosen using .bazelversion
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.
Do you need to build and push a new image when I change that Dockerfile? I added what the job recommended but it looks like it's still the same image.
Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases
You can download the required version directly using this command:
(cd "/usr/local/lib/bazel/bin" && curl -fLO https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64 && chmod +x bazel-4.0.0-linux-x86_64)
|
@chasain: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
If your PR requires bazel 4.0 I'd suggest waiting until next week. I should
be able to push a new image then (it isn't an automatic process)
…On Tue, May 11, 2021, 12:29 Kubernetes Prow Robot ***@***.***> wrote:
@chasain <https://github.com/chasain>: The following test *failed*, say
/retest to rerun all failed tests:
Test name Commit Details Rerun command
pull-rules-k8s-e2e 40e4e2e
<40e4e2e>
link
<https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/bazelbuild_rules_k8s/649/pull-rules-k8s-e2e/1392200017061613568> /test
pull-rules-k8s-e2e
Full PR test history
<https://prow.k8s.io/pr-history?org=bazelbuild&repo=rules_k8s&pr=649>. Your
PR dashboard
<https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Achasain>.
Please help us cut down on flakes by linking to
<https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests>
an open issue
<https://github.com/bazelbuild/rules_k8s/issues?q=is:issue+is:open> when
you hit one in your PR.
Instructions for interacting with me using PR comments are available here
<https://git.k8s.io/community/contributors/guide/pull-requests.md>. If
you have questions or suggestions related to my behavior, please file an
issue against the kubernetes/test-infra
<https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:>
repository. I understand the commands that are listed here
<https://go.k8s.io/bot-commands>.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#649 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHFSNP426DUTQEIAP4WDALTNGAQ3ANCNFSM43CLV4VQ>
.
|
Any updates on 4.0? |
Has most of the work, but java tests aren't passing for mysterious reasons. Expect to solve this a week from now: #664 |
kind = kwargs.get("kind"), | ||
clusters = kwargs.get("clusters"), | ||
user = kwargs.get("user"), | ||
namespace = kwargs.get("namespace"), |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Would you like to try and rebase this PR or close it? |
I ended up moving to skaffold to manage this process in a much cleaner way, feel free to close this. |
This PR makes use of bazel 4.0 custom flags to define the target cluster it moves much of the logic from k8s_object regarding the target cluster into it's own rule (cluster) and makes use of an aspect to pull in information. Example usage would be:
k8s_default needs to have a clusters = //path/to/clusters:label added to work then the users bazelrc needs to be edited to include :
build --flag_alias=cluster=@io_bazel_rules_k8s//k8s:cluster_flag
Then the user can make use of the flag by calling
bazel run //path/to/k8s:object --cluster=minikube