jedcunningham commented on code in PR #73878:
URL: https://github.com/apache/airflow/pull/73878#discussion_r4135196939


##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -289,7 +289,11 @@ def _clone_repo_if_required(self) -> None:
 
     @retry(
         retry=retry_if_exception_type((InvalidGitRepositoryError, 
GitCommandError)),
-        stop=stop_after_attempt(2),
+        # GitHub rejects a just-issued App installation token with "Repository 
not found" for a
+        # few seconds. Back off between attempts so one lands after the token 
has propagated,
+        # instead of failing the task on an immediate second attempt.
+        stop=stop_after_attempt(5),
+        wait=wait_exponential(multiplier=2, max=15),

Review Comment:
   I wonder if we should detect this type of token and sleep a bit instead of 
knowing it'll fail the first time or 2? Then we could keep a 2 or 3 retry and 
have them be more meaningful, and avoid having to make it configurable?



-- 
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]

Reply via email to