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

Add vSphere (API) version to CloudEvent #439

Closed
embano1 opened this issue Jun 3, 2021 · 0 comments · Fixed by #442
Closed

Add vSphere (API) version to CloudEvent #439

embano1 opened this issue Jun 3, 2021 · 0 comments · Fixed by #442
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@embano1
Copy link
Collaborator

embano1 commented Jun 3, 2021

Is your feature request related to a problem? Please describe.

Even though not explicitly stated, event schemas for vSphere are tied to a particular vSphere release, i.e. could break between major releases (even minor). Currently there is no way to detect the vSphere version that generated a particular event. This could lead to decoding errors in functions if a schema breaks in a non-compatible way between vSphere releases.

Describe the solution you'd like
Ideally, vSphere events should carry a version indicating the schema version/contract consumers can rely on. Providing OpenAPI schemas would be neat to but seems not feasible as an implementation in vSphere currently.

The short-term solution would be to use custom context attributes to reflect the vSphere versions (incl. API version).

Describe alternatives you've considered
Currently, no alternatives without changes to the vSphere eventing core exist IMHO to indicate/prevent breaking schema changes.

Additional context

@embano1 embano1 added the enhancement New feature or request label Jun 3, 2021
embano1 pushed a commit to embano1/vcenter-event-broker-appliance that referenced this issue Jun 4, 2021
Closes: vmware-samples#439
Signed-off-by: Michael Gasch <mgasch@vmware.com>
embano1 pushed a commit to embano1/vcenter-event-broker-appliance that referenced this issue Jun 7, 2021
Closes: vmware-samples#439
Signed-off-by: Michael Gasch <mgasch@vmware.com>
embano1 pushed a commit to embano1/vcenter-event-broker-appliance that referenced this issue Jun 7, 2021
Since vSphere events are not versioned and (somewhat loosely) tied to a
particular vSphere API version, this change introduces a new CloudEvents
context attribute `vsphereapiversion` reflecting the vSphere API version
of a particular CloudEvent produced by the `vcenter` event producer.

BREAKING: This change sets the `timestamp` in the CloudEvent to the
`CreatedTime` as set by vCenter in a vSphere event instead of
`time.Now()`.

Closes: vmware-samples#439
Signed-off-by: Michael Gasch <mgasch@vmware.com>
@embano1 embano1 added this to the v0.7 Release milestone Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants