Skip to content

Fix GitDagBundle source link for SSH repos with .git in the name - #76949

Merged
ephraimbuddy merged 2 commits into
apache:mainfrom
harshthakur3:fix-git-bundle-view-url-ssh
Nov 18, 2026
Merged

ephraimbuddy merged 2 commits into
apache:mainfrom
harshthakur3:fix-git-bundle-view-url-ssh

Conversation

@harshthakur3

Copy link
Copy Markdown
Contributor

closes: #76948

GitDagBundle.view_url_template() converts an SSH repo_url such as git@github.com:org/repo.git into the https URL Airflow links to for a Dag's source: the Code tab, the Dag version details and the Dag bundles page in the UI, and bundle_url in the REST API. The conversion removed .git with str.replace, which drops it anywhere in the repository path instead of only as the suffix, so a repository whose name contains .git got a link to a repository that does not exist:

repo_url Link before Link after
git@github.com:apache/airflow.github.io.git https://github.com/apache/airflowhub.io/tree/{version} https://github.com/apache/airflow.github.io/tree/{version}

It now strips only a trailing .git, the way view_url_template() already treats HTTPS URLs. SSH URLs whose only .git is the suffix get the same link as before, and HTTPS URLs do not go through this conversion. Cloning is unaffected because it uses repo_url as given; only the link was wrong, and it has been wrong since the first git provider release.

The new test_view_url case fails on main with the airflowhub.io link and passes with this change.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Opus 5.5) following the guidelines

The SSH-to-https conversion behind the bundle's view URL removed ".git"
anywhere in the repository path, so the source link of a repository such
as org/org.github.io pointed to org/orghub.io, which does not exist.
@boring-cyborg

boring-cyborg Bot commented Nov 11, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@harshthakur3

Copy link
Copy Markdown
Contributor Author

Hey @ephraimbuddy, could you please take a look at this PR and review the changes when you get a chance? Thanks!

@ephraimbuddy
ephraimbuddy merged commit 3c0c6a7 into apache:main Nov 18, 2026
153 checks passed
@boring-cyborg

boring-cyborg Bot commented Nov 18, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitDagBundle source link drops .git from inside SSH repository names

2 participants