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

docs: Clear up some uses of future keywords #6653

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

charlieegan3
Copy link
Contributor

In this PR I have tried to:

Should this PR also update the links [See the docs on _future keywords_] to point elsewhere? I wasn't too sure. cc @anderseknert @johanfylling

In this PR I have tried to:

- link to the OPA v1.0 doc to add more context to the rego.v1 notes
- CONTINUED to use
  https://www.openpolicyagent.org/docs/latest/policy-language/#future-keywords
  as the source of truth for notes about future keywords.
- Removed some old style examples.

Should this PR also update the links `[See the docs on _future keywords_]` to
point elsewhere? I wasn't too sure.

Signed-off-by: Charlie Egan <[email protected]>
instances[instance] {
container := containers[_]
instance := {"address": container.ipaddress, "name": container.name}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it makes sense to remove these, of not now, when?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed

Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 3d185a9
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/6605620c317e5100083915bd
😎 Deploy Preview https://deploy-preview-6653--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

worked with the previous version of OPA stop working.

This **cannot happen** when you selectively import the future keywords as you need them.
{{< /danger>}}
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 also didn't seem to be so relevant now since there will be no new keywords

Copy link
Contributor

Choose a reason for hiding this comment

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

This might still become relevant again in the future if we introduce new keywords that'll become standard in v2. But then we can add something like this back. This section is probably more confusing than helpful in the meanwhile 👍 .

anderseknert
anderseknert previously approved these changes Mar 28, 2024
Copy link
Member

@anderseknert anderseknert 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 to me! Thanks for taking the time to improve this 👍

instances[instance] {
container := containers[_]
instance := {"address": container.ipaddress, "name": container.name}
}
Copy link
Member

Choose a reason for hiding this comment

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

Agreed

Signed-off-by: Charlie Egan <[email protected]>
Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

Thanks :)

worked with the previous version of OPA stop working.

This **cannot happen** when you selectively import the future keywords as you need them.
{{< /danger>}}
Copy link
Contributor

Choose a reason for hiding this comment

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

This might still become relevant again in the future if we introduce new keywords that'll become standard in v2. But then we can add something like this back. This section is probably more confusing than helpful in the meanwhile 👍 .

@johanfylling johanfylling merged commit b705d5b into open-policy-agent:main Mar 28, 2024
26 checks passed
tsidebottom pushed a commit to tsidebottom/opa- that referenced this pull request Apr 17, 2024
- link to the OPA v1.0 doc to add more context to the rego.v1 notes
- CONTINUED to use
  https://www.openpolicyagent.org/docs/latest/policy-language/#future-keywords
  as the source of truth for notes about future keywords.
- Removed some old style examples.

Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Thomas Sidebottom <[email protected]>
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