-
Notifications
You must be signed in to change notification settings - Fork 445
feat: uniform layout and naming of hints, remarks, exceptions (#660) #860
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
Open
SmilyOrg
wants to merge
4
commits into
main
Choose a base branch
from
issue-660-uniform-admonitions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2a18fd0
feat: convert inline labels to AsciiDoc admonition blocks (#660)
SmilyOrg c6a67dc
style: fine-tune admonition icon label size and spacing
SmilyOrg 78bcf3e
Update chapters/http-requests.adoc
SmilyOrg a3e6681
Apply suggestions from code review
tfrauenstein 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ We strongly encourage using compatible API extensions and discourage versioning | |
| (<<107>>) and consumers (<<108>>) enable us (having Postel’s Law in mind) to | ||
| make compatible changes without versioning. | ||
|
|
||
| *Note:* There is a difference between incompatible and breaking changes. | ||
| NOTE: There is a difference between incompatible and breaking changes. | ||
| Incompatible changes are changes that are not covered by the compatibility | ||
| rules below. Breaking changes are incompatible changes deployed into operation, | ||
| and thereby breaking running API consumers. Usually, incompatible changes are | ||
|
|
@@ -30,7 +30,7 @@ situations it is possible to deploy incompatible changes in a non-breaking way, | |
| if no API consumer is using the affected API aspects (see also <<deprecation, | ||
| Deprecation>> guidelines). | ||
|
|
||
| *Hint:* Please note that the compatibility guarantees are for the "on the wire" | ||
| Please note that the compatibility guarantees are for the "on the wire" | ||
| format. Binary or source compatibility of code generated from an API specification | ||
| is not covered by these rules. If client implementations update their | ||
| generation process to a new version of the API specification, it has to be | ||
|
|
@@ -294,7 +294,7 @@ Media type versioning should... | |
| Vary: Content-Type | ||
| ---- | ||
|
|
||
| NOTE: Until an incompatible change is necessary, it is recommended to stay | ||
| Until an incompatible change is necessary, it is recommended to stay | ||
| with the standard `application/json` media type without versioning. | ||
|
|
||
| Further reading: | ||
|
|
@@ -367,8 +367,8 @@ delivery_method: | |
| See <<240>> about enum value naming conventions – these apply here too. | ||
|
|
||
|
|
||
| **Important**: | ||
|
|
||
| [IMPORTANT] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's revert this change for better readability. |
||
| ==== | ||
| * API consumers must be prepared for the fact that also other values can be returned | ||
| with server responses (or be contained in consumed events), and implement a | ||
| fallback / default behavior for unknown new values, see <<108>>. | ||
|
|
@@ -379,6 +379,7 @@ See <<240>> about enum value naming conventions – these apply here too. | |
| * The list should not be reduced for inputs (that would be an incompatible change). | ||
| * Before additional values are accepted or returned, API owners should update the API description and extend | ||
| the `examples` list, see <<107>>. | ||
| ==== | ||
|
|
||
| (Note that the last 3 bullet points do not apply for uses of `examples` _without_ the | ||
| "Extensible enum." prefix in the description – here any value fitting the rest | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -277,7 +277,7 @@ conform to the functional naming depending on the <<219, audience>> as follows: | |
| <version> ::= [Vv][0-9.]* -- major version of non compatible schemas | ||
| ---- | ||
|
|
||
| *Hint:* The following convention (e.g. used by legacy STUPS infrastructure) is deprecated | ||
| *Historic information*: The following convention (e.g. used by legacy STUPS infrastructure) is deprecated | ||
| and *only* allowed for <<223, internal>> event type names: | ||
|
|
||
| [source,bnf] | ||
|
|
@@ -287,7 +287,7 @@ and *only* allowed for <<223, internal>> event type names: | |
| <application-id> ::= [a-z][a-z0-9-]* -- application identifier | ||
| ---- | ||
|
|
||
| **Note:** consistent naming should be used whenever the same entity is exposed | ||
| NOTE: Consistent naming should be used whenever the same entity is exposed | ||
| by a data change event and a RESTful API. | ||
|
|
||
|
|
||
|
|
@@ -490,8 +490,8 @@ schema payload at the top-level of the document, with the | |
| information (the contents of <<event-metadata,metadata>> are | ||
| described further down in this section). | ||
|
|
||
| *Note:* | ||
|
|
||
| [NOTE] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's revert this change. |
||
| ==== | ||
| * The General Event was called a _Business Event_ in earlier versions of | ||
| the guidelines. Implementation experience has shown that the | ||
| category's structure gets used for other kinds of events, hence the name | ||
|
|
@@ -501,6 +501,7 @@ defining events that drive a business process. | |
| * The Nakadi broker still refers to the General Category as the Business | ||
| Category and uses the keyword `business` for event type registration. | ||
| Other than that, the JSON structures are identical. | ||
| ==== | ||
|
|
||
| See <<201>> for more guidance on how to use the category. | ||
|
|
||
|
|
@@ -673,11 +674,11 @@ the same `eid` value as the initial (possibly failed) attempt. | |
| The `eid` supports event consumers in detecting and being robust against | ||
| event duplicates -- see <<214>>. | ||
|
|
||
| *Hint:* Using the same eid for retries can be ensured, for instance, by | ||
| generating a UUID either (i) as part of the event object construction and | ||
| using some form of intermediate persistence, like an event publish retry | ||
| queue, or (ii) via a deterministic function that computes the UUID value | ||
| from the event fields as input (without random salt). | ||
| TIP: Using the same eid for retries can be ensured, for instance, by | ||
| generating a UUID either (i) as part of the event object construction and | ||
| using some form of intermediate persistence, like an event publish retry | ||
| queue, or (ii) via a deterministic function that computes the UUID value | ||
| from the event fields as input (without random salt). | ||
|
|
||
|
|
||
| [#201] | ||
|
|
@@ -725,7 +726,7 @@ event ordering the event type definition: | |
| * *should* specify the `ordering_instance_ids` property to define which | ||
| field(s) represents the business entity instance identifier. | ||
|
|
||
| *Note:* The `ordering_instance_ids` restrict the scope in which the | ||
| NOTE: The `ordering_instance_ids` restrict the scope in which the | ||
| `ordering_key_fields` provide the strict order. If undefined, the ordering is | ||
| assumed to be provided in scope of all events. | ||
|
|
||
|
|
@@ -736,13 +737,13 @@ The business ordering information can be provided – among other ways – by ma | |
| * a strictly monotonically increasing sequence counter (maintained per partition | ||
| or event type). | ||
|
|
||
| *Hint:* timestamps are often a bad choice, since in distributed systems events | ||
| TIP: Timestamps are often a bad choice, since in distributed systems events | ||
| may occur at the same time, or clocks are not exactly synchronized, or | ||
| jump forward and backward to compensate drifts or leap-seconds. If you use anyway | ||
| timestamps to indicate event ordering, you _must_ carefully ensure that the designated | ||
| event order is not messed up by these effects and use UTC time zone format. | ||
|
|
||
| *Note:* The `received_at` and `partition_offset` metadata set by Nakadi typically is | ||
| The `received_at` and `partition_offset` metadata set by Nakadi typically is | ||
| different from the business event ordering, since (1) Nakadi is a distributed concurrent | ||
| system without atomic, ordered event creation and (2) the application's implementation | ||
| of event publishing may not exactly reflect the business order. The business ordering | ||
|
|
@@ -780,9 +781,12 @@ to keep transactional dataset replicas in sync as source for data analytics. | |
| For details about how to provide the data change ordering information, | ||
| please check <<203>>. | ||
|
|
||
| *Exception*: In situations where the transactional data is 'append only', | ||
| [EXCEPTION] | ||
| ==== | ||
| In situations where the transactional data is 'append only', | ||
| i.e. entity instances are only created, but never updated or deleted, the | ||
| ordering information may not be provided. | ||
| ==== | ||
|
|
||
|
|
||
| [#204] | ||
|
|
@@ -843,18 +847,18 @@ is required by the business, and duplicates need to be explicitly ignored, where | |
| customer behavior reporting (click rates) might not care about event duplicates | ||
| since accuracy in per-mille range is not needed. | ||
|
|
||
| *Hint:* Event consumers are supported in deduplication: | ||
| Event consumers are supported in deduplication: | ||
|
|
||
| * Deduplication can be based on the `eid` as mandatory standard for all events -- see <<211>>. | ||
| * Processing data change events to replay data changes and keep transactional | ||
| data copies in sync (CDC) is robust against duplicates because it is based on | ||
| data keys and change ordering -- see <<202>> and <<242>>. | ||
| * Data analytics users of the Data Lake are well advised to use curated data as a | ||
| source for analytics. Raw event datasets materialized in the lake are typically | ||
| cleaned-up (including deduplication and data synchronization) and provided as | ||
| transactional data copy or curated data products, for instance | ||
| https://curated-product-data.docs.zalando.net/[curated product data [internal link]] or | ||
| https://curated-sales-data.docs.zalando.net/[curated sales data [internal link]]. | ||
| * Processing data change events to replay data changes and keep transactional | ||
| data copies in sync (CDC) is robust against duplicates because it is based on | ||
| data keys and change ordering -- see <<202>> and <<242>>. | ||
| * Data analytics users of the Data Lake are well advised to use curated data as a | ||
| source for analytics. Raw event datasets materialized in the lake are typically | ||
| cleaned-up (including deduplication and data synchronization) and provided as | ||
| transactional data copy or curated data products, for instance | ||
| https://curated-product-data.docs.zalando.net/[curated product data [internal link]] or | ||
| https://curated-sales-data.docs.zalando.net/[curated sales data [internal link]]. | ||
|
|
||
| *Context:* One _source of duplicate events_ are the event producers, for instance, | ||
| due to publish call retries or publisher client failovers. Another source is | ||
|
|
||
Oops, something went wrong.
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.
Let's revert this change.