-
Notifications
You must be signed in to change notification settings - Fork 33
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(bind): interpret bind defined as type []map[string]string #302
Conversation
96f90bb
to
cfa55bb
Compare
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@darshilgit can you rebase and repush to retrigger build? (the build logs have been purged) |
67162dc
to
e349904
Compare
e349904
to
8cf857b
Compare
I might need this in PR #349 |
8cf857b
to
19a0b5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
19a0b5c
to
568f93c
Compare
0adcb57
to
113b5c4
Compare
ae7505d
to
bb741c6
Compare
bb741c6
to
7729e57
Compare
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
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