Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Handle kubectl diff exit code when diffs are found #636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goodspark
Copy link
Contributor

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.

@google-cla
Copy link

google-cla bot commented Feb 12, 2021

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).

📝 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.

@k8s-ci-robot
Copy link

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.

@chases2
Copy link
Contributor

chases2 commented Feb 22, 2021

/ok-to-test

@goodspark
Copy link
Contributor Author

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
Copy link
Contributor Author

/retest

@goodspark
Copy link
Contributor Author

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?

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.
@k8s-ci-robot
Copy link

[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

@fejta
Copy link
Contributor

fejta commented Apr 30, 2021

/test all

@fejta
Copy link
Contributor

fejta commented May 1, 2021

Please fix tests

@glindstedt
Copy link

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?

@fejta
Copy link
Contributor

fejta commented Jun 10, 2022

/retest

2 similar comments
@fejta
Copy link
Contributor

fejta commented Jun 10, 2022

/retest

@fejta
Copy link
Contributor

fejta commented Jun 11, 2022

/retest

@k8s-ci-robot
Copy link

@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 7ef88ce 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.

@fejta
Copy link
Contributor

fejta commented Jun 15, 2022

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

@chases2 chases2 removed their assignment Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants