Skip to content

[4.0.3 backport] CBG-5118: Support request-provided oldDoc values in Sync Function Dry-Run#8024

Merged
gregns1 merged 1 commit intorelease/4.0.3from
CBG-5118
Jan 23, 2026
Merged

[4.0.3 backport] CBG-5118: Support request-provided oldDoc values in Sync Function Dry-Run#8024
gregns1 merged 1 commit intorelease/4.0.3from
CBG-5118

Conversation

@bbrks
Copy link
Member

@bbrks bbrks commented Jan 23, 2026

Clean cherry-pick of #8019 for 4.0.3

Integration Tests

  • n/a

…ry-Run (#8019)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

Redocly previews

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR backports support for request-provided oldDoc values in the Sync Function Dry-Run API to version 4.0.3. The change allows users to specify an inline oldDoc body when testing sync functions, expanding the API's flexibility beyond the existing behavior of fetching oldDoc from the bucket via doc_id.

Changes:

  • Adds support for inline oldDoc parameter in the dry-run API request payload
  • Updates API documentation to reflect the new oldDoc parameter and valid parameter combinations
  • Adds validation to prevent conflicting usage of doc_id with inline oldDoc

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
rest/diagnostic_doc_api.go Implements oldDoc support in the dry-run handler, adds validation logic, and renames function/constant for consistency
rest/diagnostic_doc_api_test.go Adds test coverage for inline oldDoc usage and updates existing tests to use renamed constant
docs/api/paths/diagnostic/keyspace-sync.yaml Updates OpenAPI specification with oldDoc parameter documentation and behavior table
db/crud.go Renames SyncFnDryrun to SyncFnDryRun and fixes oldDoc body handling to use BodyBytes()

@gregns1 gregns1 enabled auto-merge (squash) January 23, 2026 17:14
@gregns1 gregns1 merged commit 3798908 into release/4.0.3 Jan 23, 2026
46 of 47 checks passed
@gregns1 gregns1 deleted the CBG-5118 branch January 23, 2026 17:21
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.

2 participants