Added retry to submodule cloning
When using actions/checkout@v3 or v4 we experience intermittent failures on workflows cloning submodules. The failures result in following error: unable to access <SUBMODULE REPO URL>: gnutls_handshake() failed: Error in the pull function.
Our environment is primarily self hosted runners using the action_controller_runner,
Re-running the workflows failed steps resolves the issues every time we've tried it. This PR adds the same retry logic that is used with the normal fetch flow used by the actions/checkout action. I have verified this change resolves the intermittent failures and passes the format-check, lint, and test steps described in the test.yml workflow.
This would be a good addition as even pulling from GitHub on a GH runner can have intermittent failures that would resolve on a retry.
What more needs to be done with this PR to get it landed?
We have also occasional failures with submodule and it would be great if checkout can retry on submodules.