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: fail validation when SourceID is missing on conditions and targets #400

Merged
merged 4 commits into from
Nov 28, 2021

Conversation

jplayout
Copy link
Contributor

@jplayout jplayout commented Nov 26, 2021

fix: fail validation when SourceID is missing on conditions and targets

Fix #281

fix(condition) fail validation when SourceID is missing
fix(target) fail validation when SourceID is missing

Test

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

test.yaml

sources:
  getLatestVersion:
    kind: shell
    spec:
      command: echo ami-XXXXX
conditions:
  checkIfAmiExist:
    name: Test if ami1 exist
    sourceID: doNotExist
    kind: shell
    spec:
      command: echo OK
targets:
  updateAmiValue:
    name: update the AMI value
    sourceID: doNotExist
    kind: shell
    spec:
      command: echo OK
go build -o ./dist/updatecli
./dist/updatecli diff --config test.yaml

Additional Information

Tradeoff

Potential improvement

@dduportal dduportal changed the title Fix/281 fix: fail validation when SourceID is missing on conditions and targets Nov 26, 2021
@jplayout jplayout marked this pull request as ready for review November 26, 2021 13:46
@dduportal dduportal added bug Something isn't working condition Modify condition resource target Related to updatecli target labels Nov 26, 2021
Copy link
Member

@olblak olblak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@olblak olblak enabled auto-merge (squash) November 28, 2021 19:18
@olblak olblak added this to the 0.16.1 milestone Nov 28, 2021
@olblak olblak merged commit 02d223b into updatecli:main Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working condition Modify condition resource target Related to updatecli target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No error return when sourceID doesn't exist
3 participants