-
Notifications
You must be signed in to change notification settings - Fork 49
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
Update (rewrite) eventing specs #25
Merged
+1,579
−1,948
Merged
Changes from 57 commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
99aea7b
Checkpoint work on eventing specs
e07658d
More work on data plane & control plane. Mostly need to finish contro…
70d7e8b
Add at-least-once detail on data plane.
dc743ca
Finish off most of lifecycle
8ef8f61
Update (rewrite) overview, motivation, and data plane
86f9c55
Update lifecycle to be a bit clearer and cover more fields
e90a3ad
Fill in detailed resources.
evankanderson 0d7b246
Document event delivery (Broker & Channel)
evankanderson 0a33307
Updates from n3wscott review
evankanderson 7e9b26b
Clean up no longer needed files.
evankanderson 4964fd7
Updates from n3wscott review
evankanderson 6216969
Update data-plane language per Ville's suggestions.
e776f36
Overview revisions based on vaikas feedback.
f4c3b09
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
8cffd9c
Merge branch 'main' of https://github.com/knative/specs into re-spect
5d0c5b4
Updates from comments in #25
b140c4d
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
17a9ae1
Address remaining Scott and Ville comments.
evankanderson 111c55b
Merge remote-tracking branch 'origin/re-spect' into re-spect
0a54751
Updates from #25 review.
2f1cbb0
Feedback from #25 and speling check
e3ef6ad
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
438f242
Merge branch 'main' of https://github.com/knative/specs into re-spect
b7d30e5
Update with matezw / slinkydeveloper feedback
83c531e
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
07fcbde
Update with matezw / slinkydeveloper feedback
bd9f695
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
917eac3
Updates from slinky, travis, ville, matzew
d9b1322
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
7bd0161
Link to upgrade header.
59784fb
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
fae7a87
Finish up TODOs, fix some typos.
99bb2e0
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
9e33332
Address a number of duglin comments
cb526ff
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
f69b8c8
Remove abandoned SVG images.
ea4f14c
Update overview with Doug's suggestions.
2c6aa43
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
1797c7e
Update with duglin suggestions.
a299f12
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
8c870de
Update with additional duglin review changes.
693cce6
One more set of edits.
218f965
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
41abb8c
Add control-plane header, internal type links to schemas.
55ee647
Address duglin and lionelvillard suggestions
22b85c9
Refactor error signalling to a common location
4af35db
Address duglin comments
evankanderson 22a8d56
Merge branch 're-spect-part-1' into re-spect
evankanderson 2479d26
Address Doug's comments
evankanderson 3a9519f
Address duglin feedback
68d499f
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
c584076
Merge remote-tracking branch 'origin/re-spect' into re-spect
6832976
Fix lowercase 'may'
9b97e59
Clarify 202 no-reply behavior.
bc872bd
Merge remote-tracking branch 'origin/re-spect-part-1' into re-spect
04439f5
Highlight that 202 responses MUST NOT be processed even if the status…
87c871a
Address duglin comments.
ba78f25
Normalize "Field Type" annotations for spec.
8aa07df
A few updates to clarify that the control-plane specification indicat…
7a678bd
Require that Subscriptions reference Channels in the same namespace.
fad55f5
Allow additional Destinaiton resolution mechanisms.
8333aa7
Fix two Doug nits.
bef17aa
Remove schema requirements.
ac54635
Align SHOULD NOT / MUST NOT
f5d15dc
Capitalize "MAY"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# Error Signalling | ||
|
||
<!-- copied from ../serving/knative-api-specification-1.0.md#error-signalling --> | ||
|
||
Knative APIs use the | ||
[Kubernetes Conditions convention](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) | ||
to communicate errors and problems to the user. Note that Knative customizes the | ||
general Kubernetes recommendation with a `severity` field, and does not include | ||
`lastHeartbeatTime` for scalability reasons. Each user-visible resource | ||
described in Resource Overview MUST have a `conditions` field in `status`, which | ||
MUST be a list of `Condition` objects described by the following table. | ||
|
||
Fields in the condition which are not marked as "REQUIRED" MAY be omitted to | ||
indicate the default value (i.e. a Condition which does not include a `status` | ||
field is equivalent to a `status` of `"Unknown"`). As `Conditions` are an output | ||
API, an implementation MAY never set these fields; the OpenAPI document MUST | ||
still describe these fields. The actual API object types in an OpenAPI document | ||
might be named `FooCondition` (for a `Foo` resource, for example) to allow | ||
better code generation and disambiguation between similar fields in the same | ||
`apiGroup`. | ||
|
||
<table> | ||
<tr> | ||
<td><strong>Field</strong> | ||
</td> | ||
<td><strong>Type</strong> | ||
</td> | ||
<td><strong>Description</strong> | ||
</td> | ||
<td><strong>Default Value If Unset</strong> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>type</code> | ||
</td> | ||
<td><code>string</code> | ||
</td> | ||
<td>The category of the condition, as a short, CamelCase word or phrase. | ||
<p> | ||
This is the primary key of the Conditions list when viewed as a map and MUST be | ||
unique across Conditions for a given resource. | ||
</td> | ||
<td>REQUIRED – No default | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>status</code> | ||
</td> | ||
<td>Enum:<ul> | ||
|
||
<li>"True" | ||
<li>"False" | ||
<li>"Unknown"</li></ul> | ||
|
||
</td> | ||
<td>The last measured status of this condition. | ||
</td> | ||
<td>"Unknown" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>reason</code> | ||
</td> | ||
<td>string | ||
</td> | ||
<td>One-word CamelCase reason for the condition's last transition. | ||
</td> | ||
<td>"" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>message</code> | ||
</td> | ||
<td>string | ||
</td> | ||
<td>Human-readable sentence describing the last transition. | ||
</td> | ||
<td>"" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>severity</code> | ||
</td> | ||
<td>Enum:<ul> | ||
|
||
<li>"" | ||
<li>"Warning" | ||
<li>"Info"</li></ul> | ||
|
||
</td> | ||
<td>If present, represents the severity of the condition. An empty severity represents a severity level of "Error". | ||
</td> | ||
<td>"" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>lastTransitionTime</code> | ||
</td> | ||
<td>Timestamp | ||
</td> | ||
<td>Last update time for this condition. | ||
</td> | ||
<td>(no timestamp specified) | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
Additionally, the resource's `status.conditions` field MUST be managed as | ||
follows to enable clients (particularly user interfaces) to present useful | ||
diagnostic and error message to the user. In the following section, conditions | ||
are referred to by their `type` (aka the string value of the `type` field on the | ||
Condition). | ||
|
||
1. Each resource MUST have a summary `Ready` condition (for ongoing systems) or | ||
`Succeeded` condition (for resources that run to completion) with | ||
`severity=""`, which MUST use the `"True"`, `"False"`, and `"Unknown"` | ||
status values as follows: | ||
|
||
1. `"False"` MUST indicate a failure condition. | ||
1. `"Unknown"` SHOULD indicate that reconciliation is not yet complete and | ||
success or failure is not yet determined. | ||
1. `"True"` SHOULD indicate that the resource is fully reconciled and | ||
operating correctly. | ||
|
||
`"Unknown"` and `"True"` are specified as SHOULD rather than MUST | ||
requirements because there might be errors which prevent functioning which | ||
cannot be determined by the API stack (e.g. DNS record configuration in | ||
certain environments). Implementations are expected to treat these as "MUST" | ||
for factors within the control of the implementation. | ||
|
||
1. For non-`Ready` conditions, any conditions with `severity=""` (aka "Error | ||
conditions") MUST be aggregated into the "Ready" condition as follows: | ||
|
||
1. If the condition is `"False"`, `Ready`'s status MUST be `"False"`. | ||
1. If the condition is `"Unknown"`, `Ready`'s status MUST be `"False"` or | ||
`"Unknown"`. | ||
1. If the condition is `"True"`, `Ready`'s status can be any of `"True"`, | ||
`"False"`, or `"Unknown"`. | ||
|
||
Implementations MAY choose to report that `Ready` is `"False"` or | ||
`"Unknown"` even if all Error conditions report a status of `"True"` (i.e. | ||
there might be additional hidden implementation conditions which feed into | ||
the `Ready` condition which are not reported.) | ||
|
||
1. Conditions with a `status` other than `"True"` SHOULD provide `message` and | ||
`reason` fields indicating the reason that the `status` is not `"True"`. | ||
Conditions where the `status` is `"False"` MUST provide a failure `reason` | ||
in the condition. (`"Unknown"` conditions might not have been reconciled, | ||
and so MAY have an empty `reason`.) | ||
|
||
Conditions type names SHOULD be chosen to describe positive conditions where | ||
`"True"` means that the condition has been satisfied. Some conditions MAY be | ||
transient (for example, `ResourcesAllocated` might change between `"True"` and | ||
`"False"` as an application scales to and from zero). It is RECOMMENDED that | ||
transient conditions be indicated with a `severity="Info"`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I read the sentence below:
it reads kind of like there MUST be a severity=Error even when everything is ok. What am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly what caused agony before and why we changed
"Error"
to be""
. This is saying that a working Broker should look like:You're conflating
status
(whether the condition is true) withseverity
(how bad is it for the condition to beFalse
).