fix(bind): interpret bind defined as type []map[string]string #302
Merged
rchincha merged 1 commit intoproject-stacker:mainfrom Dec 14, 2022
Merged
fix(bind): interpret bind defined as type []map[string]string #302rchincha merged 1 commit intoproject-stacker:mainfrom
rchincha merged 1 commit intoproject-stacker:mainfrom
Conversation
96f90bb to
cfa55bb
Compare
Contributor
|
LGTM, let's add a test case for this
…On Thu, Jun 16, 2022 at 1:36 AM Darshil Parikh ***@***.***> wrote:
Fixes #301 <#301>
------------------------------
You can view, comment on, or merge this pull request online at:
#302
Commit Summary
- 96f90bb
<96f90bb>
interpret Bind as well when getting string or slice from interface{}
File Changes
(1 file <https://github.com/project-stacker/stacker/pull/302/files>)
- *M* types/layer.go
<https://github.com/project-stacker/stacker/pull/302/files#diff-aef8927a5078ca12d21f08d41d782696bd2db2502bcef3fe05ed41f3edb3e2e0>
(9)
Patch Links:
- https://github.com/project-stacker/stacker/pull/302.patch
- https://github.com/project-stacker/stacker/pull/302.diff
—
Reply to this email directly, view it on GitHub
<#302>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANPVKU4H36AZVOAMZZGBWDVPJSIBANCNFSM5Y47DCLQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
1cc875e to
cb6819d
Compare
mikemccracken
requested changes
Jun 16, 2022
Contributor
mikemccracken
left a comment
There was a problem hiding this comment.
Since we're just adding a simple syntax test that the struct syntax for binds works, how about moving this to a new file test/binds.bats, and add a simplified test for the old syntax too?
cb6819d to
24a1482
Compare
31b8580 to
67162dc
Compare
mikemccracken
approved these changes
Jun 16, 2022
Contributor
|
@darshilgit can you rebase and repush to retrigger build? (the build logs have been purged) |
67162dc to
e349904
Compare
rchamarthy
approved these changes
Oct 3, 2022
e349904 to
8cf857b
Compare
rchamarthy
approved these changes
Oct 4, 2022
Contributor
|
I might need this in PR #349 |
8cf857b to
19a0b5c
Compare
19a0b5c to
568f93c
Compare
rchamarthy
approved these changes
Dec 14, 2022
0adcb57 to
113b5c4
Compare
shimish2
reviewed
Dec 14, 2022
ae7505d to
bb741c6
Compare
hallyn
approved these changes
Dec 14, 2022
bb741c6 to
7729e57
Compare
shimish2
approved these changes
Dec 14, 2022
Contributor
|
Not particularly happy with that we are turning golang to loosey-goosey javascript here, but a cleanup for another day. |
8750faf to
6caa2f7
Compare
As per the type definition of Layer, bind is of type Bind which is a
struct with fields Source and Dest.
But when we do UnmarshalYAML for type Bind, we are assuming that we
would always get the Bind as a []string and not
[]map[interface{}]interface{} (when making a call to
getStringOrStringSlice).
This PR fixes the getStringOrStringSlice to consider Bind defined
as a []map[string]string and returns appropriate bind string
in that case.
Fixes project-stacker#301
Signed-off-by: Darshil Parikh <darshil.parikh@gmail.com>
6caa2f7 to
8d0ab4f
Compare
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.
As per the type definition of Layer, bind is of type Bind which is a
struct with fields Source and Dest.
But when we do UnmarshalYAML for type Bind, we are assuming that we
would always get the Bind as a []string and not
[]map[interface{}]interface{} (when making a call to
getStringOrStringSlice).
This PR fixes the getStringOrStringSlice to consider Bind defined
as a []map[string]string and returns appropriate bind string
in that case.
Fixes #301