<#335 [Feature] Add task git repo host uri when de...
# flyte-github
a
#335 [Feature] Add task git repo host uri when deploying task Pull request opened by popojk ## Changes We will store flyte task git repo host url in the backend when sending a deploy request request to the run service. The url will be respond in the GetTaskDetails api. How the url is defined: 1. If task code file is under git repo and the git tree is clean, the url will be suffixed with line number. 2. If task code file is under git repo and the git tree is not clean, the url will only points to the code file in remote repo. 3. If task code file is not under git repo, the url will not be sent to the backend. 4. The SDK will choose origin as default remote. If origin remote does not exist, the SDK will sort remotes alphabetically and choose the first one. ## Tests Git operation is related to local environment, which is not proper for unit tests. Thus, in this PR we test it manually ### Github remote project test: deploy a project with github remotes, we expect that the github link url should be the one linked to remote "origin" [截圖 2025-12-04 上午10 40 31](https://private-user-images.githubusercontent.com/66259759/522192586-574f0886-24da-45ce-978f-3882af4b2d3b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjUxODI2NjEsIm5iZiI6MTc2NTE4MjM2MSwicGF0aCI6Ii82NjI1OTc1OS81MjIxOTI1ODYtNTc0ZjA4ODYtMjRkYS00NWNlLTk3OGYtMzg4MmFmNGIyZDNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjA4VDA4MjYwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5MzRjNDQ2MWU2YjZkZjc1YmI2M2M1NjQwZDA1MDE1ZWMzZTZiYjgxYmFhYjlkZmQ2YzgxNjU1ZDQ5MGNmN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0._we3IENa3tROJLU86VgFiE-a3Ogk5XsnXhueCz-vbZ8) The github link url is stored in the backend and respond by GetTaskDetails api [截圖 2025-12-04 上午10 43 25](https://private-user-images.githubusercontent.com/66259759/522193678-9a0404c7-ab00-49ad-88de-41b59ad9b6b3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjUxODI2NjEsIm5iZiI6MTc2NTE4MjM2MSwicGF0aCI6Ii82NjI1OTc1OS81MjIxOTM2NzgtOWEwNDA0YzctYWIwMC00OWFkLTg4ZGUtNDFiNTlhZDliNmIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjA4VDA4MjYwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2NjExYmQ3NjAzMTE1ZjIzMTcxNzk0ZGVmNGE4MDE2ZjlhNzg4NTM5ZWRhNDljOTE3MzQ3MzczNzVkZDRlZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1dOjrbIEk8nU7Q8AKo1I1XyROWdtKgBEnUb3_kr65F4) The link can navigate us to the remote repo with right file and right line of code [截圖 2025-12-04 上午10 44 26](https://private-user-images.githubusercontent.com/66259759/522194459-7465cbc5-4c9c-461e-a280-f8a29728e21e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjUxODI2NjEsIm5iZiI6MTc2NTE4MjM2MSwicGF0aCI6Ii82NjI1OTc1OS81MjIxOTQ0NTktNzQ2NWNiYzUtNGM5Yy00NjFlLWEyODAtZjhhMjk3MjhlMjFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjA4VDA4MjYwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwYTc0ZTQ4ZGJiNDhhYTkyYTVkMzBiZDYwMTU5ODI3YmJiMmQ4MzdiMTMwMWZlNzkzZGRjNjRhMTM5NWRhMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EqwQDpPphAAfyZLgp9QiEd_K-YuUcpuQOJ7AoUoBvI4) ### Gitlab remote project test: deploy a project with gitlab remotes [截圖 2025-12-04 上午10 47 47](https://private-user-images.githubusercontent.com/66259759/522195461-a7113046-6cc3-4abc-a4c0-2adc7fab2fa4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjUxODI2NjEsIm5iZiI6MTc2NTE4MjM2MSwicGF0aCI6Ii82NjI1OTc1OS81MjIxOTU0NjEtYTcxMTMwNDYtNmNjMy00YWJjLWE0YzAtMmFkYzdmYWIyZmE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjA4VDA4MjYwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzNzRjYTZiZGRjOTM3N2Q2MDY1NzI4NjI5NTdlYWNiMDUwNmFmMzEyNzQzNGRhMWNjYjg2NDQ3ZDJmMDA5ZTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6dYAx8eqgfwlctJ7SmB2CPdCmGgDzwugBNG92G594yU) The gitlab link will navigate us to to the remote repo with right file and right line of code <https://private-user-images.githubusercontent.com/66259759/522203047-dec1b0d2-06f3-43da-8bc1-442ab39b8b6f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjUxODI2NjEsIm5iZiI6MTc2NTE4MjM2MSwicGF0aCI6Ii82NjI1OTc1OS81MjIyMDMwNDctZGVjMWIwZDItMDZmMy00M2RhLT… flyteorg/flyte-sdk