kjh0623 commented on PR #70058: URL: https://github.com/apache/airflow/pull/70058#issuecomment-5018450339
Good catch — you're right, that's a real gap, not intended. The inner block catches everything and re-raises after `repo.close()` (so the handle doesn't leak), but the outer `except` only listed the three git errors, so a re-raised `OSError`/`PermissionError` from the checkout escapes instead of falling through to full initialization — exactly contradicting the "reuse it as-is, fall back if unusable" comment. And it matters most for the target use case here (ephemeral pods over shared bundle storage), where a filesystem hiccup on the on-disk repo is the likely failure. Fixed in 08b321e by broadening the outer `except` to `Exception`, so any unusable on-disk repo falls back to full initialization as documented. Falling back broadly is safe here because the fallback is the normal init path (a genuine problem would resurface there), and it's logged at info with the exception. `BaseException` (KeyboardInterrupt/SystemExit) is intentionally left to propagate. Happy to add a regression test that forces a non-git error on the reuse checkout and asserts the fallback, if you'd like it in this PR. -- 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]
