kubeshop / testkube

☸️ Kubernetes-native testing framework for test execution and orchestration
https://testkube.io
Other
1.34k stars 132 forks source link

Git validation on test creation has false positives #3987

Open fivenp opened 1 year ago

fivenp commented 1 year ago

Describe the bug As a user I'm creating a test and referring to e.g. Microsoft's Git service. The inline validation does show me green checkmarks

image

But once I run the test I get a git related error.... image

Maybe this is related to Microsoft's Git implementation and sparse checkouts? Maybe there's something else to it?

There is also a second case where we do a non https:// uri and the backend validates this as successfull (the frontend validation only validates for https)

image
vsukhin commented 1 year ago

@fivenp So, when I check repo using api { "type": "git", "uri": "https://vlad.visualstudio.com", "branch": "main", "path": "test" } I receive { "type": "about:blank", "title": "Bad Gateway", "status": 502, "detail": "failed to validate repository: failed to fetch git: could not start process with command: git, exited with code:128 error: exit status 128\noutput: Cloning into 'repo'...\nfatal: unable to update url base from redirection:\n asked for: https://vlad.visualstudio.com/info/refs?service=git-upload-pack\n redirect: https://spsprodweu2.vssps.visualstudio.com/_signin?realm=vlad.visualstudio.com&reply_to=https%3A%2F%2Fvlad.visualstudio.com%2Finfo%2Frefs%3Fservice%3Dgit-upload-pack&redirect=1&hid=10886eac-ee32-4259-a0f8-fd1a857ac6cb&context=eyJodCI6MiwiaGlkIjoiYTI0YzZkMDktZmQxYy00OWFmLTk4ZmItYzc2NjJlODA3YjgyIiwicXMiOnt9LCJyciI6IiIsInZoIjoiIiwiY3YiOiIiLCJjcyI6IiJ90#ctx=eyJTaWduSW5Db29raWVEb21haW5zIjpbImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSIsImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSJdfQ2\n, context: null" }

for this repo { "type": "git", "uri": "http://github.com/kubeshop/testkube", "branch": "main", "path": "test"

} it returns 204