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

Avoid destructive language-repo origin updates #9413

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented Nov 21, 2024

I'm chasing a hidden GitProcessException in #9208 . I have a hunch that that combined with a failure to properly get the target repo is causing git to get into an irreconcilable state. When that happens, and git remote set runs, it escapes the <languagerepo>/.assets/sliceId/ folder because there isn't a real git repo initialized there.

when that occurs, and we still invoke git remote set-url, that'll override the language repo origin. @alzimmermsft this should at least reduce the impact when something goes wrong. I'm still chasing the real origin of it all though.

@scbedd scbedd changed the title need to ensure that the test-proxy can't destructively update a conta… Avoid destructive language-repo origin updates Nov 21, 2024
@scbedd scbedd self-assigned this Nov 21, 2024
@alzimmermsft
Copy link
Member

Just a random thought here given the popularity of using the remote name origin, have we thought about using something unique for the azure-sdk-assets remote? Something like assetsremoteorigin, or really anything else unique, so it doesn't accidentally clobber existing origin remotes?

@benbp
Copy link
Member

benbp commented Nov 21, 2024

@alzimmermsft I think that's a good idea, adding a little resilience (also makes it easier to realize if you're actually operating in the assets directory vs. the repo root when mucking around)

@benbp
Copy link
Member

benbp commented Nov 21, 2024

Thinking about it, adding handling to migrate existing asset clones to a new remote within the tool is arguably not worth it (though it would be a pretty small task).

@scbedd
Copy link
Member Author

scbedd commented Nov 22, 2024

Thinking about it, adding handling to migrate existing asset clones to a new remote within the tool is arguably not worth it (though it would be a pretty small task).

I think if we begin explicitly specifying an origin in all of the commands, we should be able to transition to using something not the default origin.

That being said once I understand #9208 (task for later today) I think this issue should either disappear or be seriously ameliorated.

@scbedd scbedd merged commit ee74cb1 into main Nov 22, 2024
16 checks passed
@scbedd scbedd deleted the handle-bad-origin branch November 22, 2024 18:15
@scbedd scbedd mentioned this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants