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

Support non-protobuf output and enhance flatten lists option #111

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

jwog-stripe
Copy link
Contributor

@jwog-stripe jwog-stripe commented Jan 26, 2024

This PR addresses these concerns:

  • Skycfg cannot natively be used to return objects which do not have a protobuf representation (this is by design). This causes problems when Skycfg is heavily used for the generation of Kubernetes specs, because custom resource definition objects cannot be applied to the Kubernetes API server as raw protobufs. Adds a MainNonProtobuf entrypoint function which enables invoking the Skycfg library in a way which effectively just treats it as a wrapper for pure Starlark without expecting it to return protos, so that use of proto-returned objects and non-proto custom-handled objects can be both be supported by this library without significant change to caller semantics.
  • The flatten lists option did not support multiple levels of nesting. Adds support for flattening returned protos or strings when the WithFlattenLists() ExecOption is used.

@jwog-stripe jwog-stripe force-pushed the jwog/flatten-list-recursive branch from 180d5e2 to 73a89de Compare January 26, 2024 21:55
@dl-stripe dl-stripe merged commit 54f7504 into stripe:trunk Jan 30, 2024
7 checks passed
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