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

fix: Improved removal resiliency #3038

Merged
merged 9 commits into from
Sep 5, 2024
Merged

Conversation

AlexanderSehr
Copy link
Contributor

@AlexanderSehr AlexanderSehr commented Aug 13, 2024

Description

  • The removal logic did expect that /deployments/ would always correlate to Microsoft.Resource/deployments. Microsoft.CognitiveServices/accounts/deployments showed that this does not apply.
    Hence updated the logic to check for Microsoft.Resource/deployments specifically.
  • Updated the logic that tries to resolve a deployment so that it only 'retries' top-level deployments, as opposed to everything nested. The background is that we encountered that some nested child deployment might have failed and its deployment being gone - affecting the rest of the removal logic if not 'ignored'

Pipeline Reference

Pipeline
avm.res.cognitive-services.account
avm.res.analysis-services.server
avm.res.digital-twins.digital-twins-instance (expected)
avm.ptn.aca-lza.hosting-environment

Type of Change

  • Update to CI Environment or utilities (Non-module affecting changes)
  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
      • Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description.
      • The bug was found by the module author, and no one has opened an issue to report it yet.
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation

@AlexanderSehr AlexanderSehr self-assigned this Aug 13, 2024
@AlexanderSehr AlexanderSehr added Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: CI 🚀 This issue is related to the AVM CI labels Aug 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Aug 13, 2024
@AlexanderSehr AlexanderSehr marked this pull request as ready for review August 14, 2024 06:52
@AlexanderSehr AlexanderSehr requested a review from a team as a code owner August 14, 2024 06:52
@AlexanderSehr AlexanderSehr removed the Needs: Triage 🔍 Maintainers need to triage still label Aug 14, 2024
@AlexanderSehr AlexanderSehr marked this pull request as draft August 18, 2024 15:08
@AlexanderSehr AlexanderSehr changed the title fix: Enabled CI-removal to handle resource type Microsoft.CognitiveServices/accounts/deployments fix: Improved removal resiliency Aug 18, 2024
@AlexanderSehr AlexanderSehr marked this pull request as ready for review August 19, 2024 08:40
@AlexanderSehr AlexanderSehr linked an issue Sep 3, 2024 that may be closed by this pull request
Copy link
Contributor

@jtracey93 jtracey93 left a comment

Choose a reason for hiding this comment

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

LGTM

@jtracey93 jtracey93 merged commit c709d11 into main Sep 5, 2024
4 checks passed
@jtracey93 jtracey93 deleted the users/alsehr/cogDeplRemovalFix branch September 5, 2024 15:45
Menghua1 pushed a commit to Menghua1/bicep-registry-modules that referenced this pull request Sep 10, 2024
## Description

- The removal logic did expect that `/deployments/` would always
correlate to `Microsoft.Resource/deployments`.
`Microsoft.CognitiveServices/accounts/deployments` showed that this does
not apply.
Hence updated the logic to check for `Microsoft.Resource/deployments`
specifically.
- Updated the logic that tries to resolve a deployment so that it only
'retries' top-level deployments, as opposed to everything nested. The
background is that we encountered that some nested child deployment
might have failed and its deployment being gone - affecting the rest of
the removal logic if not 'ignored'

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |

[![avm.res.cognitive-services.account](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml)

[![avm.res.analysis-services.server](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.yml)

[![avm.res.digital-twins.digital-twins-instance](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml)
(expected)

[![avm.ptn.aca-lza.hosting-environment](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.aca-lza.hosting-environment.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.aca-lza.hosting-environment.yml)

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation
jianingwang123 pushed a commit to jianingwang123/bicep-registry-modules that referenced this pull request Sep 12, 2024
## Description

- The removal logic did expect that `/deployments/` would always
correlate to `Microsoft.Resource/deployments`.
`Microsoft.CognitiveServices/accounts/deployments` showed that this does
not apply.
Hence updated the logic to check for `Microsoft.Resource/deployments`
specifically.
- Updated the logic that tries to resolve a deployment so that it only
'retries' top-level deployments, as opposed to everything nested. The
background is that we encountered that some nested child deployment
might have failed and its deployment being gone - affecting the rest of
the removal logic if not 'ignored'

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |

[![avm.res.cognitive-services.account](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml)

[![avm.res.analysis-services.server](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.yml)

[![avm.res.digital-twins.digital-twins-instance](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml)
(expected)

[![avm.ptn.aca-lza.hosting-environment](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.aca-lza.hosting-environment.yml/badge.svg?branch=users%2Falsehr%2FcogDeplRemovalFix&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.aca-lza.hosting-environment.yml)

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: CI 🚀 This issue is related to the AVM CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Failed pipeline] avm.res.cognitive-services.account
2 participants