-
Notifications
You must be signed in to change notification settings - Fork 113
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
Workaround mergo merging panic for volumes #106
Conversation
64250b0
to
5427c29
Compare
If we adopt the "pointer" approach, then we need to do the same on all |
@ndeloof You are right! |
Reading darccio/mergo#90 (comment) it seems this would not be the sivler bullet you expected: non-empty source would be fully replaced by override, not merged. |
I ran my own debug session investigating docker-archive/compose-cli#1261 ... I noticed (trying to get a minimal test set) that issue happens as compose override file defines
so a possible fix, without digging into mergo internal reflect voodoo is to enforce all maps to be set non-nil. |
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.
tested with
volumes:
data:
- override:
volumes:
data:
driver: azure_file
driver_opts:
share_name: test-share
storage_account_name: my-storage-account
as reported in initial issue
=> panic persists
by my own investigation, root cause is DriverOpts
is a nil map and mergo fails to set a value.
Can't find a satisfying fix so far.
@ndeloof Just waiting on merge of darccio/mergo#177 to bump |
5427c29
to
eb7acd8
Compare
@ulyssessouza darccio/mergo#177 has been merged |
@ndeloof Yep! And I've just bumped mergo in this PR too |
ack, but with the fix you should not need to use |
81cf330
to
ab9a86c
Compare
Signed-off-by: Ulysses Souza <[email protected]>
ab9a86c
to
7a299ea
Compare
This should fix docker-archive/compose-cli#1261 and docker/cli#2916
The process should probably be applied to other maps, like
networks
,secrets
,configs
andextensions