[v12] Added release server publishing retry#34644
Merged
camscale merged 1 commit intobranch/v12from Nov 16, 2023
Merged
Conversation
* 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`.
r0mant
approved these changes
Nov 16, 2023
tcsc
approved these changes
Nov 16, 2023
This was referenced Nov 16, 2023
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the drone generation to use a loop to run the
auto_publishrelcli command instead of listing them one-by-one and loop 10 times
instead of 3. The loop will terminate the first time
relclisucceeds.The loop has an
|| falseat the end to ensure the loop command failsif all invocations of
relclifail. Withset -e, even though the exitstatus of the loop is non-zero, the shell seems to continue. With the
|| falseat the end, it makes it exit on failure. I'm not sure exactlyhow drone runs the commands so this may not be necessary but it seems
safer.
e.g.
This will echo "hello" even though all invocations inside the loop
failed.
This will not echo "hello" -
set -ecauses an exit before that commanddue to the
|| false.Backport: #34605