Skip to content

Consider stabilizing the API and moving to v1 and beyond #2327

@nathanperkins

Description

@nathanperkins

tl;dr: I would like controller-runtime to consider whether the API is stable enough to lock in with V1, and any further changes would bump to V2 and beyond.

controller-runtime is a widely used module that is fundamental to a lot of projects worldwide. Our team alone maintains dozens of controller-runtime reconcilers and uses the client.Client almost exclusively. We have been so appreciative of this project for enabling us to create controllers with consistent patterns across many use cases.

We have run into problems in the past (and seemingly future) where breaking changes to API (mostly function signatures) have made the upgrade story difficult.

One recent example is when context.Context was added to the signature of MapFunc. And there are proposals to add error to MapFunc as well (edit: that would add a new option, so not breaking).

These changes are huge improvements to issues we have had using MapFuncs. But, they have an unfortunate side effect of breaking upgrades. When we are importing modules which use the old controller-runtime with the old func signature, it is impossible for us to upgrade until our dependencies upgrade as well.

Some of our project are well-behind on controller-runtime upgrades simply because the tangled dependency upgrade story makes it too difficult.

Golang provides the V2+ module mechanism that allows for making breaking API changes as major version bumps and allowing downstream projects to control their upgrade story. Locking in the current API to v1 and making changes in v2+ would be of great benefit to downstream customers.

The main benefit is providing a smoother upgrade to downstream projects when the API changes. Another benefit is that it opens up the project to make breaking changes in a manageable way. So in a way, it would actually enable the project to make API changes that have been left behind because of upgrade scares.

BTW, I don't think the API necessarily needs to be 100% stable to start using v1+. It's perfectly fine to bump major versions relatively frequently and there's no requirement to backport fixes to old major versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.kind/supportCategorizes issue or PR as a support question.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