Skip to content

Retry transient DNS resolution failures #9

Description

@pudo

DNS resolution failures are a recurring cause of zavod crawler outages. Pravda should absorb transient DNS failures when a later capture attempt can succeed.

Behavior

  • Identify DNS resolution failures separately from other browser and navigation errors.
  • Retry them automatically with a small, bounded attempt count and backoff.
  • Run each retry in a clean browser context so failed navigation state is not reused.
  • Preserve attempt count and the final machine-readable failure cause on the snapshot.
  • Log retries with the snapshot ID, hostname, attempt number, and error class.
  • Do not retry permanent HTTP or content-validation failures under this policy.

Questions

  • Which Chromium/Playwright errors reliably identify DNS failures?
  • Should retry limits be global configuration or caller-controlled?
  • Does DNS caching in the browser process affect retries?
  • Should resolver rotation across system, Quad9, Google, or Cloudflare be supported later? If so, it must be configurable and observable rather than implicit.

Acceptance criteria

  • DNS failures have a structured failure cause.
  • A transient DNS failure is retried automatically and can produce a successful snapshot.
  • Retries stop at the configured bound.
  • Exhausted retries produce one inspectable capture result with attempt metadata.
  • Tests cover recovery and exhaustion without making real network requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions