kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
154 stars 77 forks source link

Bug: poller status message replaces apply failure message in table printer #518

Open karlkfi opened 2 years ago

karlkfi commented 2 years ago

When applying an invalid Service (missing ports) I realized that the kpt live apply --output table output was showing me Resource not found instead of the apply error The Service "cassandra" is invalid: spec.ports: Required value which you get from kubectl apply.

I assume this means the status event for NotFound was received after the apply event error and the table replaced the error with the status message. This seems like confusing behavior. The user probably wants to see the apply error and not any sort of status update from waiting (which was hopefully skipped for that object).

apiVersion: v1
kind: Service
metadata:
  name: cassandra
  namespace: cassandra
spec:
  selector:
    app: cassandra
#  ports:
#  - port: 80
karlkfi commented 2 years ago

another example is trying to update an immutable field:

for: "gke-east/cluster/cluster.yaml": admission webhook "deny-immutable-field-updates.cnrm.cloud.google.com" denied the request: cannot make changes to immutable field(s): [authenticatorGroupsConfig.securityGroup]

The kpt table output shows the existing status condition updated failure instead of the newer apply failure.

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/cli-utils/issues/518#issuecomment-1193029959): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ 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.
karlkfi commented 2 years ago

/remove-lifecycle rotten

I believe this is still a problem with the new status watcher. The bug is in the table printer, which needs to avoid overwriting actuation errors with status updates.

karlkfi commented 2 years ago

/lifecycle frozen