Giter VIP home page Giter VIP logo

Comments (8)

jpreese avatar jpreese commented on May 28, 2024 3

I have a PR out there that should resolve this.

from conftest.

jpreese avatar jpreese commented on May 28, 2024 1

I looked into this some, and it looks like we broke multi-file yamls. In the provided example, if you remove all but the Deployment config, you'll get some results.

Since the yaml library doesn't support multi-document yaml files, we were detecting line breaks/getting the result of each yaml in the test.go file.

It looks like it was moved to the yaml parser itself.

At first glance, it doesn't look like the Rego evaluation isn't too happy with []interface{}.

from conftest.

garethr avatar garethr commented on May 28, 2024

Could you include the policy files and input file you're using?

from conftest.

dewe avatar dewe commented on May 28, 2024

Here goes:

files.zip

# expand folder
$ conftest test external-dns.yaml

from conftest.

dewe avatar dewe commented on May 28, 2024

Nice find. We’re using kustomize, so most of our configs are multi-document.

from conftest.

jpreese avatar jpreese commented on May 28, 2024

Yeah.. definitely a regression. They were working previously. Doing some debugging, we're now passing in []interface{} to the Rego library's Eval() function, and it doesn't seem to be handling it properly.

from conftest.

amitsaha avatar amitsaha commented on May 28, 2024

Ahh, didn;t realize this was a regression. I ran into this yesterday when feeding the output of kustomize build into conftest test. I even worked on "supporting it" (my WIP here).

from conftest.

jpreese avatar jpreese commented on May 28, 2024

Well, it's a regression in the sense that multi-file yamls used to work. 0.13 appears to have broken that functionality.

from conftest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.