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

feat: Added diverse specs for User-defined types #1738

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

AlexanderSehr
Copy link
Contributor

@AlexanderSehr AlexanderSehr commented Nov 27, 2024

Description

New structure-aligned version of #1711

Added diverse specs for User-defined types:

  • BCPNFR9 - Category: Inputs - Decorators
  • BCPNFR18 - Category: User-defined types - Specification
  • BCPNFR19 - Category: User-defined types - Naming
  • BCPNFR20 - Category: User-defined types - Export
  • BCPNFR21 - Category: User-defined types - Decorators
  • BCPRMNFR2 - Category: User-defined types - AVM-Common-Types

@AlexanderSehr
Copy link
Contributor Author

Dependend on #1737

@AlexanderSehr AlexanderSehr requested a review from eriqua November 28, 2024 20:26
@AlexanderSehr AlexanderSehr marked this pull request as ready for review December 11, 2024 22:19
@AlexanderSehr AlexanderSehr enabled auto-merge (squash) December 11, 2024 22:19
@AlexanderSehr
Copy link
Contributor Author

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"
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is by design as it is part of the comment. Hence also all the other key-words

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the comment it says 'Single value' and the one that was chosen was Category-Input/Outputs

@@ -1,5 +1,5 @@
---
title: BCPNFR1 - Data Types
title: BCPNFR1 - User-defined types - General
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we have temporary specs? :D I phrased it in the way I did with the perspective of 'how it should be' or what we know what 1.0 will be. I understand why you want to SHOULD, but I guess I wasn't aware we're writing specs in this way (but instead don't enforce them all before 1.0)


#### 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.
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Please let me know what you think :)


#### 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.
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also updated. Please let me know what you think :)

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"
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

@eriqua eriqua Dec 12, 2024

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

Copy link
Contributor Author

@AlexanderSehr AlexanderSehr Dec 12, 2024

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.
Would be nice if that's the way it worked. Then a spec could show up in every list it makes sense in.

@AlexanderSehr AlexanderSehr requested a review from eriqua December 20, 2024 20:24
@AlexanderSehr
Copy link
Contributor Author

Linked to Azure/bicep-registry-modules#4098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment