Skip to content

[v12] Added release server publishing retry#34644

Merged
camscale merged 1 commit intobranch/v12from
camh/v12/retry-release-server
Nov 16, 2023
Merged

[v12] Added release server publishing retry#34644
camscale merged 1 commit intobranch/v12from
camh/v12/retry-release-server

Conversation

@camscale
Copy link
Copy Markdown
Contributor

  • Added release server publishing retry
  • dronegen: Run auto_publish 10 times (from 3) in a loop

Change the drone generation to use a loop to run the auto_publish
relcli command instead of listing them one-by-one and loop 10 times
instead of 3. The loop will terminate the first time relcli succeeds.

The loop has an || false at the end to ensure the loop command fails
if all invocations of relcli fail. With set -e, even though the exit
status of the loop is non-zero, the shell seems to continue. With the
|| false at the end, it makes it exit on failure. I'm not sure exactly
how drone runs the commands so this may not be necessary but it seems
safer.

e.g.

set -e
for i in $(seq 10); do false && break; done
echo hello

This will echo "hello" even though all invocations inside the loop
failed.

set -e
for i in $(seq 10); do false && break; done || false
echo hello

This will not echo "hello" - set -e causes an exit before that command
due to the || false.

Backport: #34605

* Added release server publishing retry
* dronegen: Run auto_publish 10 times (from 3) in a loop

Change the drone generation to use a loop to run the `auto_publish`
relcli command instead of listing them one-by-one and loop 10 times
instead of 3. The loop will terminate the first time `relcli` succeeds.

The loop has an `|| false` at the end to ensure the loop command fails
if all invocations of `relcli` fail. With `set -e`, even though the exit
status of the loop is non-zero, the shell seems to continue. With the
`|| false` at the end, it makes it exit on failure. I'm not sure exactly
how drone runs the commands so this may not be necessary but it seems
safer.

e.g.

    set -e
    for i in $(seq 10); do false && break; done
    echo hello

This will echo "hello" even though all invocations inside the loop
failed.

    set -e
    for i in $(seq 10); do false && break; done || false
    echo hello

This will not echo "hello" - `set -e` causes an exit before that command
due to the `|| false`.
@camscale camscale added backport no-changelog Indicates that a PR does not require a changelog entry labels Nov 16, 2023
@github-actions github-actions Bot requested a review from logand22 November 16, 2023 03:21
@camscale camscale added this pull request to the merge queue Nov 16, 2023
Merged via the queue into branch/v12 with commit a026c21 Nov 16, 2023
@camscale camscale deleted the camh/v12/retry-release-server branch November 16, 2023 06:53
This was referenced Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants