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

Disable or configure verbose rsync #11

Closed
jonahbeckford opened this issue Jun 6, 2022 · 3 comments
Closed

Disable or configure verbose rsync #11

jonahbeckford opened this issue Jun 6, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@jonahbeckford
Copy link

Thank you for your project!

I have a feature request. I would like to have rsync verbose mode (-v) turned off by default or by configuration.

The verbose option is added here:

action/src/action/action.ts

Lines 221 to 240 in cad4964

private async syncFiles(
ipAddress: string,
...excludePaths: string[]
): Promise<void> {
core.debug(`Syncing files to VM, excluding: ${excludePaths}`)
// prettier-ignore
await exec.exec('rsync', [
'-auvzrtopg',
'--exclude', '_actions/cross-platform-actions/action',
...flatMap(excludePaths, p => ['--exclude', p]),
`${this.workDirectory}/`,
`runner@${ipAddress}:work`
])
}
private async syncBack(ipAddress: string): Promise<void> {
core.info('Syncing back files')
// prettier-ignore
await exec.exec('rsync', [
'-uvzrtopg',

With my project I have 16,000 verbose lines added at the beginning of the step. Here is an example (look at the "Test in VirtualBox" step:

https://github.com/diskuv/dkml-c-probe/actions/runs/2449053587

In the example you will see openbsd 6.9 disabled because the VirtualBox OpenBSD 6.9 image is missing some important syspatches. That problem is not part of this issue

@jacob-carlborg
Copy link
Contributor

Sounds reasonable. I can add the -v flag only in debug mode.

@jacob-carlborg jacob-carlborg added the enhancement New feature or request label Jun 6, 2022
@jacob-carlborg
Copy link
Contributor

You need to update to version 0.6.1.

jonahbeckford pushed a commit to diskuv/dkml-c-probe that referenced this issue Jul 4, 2022
@jonahbeckford
Copy link
Author

I tried v0.6.1 and it now only works if I have debug mode enabled:

Syncing back files
/usr/bin/rsync -uzrtopg  runner@192.168.64.2:work/ /Users/runner/work
rsync: link_stat "/Users/runner/work/dkml-c-probe/dkml-c-probe/runner@192.168.64.2:work/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Terminating VM
/usr/bin/sudo kill -s TERM 1469

I think it is because with an empty syncVerboseFlag:

action/src/action/action.ts

Lines 225 to 227 in 52ad2be

private get syncVerboseFlag(): string {
return core.isDebug() ? '-v' : ''
}

in

action/src/action/action.ts

Lines 235 to 242 in 52ad2be

await exec.exec('rsync', [
'-auzrtopg',
this.syncVerboseFlag,
'--exclude', '_actions/cross-platform-actions/action',
...flatMap(excludePaths, p => ['--exclude', p]),
`${this.workDirectory}/`,
`runner@${ipAddress}:work`
])

you would get the second argument (this.syncVerboseFlag) as an empty string.

rsync will see the empty string and try to sync that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants