-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[runtime-diagnostics] Publish test dumps on failure #124821
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -107,6 +107,20 @@ extends: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildConfiguration: $(_BuildConfig) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continueOnError: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| condition: always() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: PublishPipelineArtifact@1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| targetPath: '$(Build.SourcesDirectory)/artifacts/tmp/$(_BuildConfig)/dumps' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| artifactName: 'Dumps_cDAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| displayName: 'Publish Crash Dumps' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continueOnError: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| condition: failed() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: PublishPipelineArtifact@1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| artifactName: 'TestResults_cDAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| displayName: 'Publish Test Results and SOS Logs' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continueOnError: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| condition: failed() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+116
to
+123
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| condition: failed() | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_cDAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: failed() | |
| condition: or(failed(), eq(variables['Agent.JobStatus'], 'SucceededWithIssues')) | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_cDAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: or(failed(), eq(variables['Agent.JobStatus'], 'SucceededWithIssues')) |
Copilot
AI
Feb 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, condition: failed() can skip artifact publication when the job ends SucceededWithIssues due to continueOnError. If publishing logs/results is intended for any failure/issue, update the condition to also match SucceededWithIssues.
| condition: failed() | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_DAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: failed() | |
| condition: or(failed(), eq(variables['Agent.JobStatus'], 'SucceededWithIssues')) | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_DAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: or(failed(), eq(variables['Agent.JobStatus'], 'SucceededWithIssues')) |
Copilot
AI
Feb 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition: failed() may not trigger when the job result is SucceededWithIssues (e.g., test failures reported by PublishTestResults@2 with continueOnError: true). If you want dumps on any test failure, include SucceededWithIssues in the condition (e.g., in(variables['Agent.JobStatus'], 'Failed', 'SucceededWithIssues')).
| condition: failed() | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_DAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: failed() | |
| condition: in(variables['Agent.JobStatus'], 'Failed', 'SucceededWithIssues') | |
| - task: PublishPipelineArtifact@1 | |
| inputs: | |
| targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults' | |
| artifactName: 'TestResults_DAC_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)' | |
| displayName: 'Publish Test Results and SOS Logs' | |
| continueOnError: true | |
| condition: in(variables['Agent.JobStatus'], 'Failed', 'SucceededWithIssues') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition: failed()likely won’t run when tests fail but the job ends asSucceededWithIssues(e.g.,PublishTestResults@2hascontinueOnError: true). Consider using a condition that also matchesAgent.JobStatus == 'SucceededWithIssues'(e.g.,in(variables['Agent.JobStatus'], 'Failed', 'SucceededWithIssues')) so dumps get published on test failures as well.