Repository navigation
Fix malformed GitDagBundle error message for missing repository path - #70622
Conversation
adcddb6 to
9942768
Compare
|
Good catch — this is a real bug. One thing before this goes in. The project is actively reducing direct except NoSuchPathError as e:
# Protection should the bare repo be removed manually
raise FileNotFoundError(f"Repository path: {self.bare_repo_path} not found") from eThe same method already does this a few lines above, so it stays consistent with its neighbours: raise RuntimeError("Error cloning repository") from e
raise RuntimeError(f"Invalid git repository at {self.bare_repo_path}") from eTwo follow-on edits if you take it:
Happy to merge once that's in. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Thank you for the review! Applied all three changes. |
|
@WonYong-Jang could you resolve a conflicts? |
1c077c2 to
e0271a7
Compare
|
d463c82 to
da02c99
Compare
The error message shown when the repository path is missing was broken.
In
GitDagBundle._clone_repo_if_required, the code was:This looks like it should put the path where
%sis, butAirflowExceptiondoes not do that.When you pass the message and the value as two separate arguments, python just keeps both of them, so the error came out as:
instead of a clear message.
The fix uses an f-string, which puts the path into the text directly. Now the message reads:
There was also a test that checked for the old, broken text, so it was passing even though the code was wrong. The test now checks for the correct message.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.