[BUG] The API entered an inconsistent state due to an error when setting the current revision.
@guythetechie 已经在做这个了。
开始于 2025年8月26日。
评估
这个 Issue 还没有评估数据。
描述
Release version
v6.0.1.4
Describe the bug
In the attempt to set the revision as current, after the error occurred, the API entered an inconsistent state, losing the version. Consequently, all subsequent attempts to adjust the version failed, as the API became an ‘original’ API, preventing us from creating a v3 or deploying an API with the same name.
the erro that caused the issue:
`info: publisher[0]
Changing current revision on ***center-v3 from 4 to 5...
info: publisher[0]
Putting API ***center-v3...
##[debug]Agent environment resources - Disk: / Available 276932.38 MB out of 347161.04 MB, Memory: Used 1552.00 MB out of 7929.00 MB, CPU: Usage 62.03%
info: publisher[0]
Putting API release apiops-set-current in API ***center-v3...
info: publisher[0]
Deleting API release apiops-set-current from API ***center-v3...
crit: publisher[0]
Application failed.
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscription/***/resourceGroups/***/providers/Microsoft.ApiManagement/service/***/apis/***center-v3/releases/apiops-set-current?api-version=2023-09-01-preview failed with status code 409. Content is '{"error":{"code":"ScopeLocked","message":"The scope '/subscriptions/***/resourceGroups/***/providers/Microsoft.ApiManagement/service/***/apis/***center-v3/releases/apiops-set-current' cannot perform delete operation because following scope(s) are locked: '/subscriptions/***/resourceGroups/***'. Please remove the lock and try again."}}'.
`
after that error the api lost the "v3"(***-center/v3) and become just ***-center
Expected behavior
It should revert the changes made in the steps prior to the error and also should not update the revision to one that didn't have any version in the base path.
Actual behavior
Since the incidente, all the versions conflict with the ***-center v3, once the base path is ***-center and not ***-center/v3. PS: it's part of the same version set.
##[error]System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/***-rg/providers/Microsoft.ApiManagement/service/***/apis/***center-v1;rev=6?api-version=2023-09-01-preview failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"path","message":"Cannot create API '***center-v1' with the same Path '***-center' as API '***center-v3' unless it's a part of the same version set"}]}}'.
Reproduction Steps
Set the resource group to ScopeLocked for deletion in Azure APIM; after the error, the API lost the version from the base path.
- 主要语言
- C#
- 星标
- 448
- 派生
- 247
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
-
t/bug
难度 2/5 1-3 小时 新手友好度 82/100
-
ci-failure-cause test-failure
难度 2/5 1-3 小时 新手友好度 82/100
-
area:auth FE mvp P3
难度 2/5 1-3 小时 新手友好度 88/100
klasolsson81/jobbliggaren#1788 ·