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
- Move retrying config from repo to extension and rename To avoid confusion since publishing is not retried, only checking the repo's status when transitioning `RetryingConfig` is moved from `NexusRepo... — committed to gradle-nexus/publish-plugin by marcphilipp 3 years ago
- Move retrying config from repo to extension and rename To avoid confusion since publishing is not retried, only checking the repo's status when transitioning `RetryingConfig` is moved from `NexusRepo... — committed to gradle-nexus/publish-plugin by marcphilipp 3 years ago
- Move retrying config from repo to extension and rename To avoid confusion since publishing is not retried, only checking the repo's status when transitioning `RetryingConfig` is moved from `NexusRepo... — committed to gradle-nexus/publish-plugin by marcphilipp 3 years ago
I’m afraid the meaning is not really clear from the name.
Those names are clear. However, having a common one might help as well (e.g.
defaultNexusOperationTimeout
?)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/1065Technically 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 ofexponential backoff
(which should be used anyway) ?I perfectly agree there might be
initialDelay
and probablymaximumDelay
. However, they might be configured by default to something like1s
and30s
which should not overload the server.