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

fix: GetBytes exception #785

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

tenthirtyam
Copy link
Collaborator

@tenthirtyam tenthirtyam commented Dec 17, 2024

Summary

Based on the way the function is authored, even though both -registerYaml and -configureYaml are marked as optional, the function actually requires both to work. And, if one is empty, then the GetBytes method throws an exception.

This pull request includes updates to the PowerValidatedSolutions module, focusing on enhancing the Add-SupervisorService function and updating the module version.

Enhancements to Add-SupervisorService function:

  • Changed the registerYaml parameter to mandatory, ensuring that it is always provided when the function is called.
  • Removed code that set default values for registerYaml and configureYaml parameters if they were not provided.
  • Added validation to check if the registerYaml file exists before proceeding with the registration process, and output an error if the file is not found.
  • Added validation to check if the configureYaml file exists before proceeding with the configuration process, and output an error if the file is not found.
  • Corrected a typo in the success message for the registration of the Supervisor Service.

Module version update:

  • Updated the ModuleVersion in PowerValidatedSolutions.psd1 from 2.12.0.1050 to 2.12.1.1002.

Type

  • Bugfix
  • Enhancement or Feature
  • Code Style or Formatting
  • Documentation
  • Refactoring
  • Chore
  • Other
    Please describe:

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Test and Documentation

  • Tests have been completed.
  • Documentation has been added or updated.

Issue References

Closes #763

Additional Information

Based on the way the function is authored, even though both -registerYaml and -configureYaml are marked as optional, the function actually requires both to work. And, if one is empty, then the GetBytes method throws an exception.

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam added the bug Bug label Dec 17, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Dec 17, 2024
@tenthirtyam tenthirtyam self-assigned this Dec 17, 2024
@github-actions github-actions bot added the needs-review Needs Review label Dec 17, 2024
@tenthirtyam tenthirtyam modified the milestones: Backlog, v2.12.1 Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug needs-review Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add-SupervisorService does not allow for services that do not need data yaml for registration
1 participant