-
Notifications
You must be signed in to change notification settings - Fork 307
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
Limited functionality when combining options --policy
and --update
#807
Comments
hey @jlestrada Thanks for reporting the issue!
Could there be an issue with how |
Circling back to quickly confirm that your example above does work so I believe you are on the right track that there is something unique to my case. Possibly the use of a private repository? To your point, requirement of the I appear to now being having some issues with reproducing the error on my end. I wonder if my git host was having intermittent issues that day I filed the ticket. To explain my use case a bit more I am using a private gitlab repository as my host. Given the correct credentials, I dont imagine that my use case is unique to what you have specified. I will continue to try and reproduce and give a bit more information. If i am unable to after today then I think we should just mark this closed. Thanks for the response! |
Okay I am now able to confirm but I am not entirely certain this is a bug that others will run into. The issue I believe is only triggered when using a pre-exisiting directory space and it is outside the current working directory. Please see the following output as what i believe a way to reproduce the behavior.
You can see above that the execution of the test worked the first time when the folder This I believe was somewhat unique to my situation when using Atlantis. I believe the working directory is under TBH I dont know if this is a major issue but it does seem to show some limitation, maybe especially so when using Atlantis. Let me know what you think and if you are able to reproduce with the above output. |
yeah, I'm able to reproduce. Basically, it occurs when there is a custom policy folder and if the update source is a git
so Actually, there wouldn't be a problem if it was like the following
Do you need the policy folder to be created from scratch before each execution? Otherwise, I'd say it'd be more graceful to let it be handled by
|
Problem
There appears to be limited functionality when running
conftest test
with the combined options of--policy
and--update
. The issue appears to be that there is an inability to specify a directory path with policy that is other than./policy
or a custom directory with git config already set within.The error seen is the following format
The issue appears to be resolved when policy is set to the default value
policy
or if the targeted path already has git configured.Steps to reproduce
conftest test
with combined optionsConftest Version
Additional Notes and Considerations
It is worth noting that my use case involves executing conftest through Atlantis using the following documentation. Basically I am forced to have to specify the path option which is maybe the problem in itself but nothing from what i saw in the conftest documentation stated incompatibility between the two options.
If there is agreement that this is a bug and an unexpected behavior, I am happy to look into the issue and attempt to resolve with an PR.
The text was updated successfully, but these errors were encountered: