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

Fix incorrect description of glob matching #680

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zhimsel
Copy link

@zhimsel zhimsel commented Dec 4, 2024

Description of the change

The previous description of how globs are matched is incorrect.

Since the underlying "evaluation engine" is simply an OPA policy (which is described here), the Golang doublestar library has nothing to do with the evaluation. OPA uses its own built-in glob evaluation, which does not follow the same rules as doublestar. See this Rego Playground for examples of where they don't match your docs (the ones reported as "broken").

Additionally, if any custom push policies are attached, the default policy gets thrown out; it's purely up to those policies to interpret the project globs however they see fit (if at all).

This PR modifies the glob section to point to the correct documentation for pattern matching, and updates the examples for quality and accuracy.

Checklist

Please make sure that the proposed change checks all the boxes below before requesting a review:

  • I have reviewed the guidelines for contributing to this repository.
  • The preview looks fine.
  • The tests pass.
  • The commit history is clean and meaningful.
  • The pull request is opened against the main branch.
  • The pull request is no longer marked as a draft.
  • You agree to license your contribution under the MIT license to Spacelift (not required for Spacelift employees).
  • You have updated the navigation files correctly:
    • No new pages have been added, or;
    • Only nav.yaml has been updated because the changes only apply to SaaS, or;
    • Only nav.self-hosted.yaml has been updated because the changes only apply to Self-Hosted, or;
    • Both nav.yaml and nav.self-hosted.yaml have been updated.

If the proposed change is ready to be merged, please request a review from @spacelift-io/solutions-engineering. Someone will review and merge the pull request.

Spacelift employees should request reviews from the relevant engineers and are allowed to merge pull requests after they got at least one approval.

Thank you for your contribution! 🙇

@Daniellem97 Daniellem97 requested a review from tomasmik December 23, 2024 14:13
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.

1 participant