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

Reclaim the use of the revision label configurationGeneration #3204

Merged
merged 3 commits into from
Feb 14, 2019

Conversation

dprotaso
Copy link
Member

Addresses #643

  • in 0.3 the value of this label was the configuration's spec.generation.
  • now (0.4) the value of this label is set to the configuration's
    metadata.generation

We are not switching the latest created revision selection to key
off the configurationGeneration label key since there may be a
'race' while migration occurs

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2019
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 13, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@dprotaso: 0 warnings.

In response to this:

Addresses #643

  • in 0.3 the value of this label was the configuration's spec.generation.
  • now (0.4) the value of this label is set to the configuration's
    metadata.generation

We are not switching the latest created revision selection to key
off the configurationGeneration label key since there may be a
'race' while migration occurs

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.

@dprotaso
Copy link
Member Author

/test pull-knative-serving-integration-tests

Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

Cosmetic.

pkg/reconciler/v1alpha1/revision/revision.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/revision/revision.go Outdated Show resolved Hide resolved
@dprotaso
Copy link
Member Author

I0213 18:56:50.309] ERROR: (gcloud.beta.container.clusters.create) ResponseError: code=400, message=No valid versions with the prefix "1.11.7" found.

/test pull-knative-serving-upgrade-tests

- in 0.3 the value of this label was the configuration's `spec.generation`.
- now (0.4) the value of this label is set to the configuration's
  `metadata.generation`

We are not switching the latest created revision selection to key
off the `configurationGeneration` label key since there may be a
'race' while migration occurs
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2019
@dprotaso
Copy link
Member Author

dprotaso commented Feb 13, 2019

Made an issue for the flakey unit test - #3209
/test pull-knative-serving-unit-tests

@dprotaso
Copy link
Member Author

I notice the following:

Really old revisions may have a /configurationGeneration label and not a /configurationMetadataGeneration label.

This happens if they were created prior to 0.3. I'll add logic to 'drop' this label given it will probably confuse the user given the mismatch in value (ie. you'll see revisions with potentially the same label value)

I also see 0.2 added spec.generation as an annotation - those aren't updated so I'll 'remove' those as well.

annotations:
      serving.knative.dev/configurationGeneration: "3"

Depending on when the revision was created it could have the annotation
or label /configurationGeneration that pointed to a config's
spec.generation

This is now dropped
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2019
@dprotaso
Copy link
Member Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2019
@dprotaso
Copy link
Member Author

/assign @mattmoor

@@ -447,3 +455,43 @@ func (c *Reconciler) updateStatus(desired *v1alpha1.Revision) (*v1alpha1.Revisio
existing.Status = desired.Status
return c.ServingClientSet.ServingV1alpha1().Revisions(desired.Namespace).UpdateStatus(existing)
}

// TODO(643) Change this logic in 0.5 to only drop the deprecated label
// Delete this logic in 0.6
Copy link
Member Author

Choose a reason for hiding this comment

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

Can't wait for the day!

@mattmoor
Copy link
Member

Generally LGTM, but left a comment about better documenting the nuances of the migration code.

@mattmoor
Copy link
Member

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, mattmoor

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2019
@knative-prow-robot knative-prow-robot merged commit bb01c1e into knative:master Feb 14, 2019
@dprotaso dprotaso deleted the label-swap branch February 14, 2019 04:45
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. lgtm Indicates that a PR is ready to be merged. 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.

4 participants