jfrog / jfrog/jfrog-cli

Request to support environment variable configuration for retries/retryWaitTime

Open
#3,457 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
595
Forks
307
Avg merge
4d 17h
Merged PRs (30d)
17

Description

Is your feature request related to a problem? Please describe.

Have a slew of CI jobs that build and published to an Artifactory instance. Sometimes the connection may fail when publishing (e.g. network issue) and the default retry event occurs (default, 3 times with a 0 interval).

If I want to update the retry approach, such as waiting ~10 seconds per retry, I have to update each project to use this.

Describe the solution you'd like to see

It would be nice if there was an environment variable to configure the retry defaults. For example:

  • JFROG_CLI_RETRIES
  • JFROG_CLI_RETRY_WAIT_TIME

Where CLI takes priority, then environment then default (assuming that's why jf uses now).

Describe alternatives you've considered

Was thinking of adding a generic CI argument for all jf calls, but seemed to be the same time/effort as the original issue.

Additional context
n/a

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the retry and retryWaitTime handling in the Go CLI and trace how command-line values and defaults are selected. Add support for JFROG_CLI_RETRIES and JFROG_CLI_RETRY_WAIT_TIME with CLI values taking precedence over environment values and defaults, then run the relevant retry tests or add coverage for the precedence behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.