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: adds processing logic for bpmetadata to use protobuf #1705

Merged
merged 12 commits into from
Jul 31, 2023

Conversation

g-awmalik
Copy link
Collaborator

In order to make metadata schema definition language independent, bpmetadata now processes metadata content using protobuf.

Known issues:

  • BlueprintVariable.DefaultValue is changed from interface{} to string. This can cause error messages while running bpmetadata on existing blueprints. Solution: run bpmetadata with -f to force creation of proto compliant metadata.
  • Go docs will most likely have superfluous types and methods not directly related to metadata. Solution: use protos as the source of truth for metadata definition and specs.

In order to make metadata schema definition language independent,
bpmetadata now processes metadata content using protobuf.

Known issues:
- BlueprintVariable.DefaultValue is changed from interface{} to string.
  This can cause error messages while running bpmetadata on existing
  blueprints. Solution: run bpmetadata with -f to force creation of
  proto compliant metadata.
- Go docs will most likely have superfluous types and methods not
  directly related to metadata. Solution: use protos as the source of
  truth for metadata definition and specs.
cli/bpmetadata/markdown.go Fixed Show fixed Hide fixed
cli/bpmetadata/markdown.go Fixed Show fixed Hide fixed
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Thanks @g-awmalik! Are there any benefits to checking in the generated files? I was thinking we could generate these at build time and add to gitignore?

cli/Makefile Outdated Show resolved Hide resolved
cli/bpmetadata/schema/generate.go Show resolved Hide resolved
cli/bpmetadata/tfconfig_test.go Show resolved Hide resolved
@apeabody apeabody changed the title feat: adds prcoessing logic for bpmetadata to use protobuf feat: adds processing logic for bpmetadata to use protobuf Jul 11, 2023
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Can we also remove the generated files?

@g-awmalik
Copy link
Collaborator Author

Can we also remove the generated files?

We can but i'll do that after this goes through because the CFT CLI Tests check will fail since it executes go test ./.... We need to change that to make go_test. I do a separate PR for that while this is being reviewed by consumer teams.

@g-awmalik g-awmalik merged commit b694a72 into master Jul 31, 2023
14 checks passed
@g-awmalik g-awmalik deleted the feat/bpmeta-protoc-impl branch July 31, 2023 23:56
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.

2 participants