Azure / Azure/azure-sdk-for-python

ContainerApps no longer passes on active_revisions_mode parameter

Offen
#48,043 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Container Apps customer-reported Mgmt needs-team-attention question
Vorherrschende Sprache
Python
Sterne
5.6k
Forks
3.4k
Ø Merge
2 T. 2 Std.
Gemergte PRs (30 T.)
213

Beschreibung

- **Package Name**: azure-mgmt-appcontainers
- **Package Version**: 5.0.0
- **Operating System**: Linux
- **Python Version**: 3.14

**Describe the bug**
When creating a Container App using `container_apps_client.container_apps.begin_create_or_update`, the `active_revisions_mode` is not passed on to the HTTP request.

This is the configuration:

```
configuration=Configuration(
active_revisions_mode=ActiveRevisionsMode.SINGLE,
ingress=Ingress(
external=True,
target_port=80,
sticky_sessions=IngressStickySessions(affinity=affinity),
)
),
```

The JSON that is actually being send to Azure (verified by running the calls through a proxy) :

```
{
"location": "francecentral",
"properties": {
"managedEnvironmentId": "/subscriptions/.../resourceGroups/ls_test_2c0e06/providers/Microsoft.App/managedEnvironments/lstest12667a",
"configuration": {
"ingress": {
"external": true,
"targetPort": 80,
"stickySessions": {
"affinity": "sticky"
}
}
},
"template": {
"containers": [
{
"name": "testcontainer",
"image": "mcr.microsoft.com/k8se/quickstart:latest"
}
]
}
}
}
```

Because the `active_revisions_mode` is not passed on, the call fails:
```
{
"error": {
"code": "ContainerAppInvalidIngressStickySessionRevisionMode",
"message": "Sticky Session is not supported for revision mode."
}
}
```

**To Reproduce**
Steps to reproduce the behavior:
[test_bug.py](https://github.com/user-attachments/files/30005014/test_bug.py)

**Expected behavior**
1. The parameter to be passed on in the request body
2. No error to occur

**Additional context**
This worked fine under version 4.0.0, and only started failing with 5.0.0

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der beigefügten test_bug.py und dem Einstiegspunkt container_apps_client.container_apps.begin_create_or_update in azure-mgmt-appcontainers. Vergleiche die Request-Serialisierung zwischen den Versionen 4.0.0 und 5.0.0 und überprüfe anschließend, dass active_revisions_mode im Request-Body erscheint und die sticky-session-Reproduktion nicht mehr den revision-mode-Fehler zurückgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, python
Bereich
api, cloud
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.