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

Impose length limit when concatenating revision history #77610

Merged
merged 2 commits into from
May 16, 2019

Conversation

tedyu
Copy link
Contributor

@tedyu tedyu commented May 8, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
As Paul reported, we should impose length limit when concatenating revisions.

Otherwise, we may see the following error:

I0502 01:39:20.871854       6 deployment_controller.go:485] Error syncing deployment yarn-crm/crm-qa-nm: ReplicaSet.apps "crm-qa-nm-7bf7b57dff" is invalid: metadata.annotations: Too long: must have at most 262144 characters

Which issue(s) this PR fixes:
Fixes #77387

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 8, 2019
@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 8, 2019
@tedyu
Copy link
Contributor Author

tedyu commented May 8, 2019

cc @janetkuo @yastij

@tedyu
Copy link
Contributor Author

tedyu commented May 10, 2019

ping @janetkuo for review

@yastij
Copy link
Member

yastij commented May 13, 2019

/assign @janetkuo

@yastij
Copy link
Member

yastij commented May 13, 2019

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 13, 2019
Copy link
Member

@mortent mortent left a comment

Choose a reason for hiding this comment

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

This mostly looks good to me. As far as I can tell, this addresses the issue with the length of the annotation growing without bounds. In the issue it was also suggested that we should only add to the revision history if the revision number actually changed (to avoid the 41,41,41... situation). We might want to address that too in this PR.

pkg/controller/deployment/sync.go Show resolved Hide resolved
@tedyu
Copy link
Contributor Author

tedyu commented May 13, 2019

@mortent
I modified the condition on line 264:

	if ok && oldRevisionInt < newRevisionInt {

if the above is not enough to prevent duplicate revisions to appear in revision history, please let me know what else needs to change.

Thanks

@mortent
Copy link
Member

mortent commented May 15, 2019

@tedyu When I'm looking at it now, I think you are right. It should be covered by your change.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2019
@tedyu
Copy link
Contributor Author

tedyu commented May 15, 2019

ping @janetkuo

@janetkuo
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: janetkuo, tedyu

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2019
@k8s-ci-robot k8s-ci-robot merged commit 23e54dc into kubernetes:master May 16, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
5 participants