Add manifest validation and improve error handling#586
Merged
HarithaVattikuti merged 1 commit intoactions:mainfrom May 6, 2025
Merged
Add manifest validation and improve error handling#586HarithaVattikuti merged 1 commit intoactions:mainfrom
HarithaVattikuti merged 1 commit intoactions:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR improves the manifest validation logic and error handling in the installer module.
- Adds a type guard function (isIToolRelease) to validate manifest objects.
- Improves error handling in getManifest by providing a fallback mechanism to fetch the manifest via URL.
Comments suppressed due to low confidence (2)
src/installer.ts:308
- [nitpick] Consider enhancing the error message to include more context about the failure in manifest validation (e.g., indicating that the fetched manifest does not match the expected structure) to ease troubleshooting.
let errorMessage = 'An unexpected error occurred while fetching the manifest.';
src/installer.ts:278
- [nitpick] Consider renaming 'isIToolRelease' to 'isToolRelease' to better align with naming conventions that avoid prefixed 'I' when used in type guard function names, if consistent with the rest of the codebase.
function isIToolRelease(obj: any): obj is tc.IToolRelease {
aparnajyothi-y
approved these changes
Apr 25, 2025
mahabaleshwars
approved these changes
Apr 28, 2025
HarithaVattikuti
approved these changes
May 6, 2025
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.
Description:
This fix ensures proper validation of the manifest before processing and improves error handling by falling back to a secondary source for unexpected manifest structures.
Related issue:
#580
Check list: