publish-plugin: Change naming for timeout settings

The naming is misleading. RetryingConfig + maxRetries means the plugin would retry publication multiple times, however, in practice it means it would “just wait the specified number of times while the repository is in progress”.

Do you think it would be better to use timeout-like configuration properties?

For instance connectToNexusTimeout, initializeRepositoryTimeout, singleArtifactPublishTimeout, closeRepositoryTimeout, etc, etc.

Note: the users do not care what the number of “status check” attempts is there. What they care is overall timeout value, and they might want to have something like initial delay between status check attempts.

WDYT?

Original comment from @vlsi in closed #18 .

I think that it’s really nice idea and I don’t want it forgot in closed PR. My current timeout settings look like:

nexusPublishing {
    ...
    clientTimeout.set(Duration.parse("PT10M")) // 10 minutes
}
nexusStaging {
    ...
    numberOfRetries = 360 // 1 hour if 10 seconds delay
    delayBetweenRetriesInMillis = 10000 // 10 seconds
}

But really I just want to configure, that I’m ready to wait 1 hour for publishing staging repository. Something like a configuration timeout for publishing artifacts to the staging repository in nexusPublishing block.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

transitRepositoryTimeout The name isn’t self-explanatory

I’m afraid the meaning is not really clear from the name.

closeRepositoryTimeout and releaseRepositoryTimeout

Those names are clear. However, having a common one might help as well (e.g. defaultNexusOperationTimeout ?)

It may look even feasible, but under the hood there is a need to override delayBetweenRetrying e.g. for tests

Technically speaking, there are libraries to augment time behavior. So you don’t need to rely on sleep(100ms). I’ve collected a couple of links here: https://github.com/pgjdbc/pgjdbc/issues/1065

People might also want to increase it to do not “kill” their overloaded server

Technically speaking, backoff should quickly climb to the sane maximum delays. In practice, it is wrong to have a setting like delayBetweenRetrying because, well, what does it mean for the case of exponential backoff (which should be used anyway) ?

I perfectly agree there might be initialDelay and probably maximumDelay. However, they might be configured by default to something like 1s and 30s which should not overload the server.