Skip to content

ntk retries throttled requests immediately until Python crashes #32

Description

@next-devin

What happens now

When the API returns a 429 response containing "throttled", ntk immediately sends the same request again.

There is no wait between attempts and no limit on the number of attempts. If the API continues returning 429, ntk keeps sending requests until Python stops with a RecursionError.

This can be reproduced in a test by making every request return 429.

There is also a previous report of throttling during a 175-file push in #20. That response told the client to wait one second.

What should happen

When the API returns 429, ntk should:

  1. wait for the number of seconds returned by the API;
  2. retry the request;
  3. stop after three failed retries;
  4. print a clear error and return the failure to the command.

This proposal uses the wait time supplied by the API. It does not require exponential backoff.

Done when

  • ntk waits before retrying a throttled request.
  • ntk makes no more than three retries.
  • A successful retry allows the command to continue.
  • If all retries fail, ntk prints an error and the command exits with a non-zero status.
  • Tests cover a successful retry and a request that remains throttled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions