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

feat: add version and description to definition #3437

Conversation

josedonizetti
Copy link
Contributor

1. Explain what the PR does

This PR is part of the work to support a v1 for GRPC, and also the #2870, because the new event structure won't have metadata, and instead static data from the event will come from the definition, so users will be able to query the grpc endpoint to get a definition, but there is two important fields missing from the definition:

  • the event description
  • the event version, which will be bumped if we change the Params, to inform users that the event schema changed

@josedonizetti
Copy link
Contributor Author

@yanivagman @rafaeldtinoco what do you think? If you agree, I'll add a v1.0.0 version to every event defined on the core.

Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

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

Yes, we can have all events versioned 1.0.0 at this point, and start following the semver semantics when updating the event:

  1. Major field is bumped whenever some data the event used to have was changed (e.g. a field was renamed or removed)
  2. Minor field is bumped whenever a non breaking change occurs (e.g. a new field was added to the event)
  3. Patch field is bumped whenever something is changed in the way the event works internally (e.g. some bug was fixed in the code)

pkg/events/definition.go Outdated Show resolved Hide resolved
@josedonizetti josedonizetti force-pushed the add-desc-and-version-to-definition branch 4 times, most recently from 17dfbeb to 3c89467 Compare September 6, 2023 10:52
@josedonizetti josedonizetti marked this pull request as ready for review September 6, 2023 11:57
@josedonizetti josedonizetti force-pushed the add-desc-and-version-to-definition branch from 3c89467 to 42d1bb4 Compare September 6, 2023 17:53
pkg/events/definition.go Outdated Show resolved Hide resolved
@josedonizetti josedonizetti force-pushed the add-desc-and-version-to-definition branch from 42d1bb4 to 6bb5cb9 Compare September 11, 2023 22:08
Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

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

LGTM

@josedonizetti josedonizetti merged commit 63a6894 into aquasecurity:main Sep 12, 2023
25 checks passed
@josedonizetti josedonizetti deleted the add-desc-and-version-to-definition branch September 12, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants