Skip to content

@Retry has time unit attributes with names inconsistent with the main attribute name #524

Open
@Ladicek

Description

@Ladicek

We mostly use a convention that a time unit attribute for some attribute foo is called fooUnit (for example, delay and delayUnit). Perhaps with an exception that if the attribute is called value, then the time unit attribute is just unit.

However, some @Retry attributes don't stick to this convention:

  • maxDuration and durationUnit
  • jitter and jitterDelayUnit

Especially durationUnit might look like perhaps it covers all duration values, and not just maxDuration. This was pointed out by @yoshioterada here: smallrye/smallrye-fault-tolerance#206

I propose we rename durationUnit to maxDurationUnit, and jitterDelayUnit to jitterUnit. We can do it in 2 ways:

  1. Hard breaking change. Just do the rename.
  2. With a deprecation period. For some period of time, both variants would exist, the old one being @Deprecated. If both were used, the new one would have a priority. This should be relatively easy to implement, as there's no collision.

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