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

fix(device): always take apps input as source of truth #378

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

StealthyCoder
Copy link
Member

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.

Copy link
Member

@vkhoroz vkhoroz left a 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, ",")
}
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 👍

Copy link
Member

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

Copy link
Member

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?

Copy link
Member

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).

Copy link
Contributor

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.

subcommands/common_config.go Outdated Show resolved Hide resolved
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]>
Copy link
Member

@vkhoroz vkhoroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StealthyCoder StealthyCoder merged commit 0c1e928 into foundriesio:main Feb 29, 2024
8 checks passed
@StealthyCoder StealthyCoder deleted the fix/config_apps branch February 29, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants