Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation notes for developers. #6208

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

wlynch
Copy link
Member

@wlynch wlynch commented Feb 22, 2023

Changes

Add deprecation notes for developers.

These are not meant to be hard rules, but general tips / things to keep in mind for deprecations.

/kind documentation

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

These are not meant to be hard rules, but general tips / things to keep in mind for deprecations.
@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/documentation Categorizes issue or PR as related to documentation. labels Feb 22, 2023
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 22, 2023
@wlynch
Copy link
Member Author

wlynch commented Feb 22, 2023

/cc @lbernick

talk to older API servers.

A question to ask yourself is: "if I remove this field, can this client still
be used with the oldest supported LTS server?". If the answer is no, removing
Copy link
Member

@JeromeJu JeromeJu Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wlynch

Wondering if we shall suggest there to be a timeline that the earliest for those fields to be removed after defaulting the feature flag in one specific LTS as cycle out would probably mean 6 months?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this depends on how the field was deprecated.

Most conservative is wait until the last LTS where a user could downgrade cycles out (worst case 1 yr from release). At minimum I'd probably consider it a separate deprecation event from the feature flag removal.

There are probably things you could do to reduce this. For example for the embedded status deprecation - what made this more painful was that the field might not be there. If we guaranteed earlier that the childRefs would always be present (since it would have been an additive backwards compatible change) and scoped the deprecation around the opt-out flag we probably could have removed the feature flag and the API field at the same time since we could guarantee childrefs to always be present in older LTS versions.

Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! this is great

api_compatibility_policy.md Show resolved Hide resolved
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2023
@wlynch
Copy link
Member Author

wlynch commented Feb 22, 2023

/test pull-tekton-pipeline-beta-integration-tests

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @wlynch for clarifying the deprecation process!

I had clarifying questions, mainly wondering if the alpha compatibility policy should apply equally for opt-in and opt-out features (now that features will become opt-out earlier with more users using the feature by default)

Comment on lines +28 to +32
1. (inital state) Return field A
2. Introduce new field B with opt-in feature flag (disabled by default).
3. Set feature flag to return both A and B in responses by default.
4. Set feature flag to opt-in users by default and only return field B.
5. Remove feature flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to clarify, are all these steps within the 9 months deprecation period? just want to be clear that we won't double the deprecation time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no one right answer here - this is going to depend on what the change is, how the deprecation is done, and how disruptive it is.

You can make the argument that both the change in default behavior of a feature flag and the removal of a feature flag should be separate deprecation events. This is especially true for any deprecation that results in xor behavior.

I think there is room for shortcuts, so long as we have reasonable confidence that clients will be able to notice and adapt to changes - but I think how this can be done will differ on a case by case basis.

@jerop
Copy link
Member

jerop commented Feb 23, 2023

cc @tektoncd/core-maintainers

@wlynch
Copy link
Member Author

wlynch commented Feb 23, 2023

mainly wondering if the alpha compatibility policy should apply equally for opt-in and opt-out features

I think Kubernetes has a reasonable policy for this that we may be able to borrow - https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages

tl;dr

alpha features == opt in
beta features == opt out
GA features == no feature flag

@jerop
Copy link
Member

jerop commented Feb 24, 2023

alpha features == opt in
beta features == opt out
GA features == no feature flag

@wlynch I like that K8s policy, let's borrow it! What do other @tektoncd/core-maintainers think?

Also can we make this a tekton-wide policy (in tektoncd/community), instead of just for tektoncd/pipeline?

@wlynch
Copy link
Member Author

wlynch commented Feb 24, 2023

Also can we make this a tekton-wide policy (in tektoncd/community), instead of just for tektoncd/pipeline?

This is probably going to be a little tricky since I don't think there is a consistent definition of alpha/beta/GA across projects (which is by design - not every project wants to adopt the same deprecation policy as pipelines), but you're welcome to!

Let's lead by example here first - we can add to community later.

@jerop
Copy link
Member

jerop commented Feb 24, 2023

Thought that definitions of alpha/beta/GA in TEP-0033 applied across all projects, but sounds good to me to learn from adoption in this project first


See https://github.com/golang/go/wiki/Deprecated for more details.

3. Tombstone API fields before removal.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@wlynch
Copy link
Member Author

wlynch commented Mar 14, 2023

Anything blocking submission here?

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom, JeromeJu, lbernick

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

@lbernick
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2023
@tekton-robot tekton-robot merged commit 868b952 into tektoncd:main Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants