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

Only add ResticPassword if set #147

Merged
merged 1 commit into from
Nov 27, 2020

Conversation

mweibel
Copy link
Collaborator

@mweibel mweibel commented Nov 18, 2020

see #135 for context - @Kidswiss mentioned that the RESTIC_PASSWORD setting is lost with the new implementation.

I believe this was responsible for the Restic password not being merged correct. As it's been set by default even if the backend didn't specify, the global default wasn't being used instead.
I added a test to clarify the way Mergo merges.

@mweibel
Copy link
Collaborator Author

mweibel commented Nov 19, 2020

also I think: Mergo is not really necessary if the idea is just to add keys into the map if they haven't been defined yet

@mweibel mweibel mentioned this pull request Nov 19, 2020
@Kidswiss
Copy link
Contributor

Kidswiss commented Nov 26, 2020

Just tested this, seems to fix the dropped RESTIC_PASSWORD thanks!

About the mergo remark: it's not only keys that haven't been defined yet. For example the global restic password should always be overwritten if it's defined in a specific job.

@Kidswiss Kidswiss merged commit d799c5c into k8up-io:development Nov 27, 2020
@ccremer ccremer added the bug Something isn't working label Dec 30, 2020
@ccremer ccremer changed the title fix: only add ResticPassword if set Only add ResticPassword if set Jan 11, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants