Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

"Policy check didn't run for this file" shown for a helm test #252

Closed
jehanjazz-1 opened this issue Oct 29, 2021 · 4 comments
Closed

"Policy check didn't run for this file" shown for a helm test #252

jehanjazz-1 opened this issue Oct 29, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@jehanjazz-1
Copy link
Contributor

Describe the bug
"Policy check didn't run for this file" shown for a helm test.

To Reproduce
Steps to reproduce the behavior:

  1. Create a umbrella helm chart
  2. Navigate to the sub-chart and use "helm dep up && helm datree test ."
  3. Observe that we encounter : [?] Policy check didn't run for this file

Expected behavior
Set Policy should be executed

Screenshots
image

Desktop (please complete the following information):

  • OS: Debian (WSL2 Windows)

Datree version (run datree version):

  • Version: [0.14.20]
@jehanjazz-1 jehanjazz-1 added the bug Something isn't working label Oct 29, 2021
@dimabru
Copy link
Contributor

dimabru commented Oct 29, 2021

Hi @jehanjazz-1
Please share k8s validation step output as well.
Looks like the failure is due to an invalid k8s file

@jehanjazz-1
Copy link
Contributor Author

jehanjazz-1 commented Oct 30, 2021

Hi @dimabru

Is this the output you require?
image

When I run the same command on my dev setup it seems to work
image

@eyarz
Copy link
Member

eyarz commented Oct 30, 2021

Yes, this is the image(s) that we needed to help you troubleshoot.

There is an easy way to debug it*:

  1. instead of helm datree tests [chart-dir] run helm template [chart-dir]
  2. in the rendered manifest, look for the key relplicaCount at the path that is mentioned in the schema error validation step

If the key relplicaCount exists - there is a discrepancy between your environments. My guess is that this is the issue.

*I'm taking into account that you're running the same datree command on the same helm dir.

@jehanjazz-1
Copy link
Contributor Author

Yes, Seemed to work quite well after it.
Ty @eyarz :-)

Maybe a line number where this issue happens could be considered a good improvement for the future ?

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

No branches or pull requests

3 participants