kubernetes-sigs / kubebuilder-declarative-pattern

A toolkit for building declarative operators with kubebuilder
Apache License 2.0
251 stars 84 forks source link

WIP: Add developer hints #378

Open justinsb opened 5 months ago

justinsb commented 5 months ago

WIP and distinct from #377 as I imagine we will want more discussion e.g. about testing / how to turn it off/on etc.

We've evolved a lot over time, and we could start nudging developers to use the now-recommended approaches and avoid the less-recommended approaches (without breaking compatability).

Introduce a "hints" package that enables us to output messages to developers to nudge them towards best practices.

(Builds on #377 as this is what made me think of this!)

k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/blob/master/OWNERS)~~ [justinsb] 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 commented 5 months ago

@justinsb: 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-declarative-test d5c69924df9c0a6282d77e62168cf65bd2eeafd0 link true /test pull-declarative-test

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](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).
k8s-ci-robot commented 5 months ago

PR needs rebase.

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.
k8s-triage-robot commented 2 months ago

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

This bot triages PRs according to the following rules:

You can:

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

/lifecycle stale

tomasaschan commented 1 month ago

@justinsb a less hacky way to accomplish this would be to build a linter that can emit recommendations when obsolete methods are used - or to find one that already supports deprecation workflows and start annotating (or whatever mechanism that uses) APIs that now have better alternatives to support that. Then any developer using something like golangci-lint gets the hints without having to introduce new workflows or runtime panics...

k8s-triage-robot commented 4 weeks ago

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

This bot triages PRs according to the following rules:

You can:

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

/lifecycle rotten