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

Event type extensions for adopting tools #168

Closed
afrittoli opened this issue Nov 13, 2023 · 6 comments · Fixed by #185
Closed

Event type extensions for adopting tools #168

afrittoli opened this issue Nov 13, 2023 · 6 comments · Fixed by #185
Milestone

Comments

@afrittoli
Copy link
Contributor

Tools that adopt CDEvents may already have a set of events that they generate, and some of the existing events may not have a corresponding one in CDEvents.

In some cases it may be possible to add those events into the spec, however, in other cases, it may not be an option, as the events in question may be product-specific and (or) not relevant from an interoperability point of view.

CDEvents should provide a mechanism for such tools to adopt CDEvents without having to renounce those custom events and without having to ask consumers to adopt different SDKs for different event types.

A possible solution could be:

  • Define a dev.cdeventsx namespace
  • Tools MUST use that namespace to define their custom events
  • The event types MUST follow the following rules:
  • Tools MAY host the schema for the events
  • The CDEvents SDK must be able to parse partially custom events, validating the context part and returning a raw payload for the subject
@e-backmark-ericsson
Copy link
Contributor

This somewhat relates to #91 and #147

@afrittoli
Copy link
Contributor Author

Indeed, this is a duplicate of #147 (I forgot that I filed that already) and related to #91, as having a link to the schema is especially interesting for custom events.

@afrittoli
Copy link
Contributor Author

afrittoli commented Nov 20, 2023

To provide an example, this is the list of events provided by Harbor:

image

We should be able to support all artifact.* events, and I think we could support the scanning.* events too, but I don't think we should adopt the quota, tag retention and replication events, as they seem to be Habor operational events, and not applicable for interoperability use cases.

@afrittoli
Copy link
Contributor Author

Related to #143 and #144 too.

@afrittoli
Copy link
Contributor Author

In #172 I'm proposing a few new CDEvents:

  • artifact pulled
  • artifact deleted

I plan to add an artifact scanned events, that through different outcomes will cover the three scanning events.
I don't see however CDEvents adopting operational events like "Quota near threshold", "Quota exceeded", "Replication statuts changed" or "Tag retention finished". These four could be implemented by Harbor using the dev.cdeventsx.harbor namespace.

What I'm proposing with this issue is to:

  • document in the spec that dev.cdeventsx.<tool-name> is the recommended way to add non-interoperability related events
  • (optionally): support parsing the context of dev.cdeventsx events in the SDKs
  • (optionally): support a schema field in the context so that the schema for custom events may be supplied - see Add a schema uri property to the context #91

@e-backmark-ericsson
Copy link
Contributor

Would we also need to book the domain name "cdeventsx.dev" if that is the naming convention we should follow?

afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
Add schemaURI to the context. It can be used to link to
a custom schema that further refines the event content.

Context:
- cdevents#168
- cdevents#91

Fixes: cdevents#91

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli afrittoli mentioned this issue Feb 22, 2024
4 tasks
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Feb 22, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli afrittoli added this to the v0.5 milestone Mar 4, 2024
afrittoli added a commit that referenced this issue Mar 4, 2024
* Add an optional schemaURI to the context

Add schemaURI to the context. It can be used to link to
a custom schema that further refines the event content.

Context:
- #168
- #91

Fixes: #91

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Mar 6, 2024
Add schemaURI to the context. It can be used to link to
a custom schema that further refines the event content.

Context:
- cdevents#168
- cdevents#91

Fixes: cdevents#91

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Mar 6, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Mar 6, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Mar 13, 2024
Add schemaURI to the context. It can be used to link to
a custom schema that further refines the event content.

Context:
- cdevents#168
- cdevents#91

Fixes: cdevents#91

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit to afrittoli/cdevents-spec that referenced this issue Mar 13, 2024
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaUri (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
afrittoli added a commit that referenced this issue Mar 13, 2024
* Add support for CDEvents custom events

As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaUri (#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: #168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli afrittoli modified the milestones: v0.5, v0.4 Apr 3, 2024
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 a pull request may close this issue.

2 participants