Skip to content

Update the API spec and overview to reflect ServingState intent. - #657

Merged
google-prow-robot merged 3 commits into
knative:masterfrom
mattmoor:serving-state
Apr 19, 2018
Merged

google-prow-robot merged 3 commits into
knative:masterfrom
mattmoor:serving-state

Conversation

@mattmoor

Copy link
Copy Markdown
Contributor

I've reworded the description of a Revision in the overview docs to capture some of the key lifecycle stages a revision may be in. I also found the existing wording confusing, since it talked about "history", which is more a property of configuration that is enabled by retirement, and I think the new wording better captures this.

I've updated the specification to include servingState, clarify where fields aren't available (pointing to issues), and tweak assorted cosmetic things (e.g. trailing whitespace).

Fixes: #644

I've reworded the description of a Revision in the overview docs to capture some of the key lifecycle stages a revision may be in.  I also found the existing wording confusing, since it talked about "history", which is more a property of configuration that is enabled by retirement, and I think the new wording better captures this.

I've updated the specification to include `servingState`, clarify where fields aren't available (pointing to issues), and tweak assorted cosmetic things (e.g. trailing whitespace).

Fixes: knative/serving#644
@mattmoor
mattmoor requested a review from a team April 13, 2018 23:54
@google-prow-robot google-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 13, 2018

@bobcatfish bobcatfish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice doc updates!

Comment thread docs/spec/overview.md Outdated
Revisions. Instead, the creation of immutable Revisions through a
Configuration provides:
The system will be configured to disallow users from creating or
changing Revisions. Instead, the creation of immutable Revisions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if this is not the current state of the system, maybe reference a related issue here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changing revisions (besides ServingState) is now disallowed by anything.

I've opened #664 and linked it in an (NYI) trailing creating.

Comment thread docs/spec/spec.md
readinessProbe: ... # Optional

# Name of the service account the code should run as.
serviceAccountName: ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Created #662 to cover serviceAccountName in the conformance tests.

Comment thread docs/spec/spec.md
# This may not be specified at creation (defaults to Active),
# and is used by the controllers and activator to enable
# scaling to/from 0.
servingState: Active | Reserve | Retired

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Created #663 to cover servingState in the conformance tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do we enforce not specified at creation?

Also, does this need to be in spec, or can this be inferred by the state of the system, and stored in status?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine to allow this being set at creation; the system will shortly update it to the correct state if there is a change to be made.

It might be more clear to say that any changes to this field made by the user will likely be overwritten by the system.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We've multiple extended discussions about whether this should be in spec or status on Slack. :)

The conclusion was that this should be in spec because of how the dependency graph works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tl;dr what we have today is insufficient

My longer thoughts (that try to minimally adapt this to something sufficient) are here. @grantr is also looking at variations on what we do that make use of the scale sub-resource, and more dramatically change this.

We are validating "not specified at creation" via pkg/webhook, and defaulting it to Active.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think these doc updates are fine as-is.

I'm interested in where @grantr 's proposal to change serving state will go: #669

@vaikas

vaikas commented Apr 16, 2018

Copy link
Copy Markdown
Contributor

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2018
@google-prow-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, vaikas-google

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [mattmoor,vaikas-google]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mattmoor

Copy link
Copy Markdown
Contributor Author

/hold

@google-prow-robot google-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2018
@google-prow-robot google-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2018
@mattmoor

Copy link
Copy Markdown
Contributor Author

/hold cancel

@google-prow-robot google-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2018
@mattmoor

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@mattmoor

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread docs/spec/spec.md Outdated
container: # core.v1.Container
container: # corev1.Container
# We disallow the following fields from corev1.Container:
# name, resources, prots, and volumeMounts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"ports"?

I suspect we'll want to block additional items, such as securityContext, stdin, tty, and possibly also parts of lifecycle (TBD).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the typo. I expect we'll revisit a number of pieces here as the runtime contract evolves and lands.

Comment thread docs/spec/spec.md
# This may not be specified at creation (defaults to Active),
# and is used by the controllers and activator to enable
# scaling to/from 0.
servingState: Active | Reserve | Retired

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do we enforce not specified at creation?

Also, does this need to be in spec, or can this be inferred by the state of the system, and stored in status?

Comment thread docs/spec/spec.md
# scaling to/from 0.
servingState: Active | Reserve | Retired

# NYI: https://github.com/elafros/elafros/issues/456

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a comment about what/why?

Some function or server frameworks or application code may be written to expect that each request will be granted a single-tenant process to run (i.e. that the request code is run single-threaded).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added.

@evankanderson

Copy link
Copy Markdown
Member

Not setting lgtm label until comments are in, to prevent robots from running amok.

@grantr grantr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @mattmoor!

Comment thread docs/spec/overview.md Outdated
The system will be configured to disallow users from creating
([NYI](https://github.com/elafros/elafros/issues/664)) or changing
Revisions. Instead, the creation of immutable Revisions through a
Configuration provides:

@grantr grantr Apr 16, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This sentence is a bit unclear. Is "the creation of immutable Revisions..." a proposal?

What do you think about adding a sentence that clearly states how revisions are created?

The system will be configured to disallow... changing Revisions. Instead, immutable Revisions
are created indirectly when a Configuration is created or updated. This provides:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't create a comment on line 71, but I find the (but doesn't mandate) clause a bit hard to follow. I suggest changing that bullet to

* PATCH semantics for revisions implemented server-side, minimizing...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. cc @evankanderson for new wording.

@mattmoor

Copy link
Copy Markdown
Contributor Author

Ping @josephburnett now that you are back :)

@josephburnett

Copy link
Copy Markdown
Contributor

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 19, 2018
@google-prow-robot
google-prow-robot merged commit d41af12 into knative:master Apr 19, 2018
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/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.

9 participants