Skip to content

Stopped CRD apply retrying from allowing silent failures

James Fargher requested to merge not_silent_retry_failure into master

What does this MR do?

#33186 (closed)

Thanks to @DylanGriffith for figuring this out #28033 (comment 229063958)

Previously retry would not return a non-zero exit code:

$ for i in $(seq 1 5); do false && break; sleep 1s; echo "Retrying ($i)..."; done
Retrying (1)...
Retrying (2)...
Retrying (3)...
Retrying (4)...
Retrying (5)...
$ echo $?
0

But with the following modification it will:

$ for i in $(seq 1 5); do false && break; sleep 1s; echo "Retrying ($i)..."; false; done
Retrying (1)...
Retrying (2)...
Retrying (3)...
Retrying (4)...
Retrying (5)...
Exit 1
$ echo $?
1

Happy case:

$ for i in $(seq 1 5); do true && break; sleep 1s; echo "Retrying ($i)..."; false; done
$ echo $?
0

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports