Skip to content

Fix push custom connector issue - #535

Merged
Hoa Nguyen (nguhoa) merged 4 commits into
mainfrom
nguhoa/custconnector
Dec 3, 2026
Merged

Hoa Nguyen (nguhoa) merged 4 commits into
mainfrom
nguhoa/custconnector

Conversation

@nguhoa

Copy link
Copy Markdown
Contributor

Fix push custom connector issue

Copilot AI balanced review requested due to automatic review settings December 1, 2026 17:14

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.

🔵 Needs a closer look

Replacing atomic conditional writes with read-before-write checks risks overwriting concurrent cloud edits, requiring human acceptance of the tradeoff and live Dataverse validation beyond simulated tests.

No open issues 🎉

What changed in this PR

Fixes custom connector pushes in the shared sync layer by avoiding conditional updates that Dataverse rejects, including updates involving connector icons.

Changes:

  • Replaces If-Match updates with pre-save version checks and documents their concurrency limitations.
  • Adds regression coverage for connector updates, icons, version conflicts, and retrying failed pushes.
  • Consolidates Dataverse test-client setup into a shared helper.
File Description
src/​CopilotStudio.Sync/​Dataverse/​SyncDataverseClient.cs Uses pre-save version reads instead of conditional connector writes.
src/​CopilotStudio.Sync/​Dataverse/​IDataverseOperations.cs Documents the version check’s concurrency limitations.
src/​CopilotStudio.Sync.UnitTests/​WorkflowWriteOrderingTests.cs Adopts the shared test-client helper.
src/​CopilotStudio.Sync.UnitTests/​WorkflowResponseIdentityTests.cs Adopts the shared test-client helper.
src/​CopilotStudio.Sync.UnitTests/​StandaloneWorkflowDataverseTests.cs Tests version checks, unconditional updates, and concurrent-change behavior.
src/​CopilotStudio.Sync.UnitTests/​DataverseTestClient.cs Adds reusable client setup with immediate retry delays.
src/​CopilotStudio.Sync.UnitTests/​DataverseNameQueryTests.cs Adopts the shared test-client helper.
src/​CopilotStudio.Sync.UnitTests/​DataverseConnectorTable.cs Adds a stateful connector-table simulator for HTTP-level tests.
src/​CopilotStudio.Sync.UnitTests/​Dataverse/​DataverseRetryPolicyTests.cs Reuses shared client setup for knowledge-file tests.
src/​CopilotStudio.Sync.UnitTests/​CustomConnectorTests.cs Tests a successful push after a previous save failure.
src/​CopilotStudio.Sync.UnitTests/​CustomConnectorPushTests.cs Tests icon-bearing connector updates with and without overwrite.
src/​CopilotStudio.Sync.UnitTests/​Copy/​CopyDataverseQueryTests.cs Adopts the shared test-client helper.
src/​CopilotStudio.Sync.UnitTests/​AiPromptPushTests.cs Reuses shared setup for the refusing Dataverse client.

Review effort: Balanced

Hoa Nguyen (nguhoa) and others added 2 commits December 1, 2026 09:37
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 2, 2026 01:35

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.

🔵 Needs a closer look

The tests assume Dataverse accepts If-Match: * with image fields, so live validation and human acceptance of the concurrent-edit overwrite risk are still needed.

No open issues 🎉

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟡 Changes recommended

If a connector PATCH commits but returns a 502, 503, or 504 response, the retry mistakes that write’s own version increment for a cloud edit. The push then reports a conflict and retains the old baseline even though the connector was successfully saved.

1 open issue

Review effort: Balanced

@nguhoa
Hoa Nguyen (nguhoa) enabled auto-merge (squash) December 3, 2026 00:10
@nguhoa
Hoa Nguyen (nguhoa) merged commit a54cbf9 into main Dec 3, 2026
5 checks passed
@nguhoa
Hoa Nguyen (nguhoa) deleted the nguhoa/custconnector branch December 3, 2026 17:26
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.

3 participants