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

more simplification of protobuf schema format (followups to 1488) #1495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cdisselkoen
Copy link
Contributor

Description of changes

More simplifications of the Protobuf format for Schema, some suggested in #1488 and some based on conversations with @john-h-kastner-aws offline.

  • resolving the TODO: Schema is just a list of EntityDecl and a list of ActionDecl, not a map, as this is simpler and sufficient
  • removing the ability to have open attributes, as this is not a stable feature (in both entities and records)
  • the context for an Action must be a record, so instead of Type, we require it to be a map<string, AttributeType>
  • rename Type.Ty to Type.Prim which is more clear
  • remove the Never, True, False, EmptySet, and AnyEntity types, as these should never appear in schemas
  • remove the ActionEntity type as action entities can just be encoded as Entity type (we do not support action attributes in Protobuf, as that is not a stable feature)
  • remove EntityRecordKind in favor of inlining it into Type
  • a few field renumberings, which is a breaking change we can make now but not after stabilization

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change (breaking or otherwise) that only impacts unreleased or experimental code.

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Requires updates, and I have made / will make these updates myself. (Please include in your description a timeline or link to the relevant PR in cedar-spec, and how you have tested that your updates are correct.)

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

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.

3 participants