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

Remove docker plant startup requirement #5029

Merged
merged 7 commits into from
Nov 3, 2022
Merged

Conversation

naltatis
Copy link
Member

@naltatis naltatis commented Nov 2, 2022

  • show error when telemetry enable fails

fixes #5022

Bildschirm­foto 2022-11-02 um 21 43 36

@@ -95,7 +95,7 @@ func configureEnvironment(cmd *cobra.Command, conf config) (err error) {

// setup telemetry
if err == nil {
err = telemetry.Create(conf.Plant)
Copy link
Member

Choose a reason for hiding this comment

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

Brauchen wir hier den Error nicht trotzdem? Wenn in der Config telemetry: true steht muss es die ID doch geben?

Copy link
Member Author

@naltatis naltatis Nov 3, 2022

Choose a reason for hiding this comment

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

create macht jetzt keine Prüfung auf Machine-/Config-ID mehr. Das wird nun nur noch geprüft wenn man versucht telemetry wirklich zu aktivieren (enable). Dieses Aktivieren kann noch während des Setups sein (siehe folgende Zeilen) oder es kann zur Laufzeit auftreten (via UI).

Im ersten Fall (telemetry: true, kein plant) startet evcc nicht und wirft einen Fehler der den User auffordert die Config zu erweitern. Das ist genau das Verhalten was wir bislang ja sowieso schon hatten. Hier ist der Fehlertext nun etwas ausführlicher. Diesen Fall würde ich als Legacy/Kompatiblitätsfall ansehen. Zukünftig würde ich nur noch Aktivierung via UI unterstützen. Aber das ist ein Thema für später.

Im zweiten Fall (Aktivieren in UI, kein plant) bekommt der User die Fehlermeldung in der UI (siehe Screenshot).

Copy link
Member Author

Choose a reason for hiding this comment

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

create an sich muss aber bleiben, weil wir ja plant: ... irgendwie für spätere Aktivierung speichern müssen und uns ggf. die Machine-ID erzeugen lassen. Daher wird das immer aufgerufen.

Copy link
Member

Choose a reason for hiding this comment

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

Im ersten Fall (telemetry: true, kein plant) startet evcc nicht und wirft einen Fehler der den User auffordert die Config zu erweitern

Wo sehe ich das? Dafür müsste ja Enable aufgerufen werden?

Copy link
Member Author

Choose a reason for hiding this comment

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

util/telemetry/charge.go Outdated Show resolved Hide resolved
@andig andig added the bug Something isn't working label Nov 3, 2022
@andig andig merged commit 69f6685 into master Nov 3, 2022
@andig andig deleted the fix/telemetry_docker_error branch November 3, 2022 19:19
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.

Machine ID generation issue
2 participants