Skip to content
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

(GH-407) Support negative integers in manifest exitCodes #410

Conversation

michaeltlombardi
Copy link
Collaborator

PR Summary

This change:

  • Updates both the source and composed schemas to allow negative integers.
  • Updates the reference documentation to clarify that you must specify integers, that you can't use any alternate formats for those integers, and that the keys in YAML must be wrapped in quotes for parsing.
  • Addresses Extend exitCodes to support Hexidecimal error codes #407 by making the schema compliant with the implementation.

PR Context

Prior to this change, the JSON schema for the exitCodes property of resource manifests only supported positive integers as exit codes.

DSC itself supports negative integers as exit codes, and some apps return negative integers as exit codes for hexadecimal exit codes, like -2147024891 for 0x80070005, "Access denied."

Note

This PR builds on #397 and is blocked on that PR being reviewed and merged.

@michaeltlombardi michaeltlombardi force-pushed the gh-407/main/update-exit-code-schemas branch 2 times, most recently from 01b8fcf to 80fbd0e Compare April 18, 2024 18:13
@michaeltlombardi michaeltlombardi marked this pull request as ready for review April 18, 2024 18:13
Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion to make it a bit more clear in the manifest docs

Prior to this change, the JSON schema for the `exitCodes` property of
resource manifests only supported positive integers as exit codes.

DSC itself supports negative integers as exit codes, and some apps
return negative integers as exit codes for hexadecimal exit codes,
like `-2147024891` for `0x80070005`, "Access denied."

This change:

- Updates both the source and composed schemas to allow negative
  integers.
- Updates the reference documentation to clarify that you must specify
  integers, that you can't use any alternate formats for those integers,
  and that the keys in YAML must be wrapped in quotes for parsing.
- Addresses PowerShell#407 by making the schema compliant with the implementation.
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue May 2, 2024
Merged via the queue into PowerShell:main with commit 59a429a May 2, 2024
4 checks passed
@michaeltlombardi michaeltlombardi deleted the gh-407/main/update-exit-code-schemas branch May 7, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants