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

Using a wrong outputs definition in porter.yaml, doesn't provide en error #24

Open
mikkelhegn opened this issue Dec 14, 2020 · 3 comments
Labels
2 - 🍕 Pizza should be eaten daily user experience 🌈💖 All Hail the UX Gods

Comments

@mikkelhegn
Copy link

In my example I was not specifying the jsonPath using correct case (I used jsonpath as opposed to jsonPath):

      outputs:
        - name: "WEBAPI_ID"
          jsonpath: "$.properties.outputs.webapi_id.value"

This resulted in the mixin to run without an error, but not picking up the output.

I think the desired outcome should be an error on parsing porter.yaml while running the mixin. Thoughts?

@vdice
Copy link
Member

vdice commented Dec 16, 2020

Ah, thanks for filing. It would definitely be good to bubble up errors of this nature. It could perhaps happen during linting or maybe at runtime (I'll have to refresh my memory as to if one of path/jsonPath/regex is mandatory... if so, we could error when none is supplied -- as I believe would be the case if the key is incorrect/unknown.) Maybe a linter check would be the best...

@JasonFreeberg
Copy link

I ran into this same problem, took me a few minutes to figure out what was going on.

@carolynvs carolynvs added user experience 🌈💖 All Hail the UX Gods 2 - 🍕 Pizza should be eaten daily labels Apr 27, 2021
@carolynvs
Copy link
Member

I think we need to refresh the schema.json file for the az mixin, and then validate against it during lint. Then when you use VSCode you will get the proper autocomplete and porter build/lint will fail when you typo the outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - 🍕 Pizza should be eaten daily user experience 🌈💖 All Hail the UX Gods
Projects
None yet
Development

No branches or pull requests

4 participants