Improved task handler diagnostics #5442
Open
jessehouwing wants to merge 1 commit intomicrosoft:masterfrom
Open
Improved task handler diagnostics #5442jessehouwing wants to merge 1 commit intomicrosoft:masterfrom
jessehouwing wants to merge 1 commit intomicrosoft:masterfrom
Conversation
- Added detailed diagnostics for handler selection failures in TaskRunner.cs, including self-hosted agent checks and specific error messages. - Introduced HandlerDiagnostics class to analyze task.json handlers against loaded execution data, providing comprehensive reasons for handler incompatibility. - Updated strings.json with new error messages related to handler compatibility and potential solutions for users. - Implemented unit tests for HandlerDiagnostics to ensure accurate reporting of handler compatibility issues across various scenarios, including OS incompatibility, deprecated handlers, and unknown future handlers.
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.
Enhancements to handler diagnostics improve task execution compatibility, addressing user challenges with handler selection failures.
This pull request is an approach to fix the error message when no suitable task handler is found. There are still a few things that can be improved, as the list of possible handlers, deprecated handlers etc is currently hardcoded as I couldn't find an easy way to lift that info from the agent's memory.
Description
Introduce detailed diagnostics for handler selection failures, including a new HandlerDiagnostics class for analyzing task.json handlers. Update error messages and implement unit tests to ensure accurate reporting of compatibility issues.
Risk Assessment (Medium)
Changes involve new diagnostics and error handling, which may affect task execution paths but are designed to enhance user experience.
Unit Tests Added or Updated (Yes)
Unit tests for HandlerDiagnostics were implemented to verify compatibility reporting.
Additional Testing Performed
Automated tests were conducted to validate the accuracy of handler diagnostics across various scenarios.
Change Behind Feature Flag (No)
This change is integral to task execution and does not warrant a feature flag.
Tech Design / Approach
Design considerations for the HandlerDiagnostics class and error messaging were reviewed to ensure clarity and usability.
Documentation Changes Required (Yes)
Documentation will need updates to reflect new error messages and handler diagnostics features.
Logging Added/Updated (Yes)
Log statements were added to capture handler selection failures and diagnostics.
Telemetry Added/Updated (No)
No new telemetry was introduced in this update.
Rollback Scenario and Process (Yes)
A rollback plan is documented in case of unforeseen issues.
Dependency Impact Assessed and Regression Tested (Yes)
All impacted modules were analyzed, confirming no breakage of existing functionality.