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

Make datetime extension an experimental feature #1415

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

shaobo-he-aws
Copy link
Contributor

@shaobo-he-aws shaobo-he-aws commented Jan 7, 2025

Description of changes

Issue #, if available

Checklist for requesting a review

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

  • A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

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

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

I confirm that docs.cedarpolicy.com (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-docs. PRs should be targeted at a staging-X.Y branch, not main.)

Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

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

Why did you undo the change to remove datetime as a default feature in the core and validator crates? I would think that's what we want

@shaobo-he-aws
Copy link
Contributor Author

Why did you undo the change to remove datetime as a default feature in the core and validator crates? I would think that's what we want

I thought that we an experimental feature is meant to apply to cedar-policy since it contains public APIs. Do you think that we should provide the same guarantee in core and validator (i.e., default features should be DRTed) as well?

@john-h-kastner-aws
Copy link
Contributor

john-h-kastner-aws commented Jan 8, 2025

Do you think that we should provide the same guarantee in core and validator (i.e., default features should be DRTed) as well?

This is more a question about how Cargo will handle this feature. If datetime is default in cedar-policy-core, and cedar-policy depends on it without no-default-features, then I would expect that the datetime extension would be enabled when parsing Cedar policies even when it's not explicitly enabled by the consumer of cedar-policy

@shaobo-he-aws
Copy link
Contributor Author

This is more a question about how Cargo will handle this feature. If datetime is default in cedar-policy-core, and cedar-policy depends on it without no-default-features, then I would expect that the datetime extension would be enabled when parsing Cedar policies even when it's not explicitly enabled by the consumer of cedar-policy

I see. It makes sense. I'll revert the latest commit.

This reverts commit 2e2a3b6.
Signed-off-by: Shaobo He <[email protected]>
cedar-policy-core/src/evaluator.rs Outdated Show resolved Hide resolved
cedar-policy-core/src/evaluator.rs Outdated Show resolved Hide resolved
shaobo-he-aws added a commit to cedar-policy/cedar-spec that referenced this pull request Jan 13, 2025
@shaobo-he-aws shaobo-he-aws merged commit 875ba48 into main Jan 14, 2025
17 of 19 checks passed
@shaobo-he-aws shaobo-he-aws deleted the chore/shaobo/experimentalize-datetime branch January 14, 2025 16:46
shaobo-he-aws added a commit to cedar-policy/cedar-spec that referenced this pull request Jan 14, 2025
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