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

updates to EST policy set format #1017

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

khieta
Copy link
Contributor

@khieta khieta commented Jun 21, 2024

Description of changes

Updates to the EST policy set format to match the latest JSON FFI design (see #757). Feel free to suggest changes. I don't feel too strongly about field names/structure, just that this interface & the FFI should be consistent.

This is a breaking change for the new JSON policy set format, which is not yet released.

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):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

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

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Copy link
Contributor

@aaronjeline aaronjeline left a comment

Choose a reason for hiding this comment

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

Like the new names

Copy link
Contributor

@cdisselkoen cdisselkoen left a comment

Choose a reason for hiding this comment

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

Looks good

Comment on lines +232 to +238
let err = serde_json::from_value::<PolicySet>(json)
.expect_err("should have failed to parse from JSON");
assert_eq!(
err.to_string(),
"unknown field `links`, expected one of `templates`, `staticPolicies`, `templateLinks`"
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

expect_err()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This error is a serde_json::Error rather than one of our internal errors, so no nice miette messaging.

@khieta khieta merged commit 71e7e1d into main Jun 21, 2024
15 of 17 checks passed
@khieta khieta deleted the khieta/updates-to-esu-policy-set branch June 21, 2024 15:25
khieta added a commit that referenced this pull request Aug 7, 2024
@khieta khieta mentioned this pull request Aug 7, 2024
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