TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
979 stars 308 forks source link

Deprecate generate-qr command for end devices #6345

Closed KrishnaIyer closed 1 year ago

KrishnaIyer commented 1 year ago

Summary

Deprecate generate-qr command for end devices. Refs https://github.com/TheThingsIndustries/lorawan-join-server/issues/55 and https://github.com/TheThingsIndustries/product-management/issues/13

Current Situation

The generate-qr command requires an end device to be registered to generate the QR Code. This doesn't work with the new claiming flow.

We should also maybe deprecate the Generate function of the EndDeviceQRCodeGenerator since QR generation should be a function of an external join server.

Why do we need this? Who uses it, and when?

This is to remove functionality that doesn't work.

Proposed Implementation

Follow the usual deprecation steps.

Contributing

Code of Conduct

johanstokking commented 1 year ago

So what do we do, return an error in generate-qr?

KrishnaIyer commented 1 year ago

I think we should do a noop with a warning that asks the user to use ttjs-cli and point to the docs.

johanstokking commented 1 year ago

I'm not sure what you mean with noop. This command is expected to write an image to a file. If we suddenly stop doing that while returning 0 exit code, we break CLI compatibility.

This command is marked EXPERIMENTAL, but still, changing it to not doing anything breaks scripts that are using it.

I don't see another way of returning an error.

KrishnaIyer commented 1 year ago

Ok I see. Then let's indeed return an error with a message to use the ttjs-cli and point to the docs.