Retry delays not treated (or displayed) correctly

Description

According to documentation retryer.minRetryDelay is supposed to be in milliseconds, and retryer.maxRetryDelay in minutes.

However, with config like this:

We get this output:

Same is shown when running pbm config --list

I’m not entirely sure whether this is a display issue only, or if it’s actually using those values for min/max delay. Someone with more Go skills should look into that.

Environment

None

AFFECTED CS IDs

CS0045022, CS0045467

Activity

Kai Wagner November 28, 2024 at 9:04 AM

Was the PR already created? I would like to have the link to the PR in this ticket, for reference

Jakub Vecera November 26, 2024 at 10:56 AM

After a team discussion we came to a conclusion that we should update the docs and no code change is required for this bug. I will be creating a PR for updating the docs which will let the user know that a suffix in form of a time unit can be used (aligned to go’s time.duration).

The underlying type for duration is int64 and valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

When using following input:

running the command outputs as (normalized to closest unit - default behavior):


  • when inputing an invalid format (string) the user is met with following error:
    Error: unable to get new config: decode: yaml: unmarshal errors:
    line 6: cannot unmarshal !!str 1a000ms into time.Duration

  • when trying to input too large value it also behaves as expected:
    Error: unable to get new config: decode: yaml: unmarshal errors:
    line 6: cannot unmarshal !!float 1000000... into time.Duration

    or in case of specifying too large number with a unit, it behaves as string and also fails

Boris Ilijic August 8, 2024 at 9:47 AM

Some details are provided here:

Done

Details

Assignee

Reporter

Needs QA

No

Needs Doc

Yes

Components

Sprint

Affects versions

Priority

Smart Checklist

Created April 4, 2024 at 9:03 AM
Updated March 24, 2025 at 12:05 PM
Resolved December 3, 2024 at 12:05 PM