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

Error: parse policies: imported library not found #7

Closed
garethahealy opened this issue Jun 30, 2020 · 3 comments
Closed

Error: parse policies: imported library not found #7

garethahealy opened this issue Jun 30, 2020 · 3 comments
Labels
question Further information is requested

Comments

@garethahealy
Copy link
Contributor

I am trying to create the constraints for:

But, hitting an issue:

$ konstraint create
Error: parse policies: imported library not found: data.utils.kubernetes
Usage:
  konstraint create <dir> [flags]

Flags:
  -h, --help   help for create

Global Flags:
      --ignore string   A regex pattern which can be used for ignoring directories and files (default "^$")
      --lib string      The name of the folder where the Rego librarie(s) are (default "lib")

From the error message, it seems to be complaining about:

which lives here:

conftest doesn't complain, so I presume its valid rego. Any idea?

@jpreese
Copy link
Collaborator

jpreese commented Jun 30, 2020

You'll most likely need to either change your utils folder to lib or set the --lib flag to utils.

I do have some thoughts on trying to make this flag/setting obsolete. I don't think it should be a requirement as we should be able to figure it out import folders based on import statements in the .rego

@jpreese jpreese added the question Further information is requested label Jun 30, 2020
@garethahealy
Copy link
Contributor Author

yep, user error :)

On the auto discovering the libs: Yep, that would be nice/make it easier.

@jpreese
Copy link
Collaborator

jpreese commented Jun 30, 2020

Awesome, glad to hear! Closing.

@jpreese jpreese closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants