-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix: Checkout Issue in self hosted runner due to faulty submodule check-ins #1196
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
Changes from all commits
7f14f1d
39cfb84
d12863b
c8466ed
bb965fa
6b84265
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ export interface IGitCommandManager { | |
submoduleForeach(command: string, recursive: boolean): Promise<string> | ||
submoduleSync(recursive: boolean): Promise<void> | ||
submoduleUpdate(fetchDepth: number, recursive: boolean): Promise<void> | ||
submoduleStatus(): Promise<boolean> | ||
tagExists(pattern: string): Promise<boolean> | ||
tryClean(): Promise<boolean> | ||
tryConfigUnset(configKey: string, globalConfig?: boolean): Promise<boolean> | ||
|
@@ -357,6 +358,12 @@ class GitCommandManager { | |
await this.execGit(args) | ||
} | ||
|
||
async submoduleStatus(): Promise<boolean> { | ||
const output = await this.execGit(['submodule', 'status'], true) | ||
core.debug(output.stdout) | ||
return output.exitCode === 0 | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for more info on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I can tell (lots of googling and some experimentation with the What am I missing here? I'd like to see for myself a case where In other words, what's the easiest way to "corrupt" a submodule? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jww3 This can be recreated by cloning https://github.com/test-SKi/test-bad-module-clone & using checkout action with any self-hosted runner to see the failure. Steps to recreate one scenario:
|
||
async tagExists(pattern: string): Promise<boolean> { | ||
const output = await this.execGit(['tag', '--list', pattern]) | ||
return !!output.stdout.trim() | ||
|
Uh oh!
There was an error while loading. Please reload this page.