Closed jcubic closed 7 months ago
Interesting. We're using a hard-coded username and password/PAT trying to force push to ADO which is throwing a HTTP 401. https://github.com/isomorphic-git/isomorphic-git/blob/main/__tests__/test-hosting-providers.js#L85-L103
Did the PAT expire in ADO?
I have no idea what those are. Where can I check this? Will migration to GitHub action fix this?
It looks like we are using a username and password to authenticate to Azure DevOps in the test: https://github.com/isomorphic-git/isomorphic-git/blob/79a38e017653a4dfe3b93e390bf3ffa73db42e82/__tests__/test-hosting-providers.js#L66-L67
The authentication method was deprecated in 2020. https://learn.microsoft.com/en-us/azure/devops/repos/git/auth-overview?view=azure-devops#alternate-credentials
Azure DevOps no longer supports Alternate Credentials authentication since the beginning of March 2, 2020.
The authentication method was removed in January 2024: https://devblogs.microsoft.com/devops/azure-devops-will-no-longer-support-alternate-credentials-authentication/
This feature will be fully deprecated in January 2024.
The test analytics don't go back that far but it has been failing for the last 14 days. https://dev.azure.com/isomorphic-git/isomorphic-git/_test/analytics?definitionId=1&contextType=build
The solution is to change the authentication method for the test case.
--
Next steps:
--
To answer your two questions:
Where can I check this?
If we had a PAT set up, you could follow these docs: https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?toc=%2Fazure%2Fdevops%2Forganizations%2Ftoc.json&view=azure-devops&tabs=Windows
Will migration to GitHub action fix this?
No.
If this to test the git server, then maybe we can use Docker for this.
They look like integration tests that check we can fetch and push to real servers. I'd suggest we split them out as a separate npm test script, keep them in a separate folder, and only run them in CI between the unit tests and Sauce Labs.
I think that for now we need to disable those tests so we can merge open PR. We will think what to do with them when we migrate to GitHub actions.
I've disabled the test in #1879. If/when we get the GitHub Actions set up we get use this issue and get those tests back in.
We need to get out of this deadlock. @jcubic, if there is no way to fix this issue, can't we disable it for now in the whole repo? All other PR are blocked.
@seanpoulter can you maybe add a PR with those tests disabled on separated PR/branch. So we can merge right away? Just use cherry-pick on different branch.
PR is up
I think we can close this one.
Do you want to keep it open to fix it and update the authentication to use a PAT in CI?
Can you remind me what is PAT?
There are yet again some issue with CI/CD. The tests are failing, see this useless PR that change whitespace in README https://github.com/isomorphic-git/isomorphic-git/pull/1874