harbor run: expose RetryConfig backoff (min_wait_sec, wait_multiplier, max_wait_sec) as CLI flags

Open
#4,598 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@shiv2077 is already working on this.

Since Dec 3, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start with src/harbor/cli/jobs.py and src/harbor/models/job/config.py; compare how --max-retries is applied so values from -c remain when the new options are omitted. Add the three retry wait options to the Job Settings panel and document the stated backoff formula. Done when harbor run --help shows the options and supplied values configure the retry wait as described.

Written by the indexing model from the issue text.

Description

Problem

RetryConfig has wait_multiplier, min_wait_sec and max_wait_sec (src/harbor/models/job/config.py), but
harbor run only exposes -r/--max-retries, --retry-include and --retry-exclude (src/harbor/cli/jobs.py). The
defaults (1 s, x1, max 60 s) are much too short for provider rate limits and subscription quotas, which reset after
minutes to hours. To change them, a user has to write a JobConfig file only for these three numbers and pass it with
-c, next to an otherwise flag-driven command line.

Repro

harbor run -p tasks -a codex -m openai/<model> -r 5 --retry-include ApiRateLimitError
# no way to set the wait between attempts without `-c retry.json`:
# {"retry": {"min_wait_sec": 600, "wait_multiplier": 2, "max_wait_sec": 3600}}

Proposed change

Three options in the "Job Settings" panel, applied like --max-retries (only when given, so -c values stay):

--retry-min-wait SEC         RetryConfig.min_wait_sec
--retry-max-wait SEC         RetryConfig.max_wait_sec
--retry-wait-multiplier X    RetryConfig.wait_multiplier

They would also be useful on harbor jobs resume if it gains retry overrides. Docs: one line explaining that the
wait before attempt n (0-based) is min(min_wait_sec * wait_multiplier**n, max_wait_sec).

Version: harbor 0.27.0 (unchanged in 0.27.1.dev202612011755).

Dominant language
Python
Stars
5.6k
Forks
1.9k
Avg merge
1d 17h
Merged PRs (30d)
156

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.