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

Ask the user for consent before polling for updates online #52

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

hnez
Copy link
Member

@hnez hnez commented Nov 21, 2023

Phoning home for software updates without asking for any kind of consent is bad practice and (rightfully) breaks user's trust.

So we shouldn't do it.

  1. Add an endpoint to the tacd's API that is persisted to disk and configures wether there should be polling for updates.
  2. Add a page to the setup wizard that asks if the user wants to poll for updates.
  3. Add a "Poll for updates yes/no" toggle to the Updating overview in the TAC Dashboard. And integrate the "should poll" information into the other widgets

The setup wizard page:

Setup wizard polling config

The dashboard panel when update polling is enabled:

Dashboard polling enabled

The dashboard panel when update polling is disabled (and its effect on the "Channel Enabled" and "Channel Polling Interval" table columns):

Dashboard polling disabled

Related Pull Requests

This PR is based on another PR that should be merged first:

@hnez hnez requested review from KarlK90 and jluebbe November 21, 2023 06:49
@hnez hnez force-pushed the update-poll-consent branch from 0904e85 to d6164e6 Compare November 21, 2023 06:55
@hnez
Copy link
Member Author

hnez commented Nov 21, 2023

Fixed the "to to" typo seen in the first screenshot.

web/src/Setup.tsx Outdated Show resolved Hide resolved
web/src/Setup.tsx Outdated Show resolved Hide resolved
@hnez hnez self-assigned this Nov 30, 2023
@hnez hnez force-pushed the update-poll-consent branch from d6164e6 to b5b478e Compare November 30, 2023 13:37
@hnez hnez removed their assignment Nov 30, 2023
@hnez hnez force-pushed the update-poll-consent branch from b5b478e to 075d7c6 Compare December 7, 2023 12:59
hnez added 5 commits January 11, 2024 10:47
This convenience method allows you to wait until a topic holds a
specified value.

Signed-off-by: Leonard Göhrs <[email protected]>
Polling for updates should only be done with user consent as it
creates a connection to our server, which has privacy implications.

Signed-off-by: Leonard Göhrs <[email protected]>
No need to show a spinner if polling for updates is not enabled etc..

Signed-off-by: Leonard Göhrs <[email protected]>
@hnez hnez force-pushed the update-poll-consent branch from 075d7c6 to 5a3edce Compare January 11, 2024 09:50
hnez added 2 commits January 11, 2024 10:58
This is a trick that cargo clippy has recently learned,
which means we need it to make the CI pipeline succeed.

Signed-off-by: Leonard Göhrs <[email protected]>
…gpio

Clippy disallows #[cfg(test)] mods that are followed by other code by
default[1] and usually this makes sense, because tests should be at the
end of the file, but in our case the mod does not contain tests but instead
imports a test-specific variant of the gpio mod.

Allow that.

[1]: https://rust-lang.github.io/rust-clippy/master/index.html#/items_after_test_module

Signed-off-by: Leonard Göhrs <[email protected]>
@hnez
Copy link
Member Author

hnez commented Jan 11, 2024

It looks like cargo clippy learned a few new tricks in the meantime.
I've added two (admittedly unrelated to this PR) commits to fix the cargo clippy related CI errors.

@jluebbe this has invalidated the previous approval, could you have a second look?

@hnez hnez merged commit d44f5ca into linux-automation:main Jan 11, 2024
13 checks passed
@hnez hnez deleted the update-poll-consent branch January 11, 2024 10:33
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