[devops] Report if tests on older macOS bots time out. - #14438
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Collaborator
rolfbjarne
marked this pull request as ready for review
March 22, 2022 19:56
Collaborator
Collaborator
chamons
approved these changes
Mar 23, 2022
mandel-macaque
approved these changes
Mar 23, 2022
mandel-macaque
left a comment
Contributor
There was a problem hiding this comment.
Two minor things that you can or not change.
| - pwsh: | | ||
| Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\GitHub.psm1 | ||
| $testsPath = "$(Build.SourcesDirectory)/artifacts/mac-test-package/tests" | ||
| if (-not ([IO.File]::Exists("$testsPath/test-run-completed"))) { |
Contributor
There was a problem hiding this comment.
There is a more pwsh way to do this:
if (-not (Test-Path -Path "$testsPath/test-run-completed" -PathType Leaf)) {Not that it does make a huge diff.
| $testsPath = "$(Build.SourcesDirectory)/artifacts/mac-test-package/tests" | ||
| if (-not ([IO.File]::Exists("$testsPath/test-run-completed"))) { | ||
| Set-GitHubStatus -Status "error" -Description "Tests timed out on macOS $Env:CONTEXT." -Context "$Env:CONTEXT" | ||
| $request = New-GitHubComment -Header "Tests timed out on macOS $Env:CONTEXT" -Description "" -Message "" -Emoji ":x:" |
Contributor
There was a problem hiding this comment.
Suggested change
| $request = New-GitHubComment -Header "Tests timed out on macOS $Env:CONTEXT" -Description "" -Message "" -Emoji ":x:" | |
| $request = New-GitHubComment -Header "Tests timed out on macOS $Env:CONTEXT" -Message "" -Emoji ":x:" |
Don't even pass description since you made the change for that in the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also relax the requirement for GitHub comments to have a description, since we don't need to say more than that it timed out.
This is how it ends up looking: #14438 (comment)