Skip to content

Only capture logcat on failure - #475

Open
aurimasc wants to merge 1 commit into
masterfrom
android-logs-on-failure
Open

aurimasc wants to merge 1 commit into
masterfrom
android-logs-on-failure

Conversation

@aurimasc

Copy link
Copy Markdown
Collaborator

There have been multiple instances lately where capturing logcat gets stuck.
As a mitigation, capture logcat only if execution fails. If all tests are successful, skip it.

@aurimasc
aurimasc requested a review from todi1856 September 18, 2026 10:59

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

The change gates Android log collection on Yamato’s command-block result while preserving the existing log destination and artifact collection behavior; I examined the batch control flow, invocation context, and failure paths.

Reviewed commit fbc5476

🤖 Helpful? 👍/👎

@todi1856 todi1856 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I don't think it's good idea. In case of failure, you sometimes want to compare failed logcat against succesful logcat, thus is important to have logcat even in succesful builds too.

@todi1856

Copy link
Copy Markdown
Member

p.s did you consider clearing logcat before test run, that would make the log smaller, and might be the reason why it sometimes gets stuck

@aurimasc

Copy link
Copy Markdown
Collaborator Author

Honestly I don't think it's good idea. In case of failure, you sometimes want to compare failed logcat against succesful logcat, thus is important to have logcat even in succesful builds too.

The problem is that the fail rate is unacceptably high. Something like every other PR has at least one failure due to this.
During last 10 days I found 4 failures for this reason, none of the PRs had any Android changes:
https://yamato.ds.unity3d.com/job/75460576/logs/execution
https://yamato.ds.unity3d.com/job/75511999/logs/execution
https://yamato.ds.unity3d.com/job/75029231/logs/execution
https://yamato.ds.unity3d.com/job/74990540/logs/execution

@todi1856

Copy link
Copy Markdown
Member

I cannot stop you from pushing such change, but in my opinion this is wrong, at the very least try clearing the logcat before test run, maybe it's simple as that for fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants