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

Adds protobuf encoding #66

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Adds protobuf encoding #66

merged 6 commits into from
Aug 21, 2024

Conversation

dkolbly
Copy link
Contributor

@dkolbly dkolbly commented May 9, 2024

This PR adds a protobuf encoding for OCSF

@dkolbly dkolbly self-assigned this May 9, 2024
@dkolbly dkolbly added the encodings Encodings discussion label May 23, 2024
floydtree
floydtree previously approved these changes May 31, 2024
zschmerber
zschmerber previously approved these changes May 31, 2024
@dkolbly dkolbly dismissed stale reviews from zschmerber and floydtree via 9441781 June 6, 2024 15:18
@dkolbly dkolbly force-pushed the dkolbly/protobuf-encoding branch from 2a2cfe9 to 9441781 Compare June 6, 2024 15:18
@dkolbly
Copy link
Contributor Author

dkolbly commented Jun 7, 2024

The .proto file was generated by my OSF toolchain, available here: https://bitbucket.org/dkolbly/osf-meta/src/main/

Of particular interest for this purpose is the internal metaschema model here:
https://bitbucket.org/dkolbly/osf-meta/src/main/protos/metaschema.proto

and the actual protobuf SDK which consumes a schema in that format and produces .proto:
https://bitbucket.org/dkolbly/osf-meta/src/main/cmd/osf-sdk-protobuf/

The README.md there also documents how exactly it was generated

Current version of tool at df66e74

encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Show resolved Hide resolved
@dkolbly dkolbly changed the title Adds protobuf encoding [WIP] Adds protobuf encoding Jul 9, 2024
@mlmitch
Copy link

mlmitch commented Jul 17, 2024

Looks good to me. I'm sure whatever you decide to take out of linting will be appropriate.

@dkolbly dkolbly changed the title [WIP] Adds protobuf encoding Adds protobuf encoding Jul 25, 2024
zschmerber
zschmerber previously approved these changes Aug 1, 2024
Copy link

@rmouritzen-splunk rmouritzen-splunk left a comment

Choose a reason for hiding this comment

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

Found a couple small things, plus made a couple comments.

encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Outdated Show resolved Hide resolved
encodings/protobuf/README.md Show resolved Hide resolved
Signed-off-by: Donovan Kolbly <[email protected]>
- use well-known types for `json_t` and `object`
- mark non-required fields as optional

Signed-off-by: Donovan Kolbly <[email protected]>
Also adds a proto/buf.yaml to configuring linting tweaks.  To run the
linter, install [buf](https://buf.build/docs/installation) and run,
from the `proto/` directory:

```
buf lint
```

there are some known linting issues for certain non-standard
enumerations that don't follow the 0=Unknown convention.

Signed-off-by: Donovan Kolbly <[email protected]>
Copy link

@mlmitch mlmitch left a comment

Choose a reason for hiding this comment

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

LGTM - nice with the buf.yaml :)

@floydtree floydtree merged commit 3f71b3e into main Aug 21, 2024
@floydtree floydtree deleted the dkolbly/protobuf-encoding branch August 21, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encodings Encodings discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants