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: Conftest can now successfully load files using a file URL (e.g., file:///C:/path/to/data.yaml) on windows #1008

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pckvcode
Copy link

Relates to PR #999

  • We changed engine.docs to map[string]interface{}

Resolves: #979

    Conftest encounters errors on Windows when loading file paths that include drive letters (e.g., `C:/path/to/data.yaml`).
    Even when using a file URL (e.g., `file:///C:/path/to/data.yaml`), we still face issues.
    With these code changes, Conftest can now successfully load files using a file URL (e.g., `file:///C:/path/to/data.yaml`).
    We opted for file URLs instead of paths with drive letters (e.g., `C:/path/to/data.yaml`) because OPA does not support file paths with drive letters. For more details, see [this issue comment](open-policy-agent/opa#6922 (comment)).

    Resolves: open-policy-agent#979

Signed-off-by: Punith C K <[email protected]>
@pckvcode pckvcode force-pushed the fix/support-load-data-files-from-file-url-new branch from 66b7437 to 5fb44f3 Compare September 23, 2024 18:20
… file:///C:/path/to/data.yaml) on windows

    Conftest encounters errors on Windows when loading file paths that include drive letters (e.g., C:/path/to/data.yaml). Even when using a file URL (e.g., file:///C:/path/to/data.yaml), we still face issues.
    We opted for file URLs(e.g., file:///C:/path/to/data.yaml) instead of paths with drive letters (e.g., C:/path/to/data.yaml) because OPA does not support file paths with drive letters.
    Resolves open-policy-agent#979

Signed-off-by: Punith C K <[email protected]>
@pckvcode pckvcode force-pushed the fix/support-load-data-files-from-file-url-new branch from 5fb44f3 to 13619ee Compare October 17, 2024 14:59
@boranx
Copy link
Member

boranx commented Nov 12, 2024

@pckvcode Please rebase the branch, the validate tests should be passing now.
Also, for the style checks, you'd need to follow conventional commits for the commit message.

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.

Bug: Accessing Rego Policies from Different Drives in Windows
2 participants