rules_k8s icon indicating copy to clipboard operation
rules_k8s copied to clipboard

Handle kubectl diff exit code when diffs are found

Open goodspark opened this issue 4 years ago • 15 comments

kubectl diff exits with code 1 if a diff is found. Because of the exit flag, this causes the bazel kubectl diff action to exit early. So this attempts to handle that without losing general script-level exit code handling.

goodspark avatar Feb 12 '21 23:02 goodspark

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Feb 12 '21 23:02 google-cla[bot]

Hi @goodspark. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

k8s-ci-robot avatar Feb 12 '21 23:02 k8s-ci-robot

/ok-to-test

chases2 avatar Feb 22 '21 18:02 chases2

Hm. I'm not sure I the test failure is exactly related to this change: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/bazelbuild_rules_k8s/636/pull-rules-k8s-e2e/1363912632892919808#1:build-log.txt%3A33

++ FAIL: 1=bazel-bin/examples/hellogrpc/go/server/staging.create
$ /usr/bin/kubectl --kubeconfig= --cluster=gke_rules-k8s_us-central1-f_testing --context=gke_rules-k8s_us-central1-f_testing --user= --namespace=build-1363912632892919808 create -f -
error: unable to recognize "STDIN": no matches for kind "Deployment" in version "apps/v1beta1"

goodspark avatar Feb 22 '21 18:02 goodspark

/retest

goodspark avatar Feb 22 '21 21:02 goodspark

Yeah given the error is no matches for kind "Deployment" in version "apps/v1beta1", this makes me think the k8s cluster that's being used for testing was upgraded without appropriate updates to the test files in this repo. apps/v1beta1 was removed in k8s 1.18. Perhaps the testing k8s cluster was upgraded to this or above?

goodspark avatar Feb 25 '21 19:02 goodspark

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chases2, goodspark

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 avatar Apr 20 '21 21:04 k8s-ci-robot

/test all

fejta avatar Apr 30 '21 21:04 fejta

Please fix tests

fejta avatar May 01 '21 00:05 fejta

I've run into this and would be willing to take a stab at fixing the tests to get it merged, but it seems like the build history is gone. Any chance we could retrigger the tests and I can have a look?

glindstedt avatar Nov 01 '21 12:11 glindstedt

/retest

fejta avatar Jun 10 '22 19:06 fejta

/retest

fejta avatar Jun 10 '22 21:06 fejta

/retest

fejta avatar Jun 11 '22 03:06 fejta

@goodspark: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-rules-k8s-e2e 7ef88ce352256fea00ec49a2d0729b9ff3e0286e link true /test pull-rules-k8s-e2e

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.

k8s-ci-robot avatar Jun 11 '22 03:06 k8s-ci-robot

This seems to be failing tests, would you like to try and fix the tests or close out this PR?

fejta avatar Jun 15 '22 23:06 fejta