Skip to content

Fix ProductApi association race during API publishing - #256

Merged
2 commits merged into
mainfrom
copilot/fix-swagger-api-timeout-issue
Sep 4, 2026
Merged

Fix ProductApi association race during API publishing#256
2 commits merged into
mainfrom
copilot/fix-swagger-api-timeout-issue

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

APIs and Products were published concurrently, allowing ProductApi associations to run before asynchronous API provisioning completed. This caused API not found errors and Swagger/OpenAPI publish timeouts, particularly with overrides.

Changes

  • Split tier-2 publishing into ordered waves:
    1. Regular APIs
    2. MCP APIs
    3. Products and other non-API resources
  • Preserve parallel publishing within each wave.
  • Add regression coverage ensuring Products wait for API publication to complete.

Copilot AI balanced review requested due to automatic review settings August 31, 2026 23:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Swagger API publish timeout with overrides Fix ProductApi association race during API publishing Aug 31, 2026
@Alexey-Zheltov
Aleksey Zheltov (Alexey-Zheltov) marked this pull request as ready for review September 3, 2026 08:32
@Alexey-Zheltov

Copy link
Copy Markdown
Collaborator

Tested this locally in a dev container on top of latest main:

  • npm ci / npm run build — clean, no errors
  • npm test — all 60 test files passed, 1321/1321 tests passed
  • Confirmed in the logs that the new regression coverage exercises Products waiting for API publication to complete, including the failure path for a ProductApi association (Failed to create ProductApi association my-product/petstore: Error: Association PUT failed handled gracefully)

Also merged this together with #255 into a combined branch to check for conflicts — no conflicts (this PR only touches src/services/publish-service.ts, #255 only touches src/clients/apim-client.ts), and all 1323 tests still pass on the combined branch.

LGTM from a testing standpoint 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM Products correctly wait for API publishing to complete in tier 2, verified locally with full test suite passing and no conflicts with #255.

@azaslonov Alexander Zaslonov (azaslonov) closed this pull request by merging all changes into main in 42f182d Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Swagger API publish times out with overrides; ProductApi association race condition

4 participants