-
Notifications
You must be signed in to change notification settings - Fork 16
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(device): always take apps input as source of truth #378
Conversation
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.
I think this is the right direction; yet I have suggestions how to further improve it.
@@ -226,16 +226,13 @@ func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reporte | |||
if len(configuredTag) == 0 && len(reportedTag) > 0 { | |||
configuredTag = reportedTag | |||
} | |||
if len(configuredApps) == 0 && reportedApps != nil { | |||
configuredApps = strings.Join(reportedApps, ",") | |||
} |
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.
I believe that the reportedTag
is subject to the same problem as reportedApps
.
So, it'd be wise to update that logic accordingly as well.
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.
Done. 👍
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.
note - this is rolling back a "fix" - a8a21c7
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.
or is it. i'm confused. can you add a little more to the commit message?
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.
@doanac IIUC that fix is nice, but it introduced another bug we were discussing today.
So, Eric has now moved it to a better place (see lines below).
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.
note - this is rolling back a "fix" - a8a21c7
I think that issue can be fixed by making fioconfig
send the config to DG. It becomes possible with this change foundriesio/fioconfig#45.
Instead of overriding the input given with what our api is giving back, it is much better to just take what the user is giving us as what needs to be set. Signed-off-by: Eric Bode <[email protected]>
f9f6852
to
1d44591
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.
LGTM
Instead of overriding the input given with what our api is giving back, it is much better to just take what the user is giving us as what needs to be set.