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

Default loading path for data? #800

Open
blairdrummond opened this issue Mar 22, 2023 · 2 comments
Open

Default loading path for data? #800

blairdrummond opened this issue Mar 22, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@blairdrummond
Copy link
Contributor

blairdrummond commented Mar 22, 2023

I saw one or two very old comments about having a default data path (like policy/data or just data), but it seems like there isn't one yet.

#215 (review)

#169 (comment)

For me, this makes bundles hard to use effectively, because the bundle isn't enough, you need to make sure that the consuming conftest call adds a -d flag. If there was a default policy/data folder, then I could publish bundles and consume them easily. (Note: the --combine flag is one obstacle, but can deal with that problem later)

@jalseth jalseth added the enhancement New feature or request label Mar 25, 2023
@jalseth jalseth added the good first issue Good for newcomers label May 6, 2023
@Kandamkolathy
Copy link

Hey, I want to pick up this issue.
Just a question on how the default value should be handled when loading data files if the default location doesn't exist? My current thought is to check when a folder not found error is thrown and then check if it is using the default path location and if so continue without throwing that error. Or would there be a better way?

Kandamkolathy pushed a commit to Kandamkolathy/conftest that referenced this issue Jul 20, 2024
Add default value as 'data' for the data flag. Updated data loading function to not throw an error if it is using the default data path and it is missing.

Fixes open-policy-agent#800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants