-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
The Great Bug Bash of 2024 07! #2203
Merged
Merged
Conversation
This file contains 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
…ation client 🐛 (WorkItemMigrationContext.cs): replace exceptions with log errors and exit for better error handling Add handling for `TeamFoundationServerUnauthorizedException` to log an error and exit the application when unauthorized access is detected. This ensures that the application does not continue running with invalid permissions. Replace `throw` statements with `Log.LogError` and `Environment.Exit(-1)` in `WorkItemMigrationContext.cs` to provide clearer error messages and halt execution when critical configuration issues are detected. This change improves the robustness of the application by preventing it from running in an invalid state.
…🐛 (TfsWorkItemQuery.cs): add handling for ValidationException in GetWorkItemsFromQuery method Add a catch block for ValidationException to handle specific validation errors during the execution of the GetWorkItemsFromQuery method. This ensures that validation errors are logged and tracked correctly, and the application exits gracefully with an error code. This change improves error handling and provides better diagnostics for validation issues.
…kItemId field in target work item and log error if missing Ensure that the target work item contains the ReflectedWorkItemId field before proceeding. If the field is missing, log an error and exit the application. This change prevents potential runtime errors and ensures data integrity during the migration process.
…surements before iterating Add null checks to prevent potential null reference exceptions when properties or measurements are null. This ensures the application does not crash and handles the absence of these collections gracefully.
…ronment.Exit for critical errors Replace `throw ex` with `Environment.Exit(-1)` to ensure the application exits immediately on critical errors. This change prevents the application from continuing in an unstable state when essential conditions are not met, such as missing WorkItemTypes or PersonalAccessToken.
…better error tracking Include the project name and work item ID in the telemetry data to enhance error tracking and debugging. This provides more context when exceptions occur, making it easier to identify and resolve issues.
…t(-1) in error handling Replacing `throw` with `Environment.Exit(-1)` ensures that the application exits immediately when an error occurs while getting a work item. This change is made to prevent the application from continuing in an unstable state after encountering a critical error.
…rdize version retrieval ♻️ (TelemetryClientAdapter.cs): refactor version retrieval to use GetRunningVersion method Introduce a new method, GetRunningVersion, to standardize the retrieval of the application's version information. This method uses regex to parse the version string and returns a tuple containing the version, pre-release label, and formatted version string. Refactor existing code to use this new method, improving maintainability and consistency in version handling.
…revent potential uninitialized variable usage ♻️ (TelemetryClientAdapter.cs): remove redundant 'v' prefix from textVersion for consistency Initializing `WorkItem y` to null ensures that the variable is not used uninitialized, which can prevent potential runtime errors. Removing the redundant 'v' prefix from `textVersion` in `TelemetryClientAdapter.cs` aligns the version string format with standard versioning practices, improving consistency and readability.
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.
No description provided.