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

fix(dockerimage,transformers) improve validation failure cases #500

Merged
merged 5 commits into from
Feb 1, 2022

Conversation

dduportal
Copy link
Contributor

Fix #432

With updatecli 0.18.3 and 0.19.0, the dockerimage condition already fails thanks to #418 .
But this PR improves the user feedback when a dockerimage condition is provided with an empty tag.

It also fails transformers when they are applied with an empty input source (surprise bugfix!).

Finally, this PR ensure that a failing transformer does not duplicate the error message 3 times :)

Test

To test this pull request, you can run the following commands:

make test
make test-short
make test-e2e

Additional Information

CONDITIONS:
===========

checkDockerImage
----------------
ERROR: Condition validation error for the image "cytopia/yamllint": source input is empty and no explicit tag is specified.

✗ condition not met, skipping pipeline
  • Result if the condition is removed (e.g. target's transformer failing due to empty input value):
⚠ empty source returned


TARGETS
========

show result
-----------
ERROR: Something went wrong in target "show result" :
ERROR: Validation error: input for transformer is empty.


=============================

REPORTS:


✗ UPDATECLI.YAML:
        Sources:
                ⚠ [lastRelease] Get latest yamllint version(githubRelease)
        Target:
                ✗ [show result]  Update yamllint version in PodTemplates.yaml(shell)

…nd source are empty

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal added bug Something isn't working resource-docker Resource of kind Docker Image transformers Related to transformers labels Feb 1, 2022
lemeurherve
lemeurherve previously approved these changes Feb 1, 2022
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
@dduportal dduportal merged commit 15da748 into updatecli:main Feb 1, 2022
@dduportal dduportal deleted the gh-432 branch February 1, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-docker Resource of kind Docker Image transformers Related to transformers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker Image Condition should fails if the source is an empty value
3 participants