Skip to content

Commit

Permalink
{doc} Add breaking change rule doc (Azure#26779)
Browse files Browse the repository at this point in the history
* add breaking change rule doc
  • Loading branch information
AllyW authored Jul 7, 2023
1 parent 8235008 commit 32ab698
Show file tree
Hide file tree
Showing 12 changed files with 766 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/breaking_change_rules/1001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### 1001 - Cmd Added

**Description**: Checks whether a new cmd is added from the previous cli version.

**Analysis**: This is considered an additive change in new cli version.

**Example**: Cmd `az monitor diagnostic-setting list` is being added in new cli version.

#### Before
> + az (command root)
> + monitor (group)
> + diagnostic-setting (sub-group)
> + create
> + delete
> + update
> + show
>
#### After
> + az (command root)
> + monitor (group)
> + diagnostic-setting (sub-group)
> + create
> + delete
> + update
> + show
> + list
>
28 changes: 28 additions & 0 deletions doc/breaking_change_rules/1002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### 1002 - Cmd Removed

**Description**: Checks whether an existing cmd is removed from the previous cli version.

**Analysis**: This is considered a breaking change because it may influence users' current workflow. This change requires to be released during breaking-change window.

**Example**: Cmd `az monitor diagnostic-setting show` is being removed during non-breaking-change window.

#### Before
> + az (command root)
> + monitor (group)
> + diagnostic-setting (sub-group)
> + create
> + delete
> + list
> + update
> + show
>
#### After
> + az (command root)
> + monitor (group)
> + diagnostic-setting (sub-group)
> + create
> + delete
> + list
> + update
>
97 changes: 97 additions & 0 deletions doc/breaking_change_rules/1003.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
### 1003 - Cmd Property Added

**Description**: Checks whether a new property is configured to a cmd from the previous cli version.

**Analysis**: Not all newly configured properties for a cmd are considered breaking changes. The properties listed in CMD_PROPERTY_ADD_BREAK_LIST below are thought to influence or interrupt current workflow and be breaking changes.
* CMD_PROPERTY_ADD_BREAK_LIST = ["confirmation"]

**Example**: In new cli version, `confirmation` is being added to cmd `az monitor private-link-scope scoped-resource delete` which caused corrupt workflows.

#### Before
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"is_aaz": false,
"is_preview": true,
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```

#### After
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"is_aaz": false,
"confirmation": true,
"is_preview": true,
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```
94 changes: 94 additions & 0 deletions doc/breaking_change_rules/1004.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
### 1004 - Cmd Property Removed

**Description**: Checks whether an existing property of a cmd is removed from the previous cli version.

**Analysis**: Not all configured properties removed from a cmd are considered breaking changes. The properties listed in CMD_PROPERTY_REMOVE_BREAK_LIST below are thought to influence or interrupt current workflow and be breaking changes.
For now, removed properties in cmd level does not break workflow.
* CMD_PROPERTY_REMOVE_BREAK_LIST = []

**Example**: In new cli version, cmd `az monitor diagnostic-setting delete` is changed from `is_preview` to stable, which does not disrupt users' actions.

#### Before
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"is_preview": true,
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```

#### After
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```
95 changes: 95 additions & 0 deletions doc/breaking_change_rules/1005.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
### 1005 - Cmd Property Updated

**Description**: Checks whether a cmd's property value is updated from the previous cli version.

**Analysis**: Not all configured properties updated for a cmd are considered breaking changes. The properties listed in CMD_PROPERTY_UPDATE_BREAK_LIST below are thought to influence or interrupt current workflow and be breaking changes.
For now, updated properties in cmd level does not break workflow.
* CMD_PROPERTY_UPDATE_BREAK_LIST = []

**Example**: In new cli version, cmd `az monitor diagnostic-setting delete` is changed from `is_aaz=false` to `is_aaz=true` after migration, which does not disrupt users' actions.

#### Before
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"is_aaz": false,
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```

#### After
```json5
{
"module_name": "monitor",
"name": "az",
"commands": {},
"sub_groups": {
"monitor": {
"name": "monitor",
"commands": {},
"sub_groups": {
"monitor private-link-scope": {
"name": "monitor private-link-scope",
"commands": {},
"sub_groups": {
"monitor private-link-scope scoped-resource": {
"name": "monitor private-link-scope scoped-resource",
"commands": {
"monitor private-link-scope scoped-resource delete": {
"name": "monitor private-link-scope scoped-resource delete",
"is_aaz": true,
"parameters": [
{
"name": "resource_group_name",
"options": ["--resource-group", "-g"],
"required": true,
"id_part": "resource_group"
}
...
...
]
}
}
}
}
}
}
},
...
}
}
```
Loading

0 comments on commit 32ab698

Please sign in to comment.