[BUG] Publisher misses logger dependency in policy XML
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Start by tracing the publisher's policy XML dependency parsing and the existing handling for named values, policy fragments, and backend IDs. Add the logger reference to the dependency behavior described in the issue, then reproduce the Azure API Management publish with the supplied policy XML and verify that the logger is created before the policy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Release version
v7.0.1
Describe the bug
Summary
When an API policy references a logger via log-to-eventhub logger-id="...", the publisher can attempt to PUT the policy before the logger resource exists in APIM. This results in a 400 validation error such as:
Logger not found
Root cause
The publisher builds dependency edges from parsed policy XML for things like:
- named values
- policy fragments
- backend IDs
but it does not currently parse logger references used in:
- log-to-eventhub logger-id="..."
As a result, the policy has no predecessor relationship to the logger, so parallel resource processing can PUT the policy before the logger resource has been created.
Expected behavior
When an API policy references an APIM logger in the XML policy, the publisher should create a dependency edge from that logger resource to the policy resource and publish the logger before the policy
Actual behavior
The publisher does not detect logger references in policy XML. As a result, the policy can be published in parallel with the logger, and APIM rejects the request with a validation error like:
Reproduction Steps
- Create or include an APIM logger resource, for example azureeventhublogger.
- Update an API policy that references that logger in XML, such as:
<policies>
<inbound>
<log-to-eventhub logger-id="azureeventhublogger" />
<base />
</inbound>
</policies>
- Run the publisher against the target APIM environment with that logger and policy in the artifacts (last commit)
- Observe that the publisher may PUT the policy before the logger is created.
- APIM returns 400 Bad Request with Logger not found for the policy.
- Ngôn ngữ chính
- C#
- Star
- 448
- Fork
- 248
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/apiops
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
area-ai untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dotnet/extensions#7790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
P2 testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/runtime#134766 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0 - Backlog Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
BrighterCommand/Brighter#4444 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày