-
Notifications
You must be signed in to change notification settings - Fork 32
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
(DOCS) Document new and changed config functions #391
(DOCS) Document new and changed config functions #391
Conversation
|
||
## Synopsis | ||
|
||
Returns an integer from an input string or non-integer number. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if int()
needs to be capable of converting from a non-integer number, as https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-numeric#int specifies the input as string
or int
(...though I can't really think of a use case for calling int()
with an int
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's some value in getting return data from a resource like 1.3
and converting it to 1
, but I don't fully disagree with you.
It's also worth noting that, right now, converting a number with a fractional part to an integer with this configuration function is broken - see #390 for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking this over again, I think we should do one of the following:
- Allow the function to convert numbers with fractional parts to integers, and fix the implementation.
- Raise an error when the input to the function isn't a string or integer, indicating that only those two data types are supported.
I'm fine to update the docs in this PR to limit the input to a string or integer, but if DSC doesn't raise an error for other data types users can end up in a weird position. I would prefer the utility of handling strings and numbers (with and without fractional parts), but I understand if we're trying to maintain strict equivalence with the ARM template functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaeltlombardi can you open an issue to track this?
be31763
to
2f433ac
Compare
3f4692f
to
cfaac4b
Compare
This change adds reference documentation and changelog entries for the new and updated configuration functions in DSC. It also: - Defines a few helper snippets for docs authoring, scoped to the Markdown files in the repository. - Adds maintainer comments to the changelog for using the snippets and for updating the changelog, particularly around releases.
cfaac4b
to
5a7f48d
Compare
PR Summary
This change adds reference documentation and changelog entries for the new and updated configuration functions in DSC.
It also:
PR Context
Prepare for next release.