Skip to content

copy-repo-names.rb rescue only catches NotFound and Unauthorized — TooManyRequests and network errors crash the judge #682

Description

@sdghsdkjlas27-dotcom

copy-repo-names.rb rescue only catches NotFound and Unauthorized — TooManyRequests and network errors crash the judge

DESCRIPTION:
The copy-repo-names.rb judge calls Fbe.octo.repository(id) inside a loop with a rescue clause that only catches Octokit::NotFound and Octokit::Unauthorized. In production, GitHub API calls can also raise Octokit::TooManyRequests (HTTP 429 — rate limiting, extremely common in CI/CD), Octokit::InternalServerError (500), Faraday::ConnectionFailed, and Faraday::TimeoutError. Any of these will abort the entire judge script, leaving the database in a partially-updated state.

REPRODUCTION:
judges/copy-repo-names/copy-repo-names.rb, lines 13-18:

repos =
  ids.each_with_object({}) do |id, h|
    h[id] = Fbe.octo.repository(id)
  rescue Octokit::NotFound, Octokit::Unauthorized
    next
  end

Missing: Octokit::TooManyRequests, Octokit::InternalServerError, Octokit::BadGateway, Octokit::ServiceUnavailable, Faraday::ConnectionFailed, Faraday::TimeoutError.

IMPACT:
High — production crash under common conditions (rate limiting, network transient). Judge aborts mid-loop, leaving partial state.

RELATED FILES:

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