Skip to content

ConfigExceptions aren't made visible #2219

Description

@merval

What is the feature and why do you need it:
When loading the kube config, if any ConfigException is thrown it's caught and simply printed as an error message. This prevents any action being taken by the user when the exception is thrown. It also doesn't halt the application, which causes cascading errors.

Describe the solution you'd like to see:
Very simple fix:

except Exception as e:
logging.error(str(e))

Should be:

except ConfigException as e:
    raise ConfigException(e)
except Exception as e:
    logging.error(str(e))

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature.
    on Apr 12, 2024
  2. roycaihw commented on Apr 24, 2024

    @roycaihw
    Member

    The behavior is specific to exec plugin and was introduced in kubernetes-client/python-base#75. Here is some context: kubernetes-client/python-base#75 (comment). The reason was to give a chance to other auth methods.

    @yliaog Do you have concerns with the proposal?

    If we change the behavior, we should document it in the release notes in case people are depending on the behavior.

  3. yliaog commented on Apr 24, 2024

    @yliaog
    Contributor

    I think the reason (give a chance to other auth methods) is still valid, what do you think @merval ?

  4. merval commented on Apr 24, 2024

    @merval
    Author

    Yeah, that seems valid. In my case the ConfigException is thrown because the token is expired. I wonder of there should be a mechanism to raise the ConfigException if all other authentication methods fail.

  5. k8s-triage-robot commented on Jul 23, 2024

    @k8s-triage-robot

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

    This bot triages un-triaged issues 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:

    • Mark this issue as fresh with /remove-lifecycle stale
    • Close this issue with /close
    • Offer to help out with Issue Triage

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

    /lifecycle stale

  6. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jul 23, 2024
  7. k8s-triage-robot commented on Aug 23, 2024

    @k8s-triage-robot

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

    This bot triages un-triaged issues 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:

    • Mark this issue as fresh with /remove-lifecycle rotten
    • Close this issue with /close
    • Offer to help out with Issue Triage

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

    /lifecycle rotten

  8. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Aug 23, 2024
  9. k8s-triage-robot commented on Sep 22, 2024

    @k8s-triage-robot

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

    This bot triages issues 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 with /reopen
    • Mark this issue as fresh with /remove-lifecycle rotten
    • Offer to help out with Issue Triage

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

    /close not-planned

  10. k8s-ci-robot commented on Sep 22, 2024

    @k8s-ci-robot
    Contributor

    @k8s-triage-robot: Closing this issue, marking it as "Not Planned".

    Details

    In response to this:

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

    This bot triages issues 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 with /reopen
    • Mark this issue as fresh with /remove-lifecycle rotten
    • Offer to help out with Issue Triage

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

    /close not-planned

    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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions