Azure / Azure/bicep-types-az

Branch Change Detection Failure in Microsoft.Web/sites/sourcecontrols

Open
#1,978 2 comments 0 reactions 0 assignees View on GitHub
No RP Github RP: Microsoft.Web
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

**Bicep Version**
I attempted to use three different versions, but none were successful:

- `2022-09-01` (latest)
- `2021-01-01` (mid)
- `2020-10-01` (oldest)

**Bug Description**
Encountered a problem with updating the branch in a `Microsoft.Web/sites/sourcecontrols` deployment. The expected outcome is for the App Service to deploy code from the newly set branch after redeployment. However, the App Service continues to deploy code from the original branch.

**Steps to Reproduce**
1. Perform the initial deployment using `Microsoft.Web/sites/sourcecontrols` with the following Bicep script:
```bicep
resource srcControls 'Microsoft.Web/sites/sourcecontrols@2020-10-01' = {
parent: appService
name: 'web'
properties: {
repoUrl:
branch: 'test'
isManualIntegration: true
}
}
```
2. After the first deployment, re-run the same `Microsoft.Web/sites/sourcecontrols` deployment. Change the `branch` value to `main` (or any other branch different from the first deployment).
```bicep
resource srcControls 'Microsoft.Web/sites/sourcecontrols@2020-10-01' = {
parent: appService
name: 'web'
properties: {
repoUrl:
branch: 'main'
isManualIntegration: true
}
}
```

**Expected Behavior**
- The Source Control resource should update with the new branch value.
- App Service Deployment Settings should reflect the new repository and branch link in the Deployment Center.
- The App Service should deploy code from the newly set branch.

**Actual Behavior**
- The branch in the Source Control resource does not update, despite multiple redeployments.
- App Service continues pointing to the old branch, as seen in the Deployment Center settings.
- Code from the new branch is not deployed to the App Service.
- App Service still shows code from the initial deployment branch.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the deployment with the provided Microsoft.Web/sites/sourcecontrols Bicep snippets, changing the branch between deployments. Compare the source control resource and App Service Deployment Center after redeployment; done when the resource, deployment settings, and deployed code all reflect the new branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.