Skip to content

Add clarification on including additional context attributes#301

Merged
duglin merged 6 commits into
cloudevents:masterfrom
cathyhongzhang:identity
Sep 14, 2018
Merged

Add clarification on including additional context attributes#301
duglin merged 6 commits into
cloudevents:masterfrom
cathyhongzhang:identity

Conversation

@cathyhongzhang
Copy link
Copy Markdown

Signed-off-by: cathyhongzhang cathy.h.zhang@huawei.com

Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
@clemensv
Copy link
Copy Markdown
Contributor

clemensv commented Sep 6, 2018

That's a great consolidation of all the extensibility discussions. LGTM.

Copy link
Copy Markdown
Contributor

@cneijenhuis cneijenhuis left a comment

Choose a reason for hiding this comment

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

I like the additions this PR makes after the introduction! 👍

However, I think the introductory sentences are overlapping with the first sentences of the section Extension Attributes (2 paragraphs down). I have used quotes to visualize the overlap.

I am also wondering if this paragraph should be part of the Extension Attributes section. That wouldn't only solve the issue of having to duplicate the introduction, but I'd personally expect e.g. the advice on "duplicating" attributes in context and data in the section on extension attributes.

Comment thread spec.md Outdated
Every CloudEvent conforming to this specification MUST include one or more
of the following context attributes.

It could also include additional attributes in the "context attributes" that
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.

CloudEvent producers MAY include additional extension attributes within the
event

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will remove this duplication in the "Extension Attributes". I think it is better to put into the generic "Context Attribute" so as not to restrict it to extensions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cathyhongzhang I think it might make more sense to put this into the other section (the extension) section since this is really about adding extensions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I am not sure if all future new context attributes belong to extensions. If some context attribute is used by a large number of use cases, then the WG might reach consensus to add it to the main spec.md directly. So I think putting this in the generic "context attributes" section, which includes both attributes endorsed by this WG (i.e. those explicitly defined in spec.md) and those that are not endorsed, is better. What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Currently none is defined in the spec.md, so by default, they all belong to extensions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I was just focused on the readability of it. This paragraph is really talking about extensions, granted its focused on "identity" extensions, but still extensions so it just felt a little out of place to have it here instead of in the extension section. Plus it then, sort of, reads like we're talking about extensions in 2 places instead of one.

In the end its not a big deal, it just felt a little odd, but I can live with it if others are ok with it.

Comment thread spec.md Outdated
of the following context attributes.

It could also include additional attributes in the "context attributes" that
might be used in ancillary actions related to the processing of the event.
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.

that might be used for any purpose in the processing of the CloudEvent

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will remove the duplication

Comment thread spec.md Outdated
It could also include additional attributes in the "context attributes" that
might be used in ancillary actions related to the processing of the event.
For example, in many IoT and enterprise use cases, an event could be used in
a serverless application that performs actions across multiple types of events.
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.

[...] such as identifying or correlating event sources.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

will remove the duplication

Comment thread spec.md Outdated
identity attributes to the "context attributes" which the event consumers can
use to correlate this event with the other events. If such identity attributes
happen to be part of the event "data", it is still suggested that the event
producer add the identity attributes to the "context attributes" so that event
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.

also adds may be clearer - the attribute shouldn't be removed from "data".

I'm wondering if a more generic version of this applies to all extension attributes - it is completely fine if an attribute is "duplicated" in data and context.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agree it is completely fine if an attribute is duplicated in data and context and this applies to all attributes including extension attributes. Will use "also add" to be clearer.

Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
Comment thread spec.md
event. This enables event producers, or middleware, to include additional
metadata that might be used for any purpose in the processing of the
CloudEvent, such as identifying or correlating event sources. See
[CloudEvent Attributes Extensions](primer.md#cloudevent-attribute-extensions)
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 the last sentence, including this link, should remain.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will add it back to the extension section.

Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
Comment thread spec.md
both appear within the same JSON object.

### Extension Attributes
CloudEvent producers MAY include additional extension attributes within the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this first sentence (in particular the "MAY") is important. I'm not sure why this section is being reduced.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is removed per comment on duplication with what's newly added in previous section

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree with removing duplicate text but not the normative statements behind them. I would suggest you try to move your new text into this section since they're both about extensions. Then we don't lose any of the normative language but add the clarifications you're looking for.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The normative statements added in the previous generic "context attributes" section applies to extension attributes too since extension attributes are also "context attributes". Putting it into "extension" section adds implicit restriction/assumption that any future attribute will be an extension, which is not right. We can not predict the future and should allow the possibility of some future attribute to be added as standard attribute rather than extension attribute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cathyhongzhang there aren't any normative statements in your new text though. By "normative" I mean using RFC2119 keywords.

Putting it into "extension" section adds implicit restriction/assumption that any future attribute will be an extension...

no it doesn't. Any new attribute added to the spec will not be an extension - it won't be since it's spec-defined. All of the attributes you're talking about in your new text are "extensions" because they are not defined by the spec, which is why it makes more sense to put the text into the "extensions" section. Its location in the spec does not change what identity properties people can add, it just make it more readable to put all extensions text into the same location.

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 agree with @duglin - and I'm sorry if my review wasn't clear on that. I prefer to merge your proposed text into the extension section.

Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Sep 13, 2018

LGTM

cathyhongzhang added 2 commits September 13, 2018 12:28
of "Extension Attributes", and change "it is still suggested" to "SHOULD"

Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
Signed-off-by: cathyhongzhang <cathy.h.zhang@huawei.com>
@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Sep 13, 2018

I think this aligns with what we agreed to on today's call.
LGTM

Can I get one more LGTM from someone who was on today's call just as a quick double-check? Then I'll merge

@fsunaval
Copy link
Copy Markdown

LGTM

@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Sep 14, 2018

Approved on the 9/13 call with some minor edits - which are now done.

@duglin duglin merged commit fd1be85 into cloudevents:master Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants