Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address infinite loop in gitprocessexception while invoking push #9208

Open
scbedd opened this issue Oct 17, 2024 · 0 comments
Open

Address infinite loop in gitprocessexception while invoking push #9208

scbedd opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
Asset-Sync Any issues relating to moving test assets out of repos.

Comments

@scbedd
Copy link
Member

scbedd commented Oct 17, 2024

@skadhiresan reported a very interesting issue where the test-proxy entered an infinite loop of retrying the git push command before erroring. Looking something like [1].

On running the failing push command with debug mode enabled, the issue became apparent:

PS C:\Users\skadhiresan\source\repos\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources> test-proxy push -a ./assets.json
Running proxy version is Azure.Sdk.Tools.TestProxy 20240919.1
git --version
StdOut: git version 2.47.0.windows.1
 
StdErr:
ExitCode: 0
git remote -v
StdOut: origin  https://github.com/skadhiresan/azure-sdk-for-net.git (fetch)
origin  https://github.com/skadhiresan/azure-sdk-for-net.git (push)
 
StdErr:
ExitCode: 0
git remote set-url origin https://github.com/Azure/azure-sdk-assets
StdOut:
StdErr: fatal: detected dubious ownership in repository at 'C:/Users/skadhiresan/source/repos/azure-sdk-for-net/.assets/sztCmI9VWt'
'C:/Users/skadhiresan/source/repos/azure-sdk-for-net/.assets/sztCmI9VWt' is owned by:
        BUILTIN/Administrators (S-1-5-32-544)
but the current user is:
        REDMOND/skadhiresan (S-1-12-1-2625456001-1339269914-2951898773-3550298200)
To add an exception for this directory, call:
 
        git config --global --add safe.directory C:/Users/skadhiresan/source/repos/azure-sdk-for-net/.assets/sztCmI9VWt
 
ExitCode: 128
Exception of type 'Azure.Sdk.Tools.TestProxy.Common.Exceptions.GitProcessException' was thrown.
Unhandled exception:
PS C:\Users\skadhiresan\source\repos\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources>

We checked that this issue disappeared if we ran the test-proxy push from the same elevated command prompt. It worked flawlesslyl. This proves to me that it's a permissions issue. The real problem is that the proxy is hiding these file permissions error behind a wall of exception output.

This issue covers addressing the infinite loop so that the exception can dump out immediately.

[1]
Image
Image

@scbedd scbedd added the Asset-Sync Any issues relating to moving test assets out of repos. label Oct 17, 2024
@scbedd scbedd self-assigned this Oct 17, 2024
@scbedd scbedd changed the title Address Loop in gitprocessexception while invoking push Address infinite loop in gitprocessexception while invoking push Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Asset-Sync Any issues relating to moving test assets out of repos.
Projects
Status: 🤔 Triage
Development

No branches or pull requests

1 participant