bryancall commented on code in PR #476:
URL: https://github.com/apache/trafficserver-ci/pull/476#discussion_r4284880570
##########
jenkins/github/ubuntu.pipeline:
##########
Review Comment:
Fixed in 22d0e1e. The `CloneOption` timeout inside each attempt is now 4
minutes in all 28 checkouts, so git stops a stuck fetch with its own error
before the 5 minute step timeout, which still covers the rest of the checkout.
The trafficserver-ci checkouts outside the retry block keep their 10.
##########
jenkins/github/ubuntu.pipeline:
##########
Review Comment:
The description is updated: #475 was closed and its PR pipeline changes were
folded into this PR, so the description now covers both the branch and the PR
pipelines.
##########
jenkins/branch/rat.pipeline:
##########
@@ -45,14 +45,21 @@ pipeline {
branch = '*/' +
env.GITHUB_BRANCH
}
- timeout(time: 10, unit:
'MINUTES') {
- retry(3) {
+ int attempt = 0
+ retry(3) {
+ if (attempt > 0) {
+ // Spread
retries out so jobs that failed together do not come back together.
+ sleep(time: 30
* attempt + (int) (Math.random() * 60), unit: 'SECONDS')
+ }
+ attempt++
+ timeout(time: 5, unit:
'MINUTES') {
checkout([$class: 'GitSCM',
branches: [[name: branch]],
userRemoteConfigs: [[url: env.GITHUB_URL, refspec:
"+refs/heads/${env.GITHUB_BRANCH}:refs/remotes/origin/${env.GITHUB_BRANCH}"]],
//
Branch builds normally checkout the current branch tip. If a manually
//
requested SHA is older than this shallow depth, checkout should fail fast
//
instead of falling back to a large full-history fetch.
+ // Only
this branch is fetched, so a requested SHA must also be on it.
extensions: [[$class: 'CloneOption', honorRefspec: true, shallow: true, depth:
1000, noTags: true, timeout: 10]]
])
}
Review Comment:
Not adding one. The stage is already bounded: three tries of at most 5
minutes each, plus waits of at most 90 and 120 seconds, is about 18.5 minutes
worst case, and the description lists that. An outer timeout would be one more
number to keep in step with the retry count and the waits, and setting it too
low would bring back the problem this PR fixes, where a hung first try uses up
the budget the retries need.
##########
jenkins/branch/rat.pipeline:
##########
@@ -45,14 +45,21 @@ pipeline {
branch = '*/' +
env.GITHUB_BRANCH
}
- timeout(time: 10, unit:
'MINUTES') {
- retry(3) {
+ int attempt = 0
+ retry(3) {
+ if (attempt > 0) {
+ // Spread
retries out so jobs that failed together do not come back together.
+ sleep(time: 30
* attempt + (int) (Math.random() * 60), unit: 'SECONDS')
+ }
+ attempt++
+ timeout(time: 5, unit:
'MINUTES') {
Review Comment:
Leaving this for a separate change. This repo has no shared library or
loaded helper today, and every pipeline already carries its own checkout block,
so this keeps to that pattern. Moving 28 pipelines onto a shared helper is a
refactor worth doing on its own, rather than inside a fix for hung checkouts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]