Skip to content

Add docs for spock.sub_alter_options()#495

Merged
mason-sharp merged 3 commits into
mainfrom
docs/sub-alter-options
Jun 11, 2026
Merged

Add docs for spock.sub_alter_options()#495
mason-sharp merged 3 commits into
mainfrom
docs/sub-alter-options

Conversation

@susan-pgedge

Copy link
Copy Markdown
Member

Summary

  • Adds docs/spock_functions/functions/spock_sub_alter_options.md — full reference page covering synopsis, return values, all three options (forward_origins, apply_delay, skip_schema), validation rules, and examples
  • Adds spock.sub_alter_options to the function table in docs/spock_functions/sub_mgmt.md
  • Adds a linked entry in docs/spock_functions/index.md

The function was introduced in 6.0.0 (noted in the release notes) but had no reference documentation.

Test plan

  • Verify rendered docs link correctly from both index pages to the new function page
  • Confirm option descriptions and error cases match the regression test in tests/regress/sql/alter_options.sql

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds documentation for the spock.sub_alter_options() subscription management function, describing its behavior, return values, supported option keys, and error conditions, with index entries in two documentation catalogs and a site navigation entry plus three SQL usage examples.

Changes

spock.sub_alter_options() Documentation

Layer / File(s) Summary
spock.sub_alter_options() function reference and index entries
docs/spock_functions/functions/spock_sub_alter_options.md, docs/spock_functions/index.md, docs/spock_functions/sub_mgmt.md, mkdocs.yml
Complete function documentation with synopsis, return values, option keys (forward_origins, apply_delay, skip_schema), error conditions, and three SQL examples. Index entries added to the main function listing and subscription management section; site navigation updated.

Poem

I nibble lines of docs at night,
Tidy options, tidy light,
apply_delay and forward trails,
Examples snug in SQL tales,
Hop — the docs now read just right. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely describes the main change: adding documentation for the spock.sub_alter_options() function.
Description check ✅ Passed The description is clearly related to the changeset, detailing the specific documentation files added/modified and the function's context within the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/sub-alter-options

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production

codacy-production Bot commented Jun 9, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spock_functions/index.md`:
- Line 40: The table row for spock.sub_alter_options is missing the trailing
pipe causing markdownlint MD055 failures; update the table line containing
"[spock.sub_alter_options](functions/spock_sub_alter_options.md) | Change one or
more subscription options in a single atomic operation." to include a trailing
"|" so the row ends with "...operation. |" (i.e., add the final pipe to the row
for spock.sub_alter_options).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a9bf03a6-339b-4f11-b1e4-93706cf510e2

📥 Commits

Reviewing files that changed from the base of the PR and between 94f4ad6 and b2a9faf.

📒 Files selected for processing (3)
  • docs/spock_functions/functions/spock_sub_alter_options.md
  • docs/spock_functions/index.md
  • docs/spock_functions/sub_mgmt.md

Comment thread docs/spock_functions/index.md Outdated

@danolivo danolivo 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.

  forward_origins

        A JSON array of origin names whose transactions the subscriber
        should forward. 

The direction is inverted: nothing "forwards" on the subscriber side; the option controls which changes this subscription applies/receives based on their origin.

@danolivo danolivo added the documentation Improvements or additions to documentation label Jun 11, 2026
@susan-pgedge

Copy link
Copy Markdown
Member Author
  forward_origins

        A JSON array of origin names whose transactions the subscriber
        should forward. 

The direction is inverted: nothing "forwards" on the subscriber side; the option controls which changes this subscription applies/receives based on their origin.

Now reads: A JSON array of origin names whose transactions the subscriber
should apply or receive based on their origin. The only accepted
element is the string "all". Pass an empty array ([]) to disable
origin forwarding.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spock_functions/index.md`:
- Line 34: Fix the spelling error in the documentation entry for
spock.sub_show_status: change the description string "Display the status of the
subcription." to "Display the status of the subscription." in the docs entry for
spock.sub_show_status so the function's description reads correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 97f0359f-8f65-41cc-abe4-8688ecb9807c

📥 Commits

Reviewing files that changed from the base of the PR and between 3c87498 and b272808.

📒 Files selected for processing (2)
  • docs/spock_functions/functions/spock_sub_alter_options.md
  • docs/spock_functions/index.md
✅ Files skipped from review due to trivial changes (1)
  • docs/spock_functions/functions/spock_sub_alter_options.md

| [spock.sub_enable](functions/spock_sub_enable.md) | Make a subscription live. |
| [spock.sub_add_repset](functions/spock_sub_add_repset.md) | Add a replication set to a subscription. |
| [spock.sub_remove_repset](functions/spock_sub_remove_repset.md) | Drop a replication set from a subscription. |
| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subcription. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix spelling error: "subcription" → "subscription".

The description contains a typo that should be corrected for documentation quality.

📝 Proposed fix
-| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subcription. |
+| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subscription. |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subcription. |
| [spock.sub_show_status](functions/spock_sub_show_status.md) | Display the status of the subscription. |
🧰 Tools
🪛 LanguageTool

[grammar] ~34-~34: Ensure spelling is correct
Context: ..._status.md) | Display the status of the subcription. | | [spock.sub_show_table](functions/s...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/spock_functions/index.md` at line 34, Fix the spelling error in the
documentation entry for spock.sub_show_status: change the description string
"Display the status of the subcription." to "Display the status of the
subscription." in the docs entry for spock.sub_show_status so the function's
description reads correctly.

Source: Linters/SAST tools

@mason-sharp mason-sharp merged commit 922ea93 into main Jun 11, 2026
17 of 18 checks passed
@mason-sharp mason-sharp deleted the docs/sub-alter-options branch June 11, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants