Skip to content

[Az.ContainerRegistry] fix parameter type for update-azcontainerregistryrepository #17984

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

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ContainerRegistry/ContainerRegistry/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
- Additional information about change #1
-->
## Upcoming Release
* Updated parameter types from bool to bool? for `Update-AzContainerRegistryRepository` [#17857]
- `ReadEnabled`
- `ListEnabled`
- `WriteEnabled`
- `DeleteEnabled`

## Version 2.2.3
* Fixed username and password issue in `Import-AzContainerRegistryImage` [#14971]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ public class UpdateAzureContainerRegistryRepository : ContainerRegistryDataPlane

[Parameter(Mandatory = false, HelpMessage = "Delete enable.")]
[ValidateNotNullOrEmpty]
public bool DeleteEnabled { get; set; }
public bool? DeleteEnabled { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

No idea why this breaking change was not detected, it causes other PR's CI failed. Could you have a look? @wyunchi-ms @VeryEarly

Copy link
Member

Choose a reason for hiding this comment

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

Given that the breaking changes were not detected, and the CI ran suspeciously fast (azure-powershell - powershell-core
succeeded on 26 Apr in 17m 28s), I guess it was caused by the throtling of GitHub API, causing CI unable to get the list of changed files, so some of the steps were skipped.


[Parameter(Mandatory = false, HelpMessage = "Write enable.")]
[ValidateNotNullOrEmpty]
public bool WriteEnabled { get; set; }
public bool? WriteEnabled { get; set; }

[Parameter(Mandatory = false, HelpMessage = "List enable.")]
[ValidateNotNullOrEmpty]
public bool ListEnabled { get; set; }
public bool? ListEnabled { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Read enable.")]
[ValidateNotNullOrEmpty]
public bool ReadEnabled { get; set; }
public bool? ReadEnabled { get; set; }

public override void ExecuteChildCmdlet()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Accept wildcard characters: False
Delete enable.

```yaml
Type: System.Boolean
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:

Expand All @@ -76,7 +76,7 @@ Accept wildcard characters: False
List enable.

```yaml
Type: System.Boolean
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -106,7 +106,7 @@ Accept wildcard characters: False
Read enable.

```yaml
Type: System.Boolean
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:

Expand Down Expand Up @@ -136,7 +136,7 @@ Accept wildcard characters: False
Write enable.

```yaml
Type: System.Boolean
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:

Expand Down