-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: Added diverse specs for User-defined types #1738
base: main
Are you sure you want to change the base?
Conversation
Dependend on #1737 |
@@ -20,7 +20,7 @@ tags: [ | |||
priority: 11010 | |||
--- | |||
|
|||
#### ID: BCPNFR1 - Category: Inputs - Data Types | |||
#### ID: BCPNFR1 - Category: Inputs - User-defined types - General |
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.
@AlexanderSehr, I know this is not here to be reviewed yet, but I want to add an important comment: be aware that if you change this title, it will start breaking legacy links that are still pointing to the specs present on the old shared and Bicep/TF specific pages. This is unavoidable, and I'm not saying you shouldn't rename an article if the name is off, but you need to be aware of this side effect.
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.
Hey @matebarabas,
thanks for the comment. 💪 The spec is actually absolutely here to be reviewed - but - is unfortunately dependent on this PR which is pending a review by @eriqua :)
In any case, you have a point - yet I'd argue the title should be changed to make more sense in the context of the other specs (which are about specific topics in the space of UDTs).
Also, sure this could break references (if they happen to exist), but personally I am strongly against prioritizing backward compatibility over usability/correctness. Just to explain the angle I'm coming from 😉
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.
So... can this comment be resolved, @matebarabas?
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.
Can any applicable link be updated via search and replace?
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.
Can any applicable link be updated via search and replace?
No, as the ones I was referring to are auto-generated based on the title. I agree to Alex's comment on not prioritizing backward compatibility if we feel something is just simply off. Feel free to resolve this.
So... can this comment be resolved, @matebarabas?
Yes please, that's what I was hoping to express by sending a thumb-up on your comment. :) I knew I should've been more explicit. :)
Ready to go @eriqua :) |
tags: [ | ||
Class-Resource, # MULTIPLE VALUES: this can be "Class-Resource" AND/OR "Class-Pattern" AND/OR "Class-Utility" | ||
Type-NonFunctional, # SINGLE VALUE: this can be "Type-Functional" OR "Type-NonFunctional" | ||
Category-Inputs/Outputs, # SINGLE VALUE: this can be "Category-Testing" OR "Category-Telemetry" OR "Category-Contribution/Support" OR "Category-Documentation" OR "Category-CodeStyle" OR "Category-Naming/Composition" OR "Category-Inputs/Outputs" OR "Category-Release/Publishing" Language-Bicep, # MULTIPLE VALUES: this can be "Language-Bicep" AND/OR "Language-Terraform" |
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.
Language-bicep tag looks commented out, please check
Persona-Owner, # MULTIPLE VALUES: this can be "Persona-Owner" AND/OR "Persona-Contributor" | ||
Persona-Contributor, # MULTIPLE VALUES: this can be "Persona-Owner" AND/OR "Persona-Contributor" | ||
Lifecycle-BAU, # SINGLE VALUE: this can be "Lifecycle-Initial" OR "Lifecycle-BAU" OR "Lifecycle-EOL" | ||
Validation-TBD # SINGLE VALUE: this can be "Validation-Manual" OR "Validation-CI/Informational" OR "CI/Enforced" |
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.
Can we use the right value for new specs? AFAIK the intention going forward is to assign the tacmg based on the current static validation situation, and update it every time we update static validation in BRM.
E.g., currently it should be Validation-Manual, since we don't have a static test. Once we add it, it should be updated to Validation-CI/Informational (if soft failure) or Enforced (if required)
Validation-TBD # SINGLE VALUE: this can be "Validation-Manual" OR "Validation-CI/Informational" OR "CI/Enforced" | |
Validation-Manual # SINGLE VALUE: this can be "Validation-Manual" OR "Validation-CI/Informational" OR "CI/Enforced" |
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.
This applies to all specs below
@@ -1,5 +1,5 @@ | |||
--- | |||
title: BCPNFR1 - Data Types | |||
title: BCPNFR1 - User-defined types - General |
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 this one should temporarily be a SHOULD and not a MUST
param subnets subnetsType | ||
type subnetsType = { ... }[]? | ||
``` | ||
the type should instead be defined like |
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.
the type should instead be defined like | |
the type should be defined like |
|
||
#### ID: BCPNFR21 - Category: User-defined types - Decorators | ||
|
||
Similar to [BCPNFR9](#id-bcpnfr9---category-inputs---decorators), User-defined types MUST implement certain [decorators](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/parameters#use-decorators), while they SHOULD others. |
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.
Not very clear. I'd suggest to divide into 2 paragraphs, covering the MUST and the SHOULD part
|
||
#### ID: BCPNFR9 - Category: Inputs - Decorators | ||
|
||
Input parameters MUST make use of certain [decorators](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/parameters#use-decorators), while they SHOULD make use of others whenever possible. |
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.
Same comment of the related for UDT
Decorators that SHOULD be implemented include but are not limited to `allowed`, `minValue`, `maxValue`, `minLength` & `maxLength` as they have a big impact on the module's usability. | ||
|
||
```bicep | ||
@desciption('My type''s description.') |
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.
@desciption('My type''s description.') | |
@description('My type''s description.') |
Class-Resource, # MULTIPLE VALUES: this can be "Class-Resource" AND/OR "Class-Pattern" AND/OR "Class-Utility" | ||
Class-Pattern, # MULTIPLE VALUES: this can be "Class-Resource" AND/OR "Class-Pattern" AND/OR "Class-Utility" | ||
Type-NonFunctional, # SINGLE VALUE: this can be "Type-Functional" OR "Type-NonFunctional" | ||
Category-Inputs/Outputs, # SINGLE VALUE: this can be "Category-Testing" OR "Category-Telemetry" OR "Category-Contribution/Support" OR "Category-Documentation" OR "Category-CodeStyle" OR "Category-Naming/Composition" OR "Category-Inputs/Outputs" OR "Category-Release/Publishing" |
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 getting confused between the title and this label. Should we add a label Category-UserDefinedTypes? Or are all falling into the Inputs/Outputs label?
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.
@eriqua, this is used to control under which section of the specs page in question (e.g. bicep res page) the given spec will show up. Introducing anything new would require the shortcode and the page structure to be updated, so I strongly recommend trying to categorize what we need under one of the existing categories. These could work imho:
- inputs/outputs
- naming/composition (because of the latter)
- codestyle
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.
Then I'm not sure of how useful categories are and I'm afraid we're locking ourselves into a process we ourselves enforced. Don't get me wrong but we are saying that adding a new label would be too complex and we prefer to enforce a different, not ideal one instead to overcome that complexity.
The fact that 3 different categories may apply for a single-valued label makes me wonder if we shouldn't rethink the category static approach. Looking forward to brainstorming that
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 I tried to write it in a way that at least one of the specs shows up on two pages by adding both tags. I think that worked :D If I'm not mistaken I did that because it was for inputs & naming
Description
New structure-aligned version of #1711
Added diverse specs for User-defined types: