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

Have Activator key off of Active not Ready. #2395

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Nov 2, 2018

This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where Active=False does not trigger Ready=False because requests to the activator would incorrectly see an IsReady() Revision and incorrectly forward traffic.

Peripherally related to: #2394

/assign @tcnghia

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 2, 2018
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.

@mattmoor: 0 warnings.

In response to this:

This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where Active=False does not trigger Ready=False because requests to the activator would incorrectly see an IsReady() Revision and incorrectly forward traffic.

Peripherally related to: #2394

/assign @tcnghia

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.

@@ -79,7 +79,7 @@ func (r *revisionActivator) activateRevision(namespace, name string) (*v1alpha1.
r.reporter.ReportRequest(namespace, serviceName, configurationName, name, 1.0)

// Wait for the revision to be ready
if !revision.Status.IsReady() {
if revision.Status.IsActivationRequired() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please update the comment above, similar to what you have in the PR description?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -93,13 +93,13 @@ func (r *revisionActivator) activateRevision(namespace, name string) (*v1alpha1.
select {
case <-time.After(r.readyTimout):
// last chance to check
if revision.Status.IsReady() {
if !revision.Status.IsActivationRequired() {
break RevisionReady
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change RevisionReady to RevisionCanServe, or something similar?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@mattmoor mattmoor force-pushed the is-activation-required branch from 7f5e443 to fe8ba24 Compare November 2, 2018 21:26
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 2, 2018
This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision.  In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where `Active=False` does not trigger `Ready=False` because requests to the activator would incorrectly see an `IsReady()` Revision and incorrectly forward traffic.

Peripherally related to: knative#2394
@mattmoor mattmoor force-pushed the is-activation-required branch from fe8ba24 to b4b049d Compare November 2, 2018 21:34
@tcnghia
Copy link
Contributor

tcnghia commented Nov 2, 2018

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2018
@knative-prow-robot knative-prow-robot merged commit cdb319d into knative:master Nov 2, 2018
@mattmoor mattmoor deleted the is-activation-required branch November 2, 2018 22: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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants