Skip to content

Fix sorted SQL includes pagination - #5868

Merged
Richa Bansal (rbans96) merged 2 commits into
mainfrom
rbans96-bug-207476-root-cause
Oct 1, 2026
Merged

Richa Bansal (rbans96) merged 2 commits into
mainfrom
rbans96-bug-207476-root-cause

Conversation

@rbans96

Copy link
Copy Markdown
Contributor

Description

Fix missing and incorrect $includes results in sorted SQL searches. Replay sorted match pages instead of surrogate-ID ranges, preserve phase cursors and legacy tokens, and add SQL pagination regression coverage.

Related issues

Addresses [AB#207476](https://microsofthealth.visualstudio.com/Health/_workitems/edit/207476).

Testing

  • New SQL E2E suite: 7 failures before the fix; all 15 cases pass afterward.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

Replay sorted match pages for includes instead of surrogate ID ranges; preserve phase cursors and legacy tokens. Add SQL pagination regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rbans96
Richa Bansal (rbans96) requested a review from a team as a code owner September 22, 2026 22:01
@rbans96 Richa Bansal (rbans96) added Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs No-ADR ADR not needed Bug Bug bug bug. Schema Version unchanged No-PaaS-breaking-change labels Sep 22, 2026
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@a64af8f). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5868   +/-   ##
=======================================
  Coverage        ?   78.88%           
=======================================
  Files           ?     1020           
  Lines           ?    37383           
  Branches        ?     5720           
=======================================
  Hits            ?    29488           
  Misses          ?     6463           
  Partials        ?     1432           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Extract sorted and phase dataset initialization without changing sequential resource creation. Clarify why includes replay excludes the lookahead match.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rbans96 Richa Bansal (rbans96) removed Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Schema Version unchanged No-PaaS-breaking-change No-ADR ADR not needed labels Sep 30, 2026
@rbans96 Richa Bansal (rbans96) added Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs No-ADR ADR not needed Schema Version unchanged No-PaaS-breaking-change labels Oct 1, 2026
@rbans96
Richa Bansal (rbans96) merged commit 7d91634 into main Oct 1, 2026
50 of 59 checks passed
@rbans96
Richa Bansal (rbans96) deleted the rbans96-bug-207476-root-cause branch October 1, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug. No-ADR ADR not needed No-PaaS-breaking-change Schema Version unchanged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants