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

[bug] Unable to read file in .pkl #1818

Open
hedgetenders opened this issue Feb 5, 2025 · 1 comment
Open

[bug] Unable to read file in .pkl #1818

hedgetenders opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@hedgetenders
Copy link

Describe the bug

When trying to call pkl's read() function on a file, moon errors (even with a working pkl eval:

Error: config::pkl::failed

  × Failed to evaluate Pkl file ~/.../moon.pkl.
  ╰─▶ –– Pkl Error ––
      Refusing to read resource `file:Chart.yaml` because it does not match any entry in the resource allowlist (`--allowed-resources`).

      156 | c = read("file:Chart.yaml")

Steps to reproduce

In a moon.pkl file, add a read call to a nearby file then attempt a moon cli command.

Expected behavior

The file to be read in via pkl (for parsing and further work like generating tasks based on another file)

Additional context

From an attempt at debugging, it seems like rpkl may require a custom PklResourceReader for the file: scheme to be used with the EvaluatorOptions but I'm not entirely sure

@hedgetenders hedgetenders added the bug Something isn't working label Feb 5, 2025
@milesj
Copy link
Collaborator

milesj commented Feb 5, 2025

Yah we don't support read's at the moment, just environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants