Fix validation when templating is used on Tasks#1738
Merged
LK4D4 merged 1 commit intomoby:masterfrom Nov 9, 2016
Merged
Conversation
This make the validation not fail when using templating when creating a Service. It populates the context with fake data and validate that the result is valid. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
cb9aa9e to
486f113
Compare
Member
|
SGTM |
Current coverage is 55.31% (diff: 100%)@@ master #1738 diff @@
==========================================
Files 97 97
Lines 15481 15498 +17
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 8539 8573 +34
+ Misses 5808 5791 -17
Partials 1134 1134
|
stevvooe
reviewed
Nov 9, 2016
| LogDriver: taskSpec.LogDriver, | ||
| }) | ||
| if err != nil { | ||
| return grpc.Errorf(codes.InvalidArgument, err.Error()) |
Contributor
There was a problem hiding this comment.
This is great: template errors will be propagated to the client.
Contributor
|
LGTM |
Contributor
|
SGTM |
Contributor
|
LGTM |
2 tasks
|
Can someone please give a hint where i can find a list of available keys available in templating? Thanks in advance! |
Member
|
@yellowmegaman see moby/moby#28486 for documentation |
|
@thaJeztah Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This make the validation not fail when using templating when creating a Service. It populates the context with fake data and validate that the result is valid 🐯.
This is kinda required for moby/moby#28025 👼
/cc @stevvooe @aaronlehmann @aluzzardi
🐸
Signed-off-by: Vincent Demeester vincent@sbr.pm