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

[TEP0100] Default to minimal embedded-status #5934

Merged

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Jan 3, 2023

Changes

This commit changes the default of embedded-status to minimal status.

Prior to this PR, the DefaultEmbeddedStatus is full, the pipelineRun reconciler
will populate both taskruns and runs for pipelineRunStatus. With the change
to minimal, the reconciler populates childReferences instead.

fixes: #5833
part of: #4954

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

switch the default value of `embedded-status` to `minimal`
the `embedded-status` flag along with the `both` and `full` functionalities are deprecated, and will be removed in v0.45.

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesnt merit a release note. labels Jan 3, 2023
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Jan 3, 2023
@tekton-robot
Copy link
Collaborator

@JeromeJu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-tekton-pipeline-alpha-integration-tests
  • /test pull-tekton-pipeline-build-tests
  • /test pull-tekton-pipeline-integration-tests
  • /test tekton-pipeline-unit-tests

The following commands are available to trigger optional jobs:

  • /test pull-tekton-pipeline-go-coverage

Use /test all to run all jobs.

In response to this:

/test check-pr-has-kind-label

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/test-infra repository.

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2023
@JeromeJu JeromeJu changed the title [WIP] TEP100-Default to minimal embedded-status TEP100-Default to minimal embedded-status Jan 3, 2023
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 3, 2023
docs/pipelineruns.md Outdated Show resolved Hide resolved
config/config-feature-flags.yaml Outdated Show resolved Hide resolved
@lbernick lbernick added this to the Pipelines v0.44 milestone Jan 10, 2023
@lbernick
Copy link
Member

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2023
@lbernick
Copy link
Member

@JeromeJu the defaults will also need to be changed in https://github.com/tektoncd/pipeline/blob/main/pkg/apis/config/feature_flags.go

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels Jan 10, 2023
@XinruZhang
Copy link
Member

Agreed with @lbernick that you will need to update

DefaultEmbeddedStatus = FullEmbeddedStatus

I assume there could be some unit tests failures because of the default value switch.

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 for taking this on @JeromeJu!

You may also need to update feature_flags.go
https://github.com/tektoncd/pipeline/blob/main/pkg/apis/config/feature_flags.go#L79-L80

docs/install.md Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 12, 2023
@JeromeJu JeromeJu marked this pull request as draft January 12, 2023 15:47
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2023
@JeromeJu
Copy link
Member Author

JeromeJu commented Jan 12, 2023

This PR has not been updated because of the debugging at #5989 which blocks this PR.

Thanks to @XinruZhang for helping out! And thank you for the reviews @lbernick @jerop , will update this PR once #5989 is merged.

@JeromeJu JeromeJu force-pushed the tep100-migrate-pipelinerunstatus branch from 189a3b0 to 3472e7f Compare January 12, 2023 22:36
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 12, 2023
docs/pipelineruns.md Outdated Show resolved Hide resolved
- `both` - Populate `status.childReferences` as well as `status.taskRuns` and `status.runs`.
- `full` - Populating `status.taskRuns` and `status.runs`, without populating `status.childReferences`.

*Note that after the PipelineRunStatus migration as planned in [TEP-100](https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md),
Copy link
Member

Choose a reason for hiding this comment

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

NIT: PipelineRunStatus -> PipelineRunStatus

The link points to the whole TEP, perhaps it could point to a specific section? It's not clear to me what is meant by "PipelineRunStatus migration". I think the other values of the flag will be deprecated and eventually removed.

Now that the default is set to "minimal", shouldn't we deprecate the other values? They should be added to https://github.com/tektoncd/pipeline/blob/main/docs/deprecations.md and we could link to that document instead

Copy link
Member Author

@JeromeJu JeromeJu Jan 20, 2023

Choose a reason for hiding this comment

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

Thanks @afrittoli , done with the release note and NIT suggestion!

Copy link
Member Author

Choose a reason for hiding this comment

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

Now that the default is set to "minimal", shouldn't we deprecate the other values? They should be added to https://github.com/tektoncd/pipeline/blob/main/docs/deprecations.md and we could link to that document instead

Thanks @afrittoli , I was under the impression that status.taskruns and status.runs were added to https://github.com/tektoncd/pipeline/blob/main/docs/deprecations.md as in TEP100 to indiciate the removal process. I am willing to add this into the deprecation.md in this same PR and link to it if preferred. But from the api_compatibility_policy I might not fully getting the picture but it seems that feature-flags values are not subject to the deprecation.md?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, indeed status.taskruns and status.runs are in the deprecation list, which should be or else we could not remove them in the next release :)

About feature flags, in the TEP we said that we cannot remove flags associated to changes in behaviour - see https://github.com/tektoncd/community/blob/main/teps/0033-tekton-feature-gates.md#changes-in-behavior - but this change of behaviour is reflected into the API, so it doesn't make sense to keep the flag around once the API field it controls is deprecated and removed.

That said, we still should give notice to our users about upcoming changes, so we should include in the release notes and ideally in https://github.com/tektoncd/pipeline/blob/main/docs/deprecations.md too that this flag is deprecated, before we remove it in the next release.

Copy link
Member Author

@JeromeJu JeromeJu Jan 20, 2023

Choose a reason for hiding this comment

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

Thanks @afrittoli ! That makes sense, updated and linked in deprecation.md and the release note as well.

Copy link
Member

@afrittoli afrittoli 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 for this! It looks great, just a couple of comments.
The main question I have is that I think we should start the deprecation counter on the other flag values right away.

@afrittoli
Copy link
Member

afrittoli commented Jan 20, 2023

Looking at #4954, I think we should clearly state that the flag along with the both and full functionalities are deprecated, and will be removed in v0.45. It should be in the release notes as well!

@JeromeJu JeromeJu force-pushed the tep100-migrate-pipelinerunstatus branch from 7501be5 to ac5b60c Compare January 20, 2023 13:50
@JeromeJu
Copy link
Member Author

/retest

@JeromeJu JeromeJu requested review from jerop and afrittoli and removed request for abayer and jerop January 20, 2023 14:11
@JeromeJu JeromeJu force-pushed the tep100-migrate-pipelinerunstatus branch from 326af0c to ee97223 Compare January 20, 2023 14:51
This commit changes the default of embedded-status to minimal status.

Prior to this PR, the `DefaultEmbeddedStatus` is `full`, the pipelineRun reconciler
will populate both `taskruns` and `runs` for `pipelineRunStatus`. With the change
to `minimal`, the reconciler populates `childReferences` instead.
@JeromeJu JeromeJu force-pushed the tep100-migrate-pipelinerunstatus branch from ee97223 to b81b2bf Compare January 20, 2023 14:54
@JeromeJu
Copy link
Member Author

/retest

@JeromeJu JeromeJu requested review from abayer and removed request for afrittoli January 20, 2023 15:25
@abayer
Copy link
Contributor

abayer commented Jan 20, 2023

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2023
@JeromeJu JeromeJu requested review from jerop and afrittoli and removed request for abayer and jerop January 20, 2023 15:46
Copy link
Member

@afrittoli afrittoli 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!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2023
@tekton-robot tekton-robot merged commit ecbec59 into tektoncd:main Jan 20, 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/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch the default for "embedded-status" feature flag to "minimal" on or after Jan 25, 2023
7 participants