Skip to content

Allow importing more than 100 devices using the CLI tool #7628

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

Open
4 of 6 tasks
vlasebian opened this issue May 22, 2025 · 2 comments
Open
4 of 6 tasks

Allow importing more than 100 devices using the CLI tool #7628

vlasebian opened this issue May 22, 2025 · 2 comments
Assignees
Labels
bug Something isn't working ui/cli This is related to ttn-lw-cli
Milestone

Comments

@vlasebian
Copy link
Contributor

vlasebian commented May 22, 2025

Summary

Importing more than 100 devices using the CLI tool is restricted by rate limiting. It would be useful for a user to be able to import a larger number of devices without splitting the import file into smaller ones and processing each file separately.

Current Situation

When trying to import a large number of end devices from the CLI tool, rate limiting restricts this at 100 devices:

error:pkg/ratelimit:rate_limit_exceeded (rate limit of `100` accesses per minute exceeded for resource `grpc:method:/ttn.lorawan.v3.DeviceRepository/GetTemplate::token:E5MPAAJ5S3PHGJREBBPOPJRHLEPEUDKHR2CEIHI`)
    rate=100

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

This is feature would be used by users when importing a large number of end devices into The Things Stack. It simplifies the process of importing end devices.

Proposed Implementation

Add a pause & retry for the CLI tool when a rate limiting error is received.

Contributing

  • I can help by doing more research.
  • I can help by implementing the feature after the proposal above is approved.
  • I can help by testing the feature before it's released.

Validation

Code of Conduct

@vlasebian vlasebian added the needs/triage We still need to triage this label May 22, 2025
@KrishnaIyer
Copy link
Member

Importing more than 100 devices using the CLI tool is restricted by rate limiting

100 is a magic number set on TTS Cloud/Sandbox clusters and is subject to change. Indeed as you mentioned in the issue, this should not consider the number of requests but backoff based on the HTTP rate-limitd (429) response.

@KrishnaIyer KrishnaIyer added bug Something isn't working ui/cli This is related to ttn-lw-cli and removed needs/triage We still need to triage this labels May 26, 2025
@KrishnaIyer KrishnaIyer added this to the v3.34.2 milestone May 26, 2025
@KrishnaIyer
Copy link
Member

This is a good one for @happyRip with his operational experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui/cli This is related to ttn-lw-cli
Projects
None yet
Development

No branches or pull requests

3 participants