From 75bcd467ee8646ee823fd964bb696af617127965 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 15:23:45 -0400 Subject: [PATCH 1/3] Preserve indentation and enforce marker uniqueness in stringMarker extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extractByStringMarker() used .trim() on the extracted region, which stripped leading whitespace from the first content line only. For indented sources (RST literal blocks), that misaligned the first line against the rest of the snippet. Trim blank edge lines instead, preserving every line's indentation — matching the Sphinx literalinclude :start-after:/:end-before: semantics this function already documents. This is behavior-neutral for every existing stringMarker snippet (daml, splice): their marked content starts at column 0, where .trim() and blank-edge trimming are equivalent, confirmed by scanning all 11 checked-in stringMarker outputs. Also fail extraction when a marker string does not appear exactly once in its source file, so a stray duplicate can't silently select the wrong region. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- scripts/helpers/generateOutputDocs.js | 34 +++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/scripts/helpers/generateOutputDocs.js b/scripts/helpers/generateOutputDocs.js index 8d65a424e..6bb440fd0 100644 --- a/scripts/helpers/generateOutputDocs.js +++ b/scripts/helpers/generateOutputDocs.js @@ -121,12 +121,31 @@ function extractByLines(fileContent, start, end) { return lines.slice(startLine - 1, endLine).join('\n') } +function countMarkerOccurrences(fileContent, marker) { + let count = 0 + let index = fileContent.indexOf(marker) + while (index !== -1) { + count++ + index = fileContent.indexOf(marker, index + marker.length) + } + return count +} + function extractByStringMarker(fileContent, startMarker, endMarker) { - const startIndex = fileContent.indexOf(startMarker) - if (startIndex === -1) { - throw new Error(`Start marker not found: "${startMarker}"`) + for (const marker of [startMarker, endMarker]) { + const occurrences = countMarkerOccurrences(fileContent, marker) + if (occurrences === 0) { + throw new Error(`Marker not found: "${marker}"`) + } + if (occurrences > 1) { + throw new Error( + `Marker must appear exactly once, found ${occurrences}: "${marker}"` + ) + } } + const startIndex = fileContent.indexOf(startMarker) + // Match Sphinx literalinclude :start-after: / :end-before: — exclude marker lines. let contentStart = fileContent.indexOf('\n', startIndex) if (contentStart === -1) { @@ -137,7 +156,9 @@ function extractByStringMarker(fileContent, startMarker, endMarker) { const endIndex = fileContent.indexOf(endMarker, contentStart) if (endIndex === -1) { - throw new Error(`End marker not found: "${endMarker}"`) + throw new Error( + `End marker not found after start marker: "${endMarker}"` + ) } let contentEnd = fileContent.lastIndexOf('\n', endIndex) @@ -145,7 +166,10 @@ function extractByStringMarker(fileContent, startMarker, endMarker) { contentEnd = endIndex } - return fileContent.substring(contentStart, contentEnd).trim() + // Trim blank edge lines only, preserving the indentation of the first + // content line so indented sources (e.g. RST literal blocks) keep their + // relative alignment — again matching Sphinx literalinclude semantics. + return trimBlankEdges(fileContent.substring(contentStart, contentEnd)) } function extractByRegexWrap(fileContent, startRegex, endRegex) { From 72cfdac4012e4787b7163dde5c43c138a666cf25 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 15:24:06 -0400 Subject: [PATCH 2/3] Switch Canton and Daml Shell snippet selectors to string markers Replace the line-number selectors for the internal source repositories with the stringMarker tokens now present on the source branches: - canton-snippet-list-remote.json: 10 selectors -> CF_DOCS_SNIPPET_* comment markers in community/app documentation-snippets .conf files (DACH-NY/canton#34155). - daml-shell-snippet-list-remote.json: all 20 selectors -> cf-docs-snippet-daml-shell-* :name:/comment markers in the two RST docs (DACH-NY/daml-shell#193). Regenerate the checked-in snippet outputs with focused extraction against those source branches. Daml Shell content is byte-for-byte identical to regenerating with the old line selectors on current upstream main (the only checked-in diff is a stale trailing blank line that today's wrapCode trimming already removes). Six Canton snippets change content intentionally, because the old line ranges had drifted: three configuration-reference snippets regain their closing braces, the remote-participant snippet regains its block header, and the two performance-optimization snippets become the complete storage-pool and pruning-batch blocks instead of fragments that split the storage block. Retire the max-burst-factor snippet entirely: DACH-NY/canton removed that configuration in d4ed3d74e485 when BaseCantonConfig started failing on unknown keys. Drop the selector, the generated snippet, its import, and the unsupported 'Batch sizes' example from the global-synchronizer performance-optimization page. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../canton-snippet-list-remote.json | 75 +++++------ .../daml-shell-snippet-list-remote.json | 120 +++++++++--------- .../performance-optimization.mdx | 11 -- ...ole-scripting-console-timeouts-hocon-0.mdx | 1 - ...e-scripting-remote-participant-hocon-1.mdx | 1 + ...e-optimization-batching-params-hocon-1.mdx | 6 +- ...ance-optimization-burst-factor-hocon-2.mdx | 6 - ...e-optimization-connection-pool-hocon-0.mdx | 4 + ...erence-configuration-reference-alpha-2.mdx | 2 +- ...nce-configuration-reference-envsubst-0.mdx | 1 + ...ference-configuration-reference-init-1.mdx | 2 +- ...mponent-howtos-daml-shell-index-sh-138.mdx | 1 - ...mponent-howtos-daml-shell-index-sh-171.mdx | 1 - ...onent-howtos-daml-shell-index-text-387.mdx | 1 - ...onent-howtos-daml-shell-index-text-394.mdx | 1 - ...evelop-debug-daml-shell-index-text-104.mdx | 1 - ...evelop-debug-daml-shell-index-text-127.mdx | 1 - ...develop-debug-daml-shell-index-text-16.mdx | 1 - ...evelop-debug-daml-shell-index-text-189.mdx | 1 - ...evelop-debug-daml-shell-index-text-204.mdx | 1 - ...evelop-debug-daml-shell-index-text-237.mdx | 2 - ...develop-debug-daml-shell-index-text-27.mdx | 1 - ...evelop-debug-daml-shell-index-text-309.mdx | 1 - ...evelop-debug-daml-shell-index-text-317.mdx | 1 - ...evelop-debug-daml-shell-index-text-325.mdx | 1 - ...evelop-debug-daml-shell-index-text-334.mdx | 1 - ...evelop-debug-daml-shell-index-text-364.mdx | 1 - ...evelop-debug-daml-shell-index-text-370.mdx | 1 - ...develop-debug-daml-shell-index-text-58.mdx | 1 - ...develop-debug-daml-shell-index-text-74.mdx | 1 - ...develop-debug-daml-shell-index-text-98.mdx | 1 - 31 files changed, 101 insertions(+), 149 deletions(-) delete mode 100644 docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2.mdx diff --git a/config/snippet-config/canton-snippet-list-remote.json b/config/snippet-config/canton-snippet-list-remote.json index 599db35b3..6b603a79c 100644 --- a/config/snippet-config/canton-snippet-list-remote.json +++ b/config/snippet-config/canton-snippet-list-remote.json @@ -4814,9 +4814,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-appdev_configuration_reference.conf", "location": { - "type": "lines", - "start": 1, - "end": 6 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_APPDEV_CONFIG_ENV_SUBSTITUTION_START", + "end": "CF_DOCS_SNIPPET_APPDEV_CONFIG_ENV_SUBSTITUTION_END" }, "description": "HOCON: Postgres properties with environment substitution (documentation-snippets docs-cn-appdev_configuration_reference.conf)", "options": { @@ -4829,9 +4829,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-appdev_configuration_reference.conf", "location": { - "type": "lines", - "start": 8, - "end": 13 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_APPDEV_CONFIG_PARTICIPANT_INIT_START", + "end": "CF_DOCS_SNIPPET_APPDEV_CONFIG_PARTICIPANT_INIT_END" }, "description": "HOCON: participant init (ledger-api deduplication, node identifier) \u2014 docs-cn-appdev_configuration_reference.conf", "options": { @@ -4844,9 +4844,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-appdev_configuration_reference.conf", "location": { - "type": "lines", - "start": 15, - "end": 22 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_APPDEV_CONFIG_ALPHA_VERSION_SUPPORT_START", + "end": "CF_DOCS_SNIPPET_APPDEV_CONFIG_ALPHA_VERSION_SUPPORT_END" }, "description": "HOCON: canton.parameters and participant alpha-version-support \u2014 docs-cn-appdev_configuration_reference.conf", "options": { @@ -4859,9 +4859,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-appdev_faq_max_connections.conf", "location": { - "type": "lines", - "start": 1, - "end": 3 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_APPDEV_FAQ_LEDGER_API_CONNECTION_ALLOCATION_START", + "end": "CF_DOCS_SNIPPET_APPDEV_FAQ_LEDGER_API_CONNECTION_ALLOCATION_END" }, "description": "HOCON: Ledger API connection allocation (appdev + GS FAQ) \u2014 docs-cn-appdev_faq_max_connections.conf", "options": { @@ -4874,9 +4874,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_advanced_operations.conf", "location": { - "type": "lines", - "start": 1, - "end": 2 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_ADVANCED_OPERATIONS_REPAIR_PREVIEW_FLAGS_START", + "end": "CF_DOCS_SNIPPET_GS_ADVANCED_OPERATIONS_REPAIR_PREVIEW_FLAGS_END" }, "description": "HOCON: repair/preview feature flags \u2014 docs-cn-global-synchronizer_advanced_operations.conf", "options": { @@ -4889,9 +4889,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_scripting.conf", "location": { - "type": "lines", - "start": 1, - "end": 5 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_SCRIPTING_CONSOLE_TIMEOUTS_START", + "end": "CF_DOCS_SNIPPET_GS_SCRIPTING_CONSOLE_TIMEOUTS_END" }, "description": "HOCON: canton.parameters.timeouts.console \u2014 docs-cn-global-synchronizer_scripting.conf", "options": { @@ -4904,9 +4904,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_scripting.conf", "location": { - "type": "lines", - "start": 7, - "end": 15 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_SCRIPTING_REMOTE_PARTICIPANT_START", + "end": "CF_DOCS_SNIPPET_GS_SCRIPTING_REMOTE_PARTICIPANT_END" }, "description": "HOCON: canton.remote-participants.* \u2014 docs-cn-global-synchronizer_scripting.conf", "options": { @@ -4919,9 +4919,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_performance_optimization.conf", "location": { - "type": "lines", - "start": 1, - "end": 7 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_PERFORMANCE_STORAGE_CONNECTION_POOL_START", + "end": "CF_DOCS_SNIPPET_GS_PERFORMANCE_STORAGE_CONNECTION_POOL_END" }, "description": "HOCON: Hikari/storage pool tuning \u2014 docs-cn-global-synchronizer_performance_optimization.conf", "options": { @@ -4934,9 +4934,9 @@ "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_performance_optimization.conf", "location": { - "type": "lines", - "start": 9, - "end": 12 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_PERFORMANCE_PRUNING_BATCH_START", + "end": "CF_DOCS_SNIPPET_GS_PERFORMANCE_PRUNING_BATCH_END" }, "description": "HOCON: participant.parameters.batching pruning batch \u2014 docs-cn-global-synchronizer_performance_optimization.conf", "options": { @@ -4944,29 +4944,14 @@ "normalizeIndent": false } }, - { - "snippetName": "docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2", - "sourceRepo": "canton", - "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_performance_optimization.conf", - "location": { - "type": "lines", - "start": 13, - "end": 16 - }, - "description": "HOCON: batching.max-burst-factor \u2014 docs-cn-global-synchronizer_performance_optimization.conf", - "options": { - "language": "hocon", - "normalizeIndent": false - } - }, { "snippetName": "docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-troubleshooting-performance-issues-pool-hocon-0", "sourceRepo": "canton", "sourceFilepath": "community/app/src/test/resources/documentation-snippets/docs-cn-global-synchronizer_troubleshooting-guide-performance-issues.conf", "location": { - "type": "lines", - "start": 1, - "end": 3 + "type": "stringMarker", + "start": "CF_DOCS_SNIPPET_GS_TROUBLESHOOTING_STORAGE_MAX_CONNECTIONS_START", + "end": "CF_DOCS_SNIPPET_GS_TROUBLESHOOTING_STORAGE_MAX_CONNECTIONS_END" }, "description": "HOCON: storage max-connections \u2014 docs-cn-global-synchronizer_troubleshooting-guide-performance-issues.conf", "options": { diff --git a/config/snippet-config/daml-shell-snippet-list-remote.json b/config/snippet-config/daml-shell-snippet-list-remote.json index 9820feb55..3370b97a9 100644 --- a/config/snippet-config/daml-shell-snippet-list-remote.json +++ b/config/snippet-config/daml-shell-snippet-list-remote.json @@ -5,9 +5,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/component-howtos/daml-shell/index.rst", "location": { - "type": "lines", - "start": 138, - "end": 139 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-run-jar-start", + "end": "cf-docs-snippet-daml-shell-run-jar-end" }, "description": "", "options": { @@ -20,9 +20,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/component-howtos/daml-shell/index.rst", "location": { - "type": "lines", - "start": 171, - "end": 205 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-cli-help-start", + "end": "cf-docs-snippet-daml-shell-cli-help-end" }, "description": "", "options": { @@ -35,9 +35,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/component-howtos/daml-shell/index.rst", "location": { - "type": "lines", - "start": 387, - "end": 389 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-set-identifier-hash-length-start", + "end": "cf-docs-snippet-daml-shell-set-identifier-hash-length-end" }, "description": "", "options": { @@ -50,9 +50,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/component-howtos/daml-shell/index.rst", "location": { - "type": "lines", - "start": 394, - "end": 420 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-help-set-start", + "end": "cf-docs-snippet-daml-shell-help-set-end" }, "description": "", "options": { @@ -65,9 +65,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 16, - "end": 20 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-connect-postgres-cli-args-start", + "end": "cf-docs-snippet-daml-shell-connect-postgres-cli-args-end" }, "description": "", "options": { @@ -80,9 +80,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 27, - "end": 28 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-connect-jdbc-url-start", + "end": "cf-docs-snippet-daml-shell-connect-jdbc-url-end" }, "description": "", "options": { @@ -95,9 +95,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 58, - "end": 63 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-net-changes-start", + "end": "cf-docs-snippet-daml-shell-net-changes-end" }, "description": "", "options": { @@ -110,9 +110,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 74, - "end": 86 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-active-summary-start", + "end": "cf-docs-snippet-daml-shell-active-summary-end" }, "description": "", "options": { @@ -125,9 +125,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 98, - "end": 99 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-active-fqn-with-package-start", + "end": "cf-docs-snippet-daml-shell-active-fqn-with-package-end" }, "description": "", "options": { @@ -140,9 +140,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 104, - "end": 114 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-active-fqn-without-package-start", + "end": "cf-docs-snippet-daml-shell-active-fqn-without-package-end" }, "description": "", "options": { @@ -155,9 +155,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 127, - "end": 164 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-contract-lookup-by-id-start", + "end": "cf-docs-snippet-daml-shell-contract-lookup-by-id-end" }, "description": "", "options": { @@ -170,9 +170,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 189, - "end": 199 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-exercises-summary-start", + "end": "cf-docs-snippet-daml-shell-exercises-summary-end" }, "description": "", "options": { @@ -185,9 +185,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 204, - "end": 232 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-exercises-by-choice-start", + "end": "cf-docs-snippet-daml-shell-exercises-by-choice-end" }, "description": "", "options": { @@ -200,9 +200,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 237, - "end": 260 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-exercise-by-event-id-start", + "end": "cf-docs-snippet-daml-shell-exercise-by-event-id-end" }, "description": "", "options": { @@ -215,9 +215,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 309, - "end": 310 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-where-string-pattern-start", + "end": "cf-docs-snippet-daml-shell-where-string-pattern-end" }, "description": "", "options": { @@ -230,9 +230,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 317, - "end": 318 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-where-nested-numeric-start", + "end": "cf-docs-snippet-daml-shell-where-nested-numeric-end" }, "description": "", "options": { @@ -245,9 +245,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 325, - "end": 326 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-where-exact-string-start", + "end": "cf-docs-snippet-daml-shell-where-exact-string-end" }, "description": "", "options": { @@ -260,9 +260,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 334, - "end": 335 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-where-combined-conditions-start", + "end": "cf-docs-snippet-daml-shell-where-combined-conditions-end" }, "description": "", "options": { @@ -275,9 +275,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 364, - "end": 365 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-pipe-csv-start", + "end": "cf-docs-snippet-daml-shell-pipe-csv-end" }, "description": "", "options": { @@ -290,9 +290,9 @@ "sourceRepo": "daml-shell", "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/debug/daml-shell/index.rst", "location": { - "type": "lines", - "start": 370, - "end": 371 + "type": "stringMarker", + "start": "cf-docs-snippet-daml-shell-csv-export-file-start", + "end": "cf-docs-snippet-daml-shell-csv-export-file-end" }, "description": "", "options": { diff --git a/docs-main/global-synchronizer/production-operations/performance-optimization.mdx b/docs-main/global-synchronizer/production-operations/performance-optimization.mdx index 67bdf1758..a0fb54b4d 100644 --- a/docs-main/global-synchronizer/production-operations/performance-optimization.mdx +++ b/docs-main/global-synchronizer/production-operations/performance-optimization.mdx @@ -5,7 +5,6 @@ description: "Tuning database, JVM, and Canton configuration for validator and S import CANTON_DOCS_CN_GS_PERFORMANCE_OPTIMIZATION_CONNECTION_POOL_HOCON_0 from "/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-connection-pool-hocon-0.mdx"; import CANTON_DOCS_CN_GS_PERFORMANCE_OPTIMIZATION_BATCHING_PARAMS_HOCON_1 from "/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-batching-params-hocon-1.mdx"; -import CANTON_DOCS_CN_GS_PERFORMANCE_OPTIMIZATION_BURST_FACTOR_HOCON_2 from "/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2.mdx"; import ExternalCantonMainCommunityAppSrcTestResourcesDocumentationSnippetsStorageQueueSize from "/snippets/external/canton/main/community/app/src/test/resources/documentation-snippets/storage-queue-size.mdx"; @@ -129,16 +128,6 @@ Canton stores a full history of transactions and ACS (Active Contract Set) snaps Pruned data cannot be recovered. Ensure you have backups before enabling aggressive pruning. Some regulatory contexts require retaining transaction history for a defined period. -## Batch sizes - -Canton processes commands in batches internally. The default batch sizes balance latency and throughput. For high-throughput workloads, you can increase batch sizes: - - - - - -Larger batches improve throughput at the cost of slightly higher per-command latency. Monitor sequencer and command completion latency metrics to find the right balance. - ## Monitoring performance Track these metrics to identify bottlenecks: `canton_participant_command_completion_latency` (end-to-end command time), `canton_sequencer_send_latency` (sequencer throughput), `canton_participant_db_query_latency` (database health), `hikaricp_connections_active` (connection pool saturation), and JVM heap/GC metrics. Set up dashboards and alert when values exceed your baseline — performance degradation is usually gradual, and early detection prevents outages. diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-console-timeouts-hocon-0.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-console-timeouts-hocon-0.mdx index 36057c45d..9dec52898 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-console-timeouts-hocon-0.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-console-timeouts-hocon-0.mdx @@ -3,5 +3,4 @@ canton.parameters.timeouts.console { bounded = 1.minute unbounded = 10.minutes } - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-remote-participant-hocon-1.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-remote-participant-hocon-1.mdx index e09408c7f..6e5755363 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-remote-participant-hocon-1.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-canton-console-scripting-remote-participant-hocon-1.mdx @@ -1,4 +1,5 @@ ```hocon +canton.remote-participants.myparticipant { admin-api { address = "participant-host" port = 5012 diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-batching-params-hocon-1.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-batching-params-hocon-1.mdx index 7dbe5200a..95584edfe 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-batching-params-hocon-1.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-batching-params-hocon-1.mdx @@ -1,6 +1,6 @@ ```hocon - connectionTimeout = 30000 - } +canton.participants.participant.parameters.batching { + # Prune data older than this duration + max-pruning-batch-size = 1000 } - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2.mdx deleted file mode 100644 index 95584edfe..000000000 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-burst-factor-hocon-2.mdx +++ /dev/null @@ -1,6 +0,0 @@ -```hocon -canton.participants.participant.parameters.batching { - # Prune data older than this duration - max-pruning-batch-size = 1000 -} -``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-connection-pool-hocon-0.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-connection-pool-hocon-0.mdx index 44bc21ec2..081beaeec 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-connection-pool-hocon-0.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-global-synchronizer-performance-optimization-connection-pool-hocon-0.mdx @@ -6,4 +6,8 @@ canton.participants.participant.storage { # Maximum number of connections in the pool maxConnections = 30 + # Connection timeout in milliseconds + connectionTimeout = 30000 + } +} ``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-alpha-2.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-alpha-2.mdx index e23505818..35b87be91 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-alpha-2.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-alpha-2.mdx @@ -1,5 +1,4 @@ ```hocon - canton.parameters { non-standard-config = yes alpha-version-support = yes @@ -7,4 +6,5 @@ canton.parameters { canton.participants.participant1.parameters = { alpha-version-support = yes +} ``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-envsubst-0.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-envsubst-0.mdx index de52c281d..ec4447168 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-envsubst-0.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-envsubst-0.mdx @@ -5,4 +5,5 @@ properties = { serverName = ${?POSTGRES_HOST} # overrides only if POSTGRES_HOST is set user = ${?POSTGRES_USER} # required, fails if unset password = ${?POSTGRES_PASSWORD} # required, fails if unset +} ``` \ No newline at end of file diff --git a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-init-1.mdx b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-init-1.mdx index 13c71c54a..be77c256f 100644 --- a/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-init-1.mdx +++ b/docs-main/snippets/external/canton/main/docs-open/target/snippet_json_data/docs-cn/docs-main-appdev-reference-configuration-reference-init-1.mdx @@ -1,8 +1,8 @@ ```hocon - participant1 { init { ledger-api.max-deduplication-duration = 1 minute identity.node-identifier.type = random } +} ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-138.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-138.mdx index cbd46662c..f6ffbe8d9 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-138.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-138.mdx @@ -1,4 +1,3 @@ ```sh $ ./daml-shell.jar - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-171.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-171.mdx index 70b527b97..638bef723 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-171.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-sh-171.mdx @@ -33,5 +33,4 @@ --postgres-tls-key Path to the TLS key file for Postgres connection. Implies --connect. Default: none --connect Auto-connect to the database on startup. - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-387.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-387.mdx index b78400511..c82b7e60d 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-387.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-387.mdx @@ -1,5 +1,4 @@ ```text > set identifier-hash-length full Disabled identifier shortening - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-394.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-394.mdx index fa634dfb5..6b2aa9078 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-394.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-component-howtos-daml-shell-index-text-394.mdx @@ -25,5 +25,4 @@ * wildcard-char - identifier wildcard * enable-color - enable color output * completion-query-items - completion count - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-104.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-104.mdx index 738e28f0b..a07a66492 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-104.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-104.mdx @@ -9,5 +9,4 @@ │ 43 │ 0093dce322a08c8… │ │ label: one copy updated │ │ │ │ │ owner: Alice::12209038d324bf70625c580267d5957cb4c4c03bb7bce294713b48151a4a088afd3b │ └────────────┴──────────────────┴──────────────┴────────────────────────────────────────────────────────────────────────────────────┘ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-127.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-127.mdx index 485df914f..9e41f1282 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-127.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-127.mdx @@ -36,5 +36,4 @@ ╟──────────────╫─────────────────────────────────────────────────────────────────────────╢ ║ Payload ║ ilabel: View of: Copy of: this contract supersedes the original contact ║ ╙──────────────╨─────────────────────────────────────────────────────────────────────────╜ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-16.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-16.mdx index 8567132d6..e1ceac8cd 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-16.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-16.mdx @@ -3,5 +3,4 @@ --postgres-port \ --postgres-username \ --postgres-password - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-189.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-189.mdx index a253ca31d..9a691d34e 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-189.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-189.mdx @@ -9,5 +9,4 @@ ├─────────────────────────────────────────────────┼───────────────┼───────┤ │ myproject:PingPong:Copy │ Non-consuming │ 1 │ └─────────────────────────────────────────────────┴───────────────┴───────┘ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-204.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-204.mdx index 596c4d7ba..e588e6154 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-204.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-204.mdx @@ -27,5 +27,4 @@ ├────────┼───────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 32 │ 0020ab2446d6cfc3f93f… │ │ 00a936fa54cc6fba294962b6fd6c639947f220ab4539c73b6c5c693522e5c5364aca021220104bc750d4800053c090d5b447a6c49d9a49911a4f654fa72c58650b3348e735 │ └────────┴───────────────────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-237.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-237.mdx index 5251f9ecd..181723353 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-237.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-237.mdx @@ -21,6 +21,4 @@ ╟──────────────╫────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢ ║ Result ║ 00df079f466b87b61e8b5a6702e6f5b05fecba05513a5559b1b400e4c89903f277ca02122000bcac7e924d0489d144b245c16ba1c95c20a9c293e59dd9290b94df77742a92 ║ ╙──────────────╨────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╜ - - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-27.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-27.mdx index fc90fb6e4..eaf8def55 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-27.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-27.mdx @@ -1,4 +1,3 @@ ```text > connect jdbc:postgresql://localhost/postgres?user=postgres&password=postgres - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-309.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-309.mdx index 811206adf..683ba3b25 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-309.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-309.mdx @@ -1,4 +1,3 @@ ```text > active where owner like Alice% - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-317.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-317.mdx index 155db7d8b..41da945e6 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-317.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-317.mdx @@ -1,4 +1,3 @@ ```text > active where deeply.nested.value :: numeric > 1000 - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-325.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-325.mdx index d86e018cc..f1a666397 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-325.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-325.mdx @@ -1,4 +1,3 @@ ```text > active where label = "loren ipsum" - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-334.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-334.mdx index 586e75cfa..503b24851 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-334.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-334.mdx @@ -1,4 +1,3 @@ ```text > active where (owner like Bob% or value :: numeric < 100) and myfield = myvalue - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-364.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-364.mdx index 7d283793b..9ffc770bc 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-364.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-364.mdx @@ -1,4 +1,3 @@ ```text > active PingPong:Ping | csv - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-370.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-370.mdx index 73568bba4..0171f3be7 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-370.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-370.mdx @@ -1,4 +1,3 @@ ```text > active PingPong:Ping | csv | export ~/my_pings.csv - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-58.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-58.mdx index 8c53fb3cc..b8a110122 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-58.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-58.mdx @@ -4,5 +4,4 @@ -6 myproject:PingPong:CashTransferProposal +6 myproject:PingPong:IAsset -6 myproject:PingPong:IAssetTransferProposal - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-74.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-74.mdx index 7205fbe20..ae1ae09c5 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-74.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-74.mdx @@ -11,5 +11,4 @@ ├────────────────────────────────┼───────────┼───────┤ │ myproject:PingPong:Ping │ Template │ 102 │ └────────────────────────────────┴───────────┴───────┘ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-98.mdx b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-98.mdx index f3b2f0917..65a825c86 100644 --- a/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-98.mdx +++ b/docs-main/snippets/external/daml-shell/main/daml-shell-rst-code-docs-user-sdlc-howtos-applications-develop-debug-daml-shell-index-text-98.mdx @@ -1,4 +1,3 @@ ```text > active myproject:PingPong:Ping - ``` \ No newline at end of file From 95c294ce1f5ae2500731e782190fbb39ffdf15cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 15:24:30 -0400 Subject: [PATCH 3/3] Retire Scribe and DPM remote snippet extraction; own the snippets in cf-docs Both upstream repositories deleted their docs after transferring documentation ownership to cf-docs: - DACH-NY/scribe 75ac557896d7 removed the docs and states PQS documentation is now hosted by canton-network/cf-docs. - digital-asset/dpm 6c85930ac6e1 deleted its external docs because they now live in canton-network/cf-docs. Extracting from those repositories can never succeed again, so remote extraction is retired rather than recreating upstream docs to host markers: - Rehome the 22 still-used PQS snippets from the misleading snippets/external/scribe/main path to cf-docs-owned snippets/pqs/ and update the three importing pages. - Rehome the 3 used DPM snippets to snippets/dpm/, delete the 3 unused checked-in DPM snippet files, and update the two importing pages. (The seventh DPM config entry, dpm-components-shell-42, had no checked-in output at all.) - Remove both configs from remote-snippet-lists.json, delete scribe-/dpm-snippet-list-remote.json, and drop the scribe/dpm generator targets from generate_external_snippets.py. Add regression tests that fail if the canton or daml-shell external configs reintroduce location.type == "lines", if the retired scribe/dpm configs come back, or if marker tokens collide within a source file, plus unit tests for the indentation-preserving and exactly-once stringMarker extraction semantics. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../dpm-snippet-list-remote.json | 109 ------ .../snippet-config/remote-snippet-lists.json | 4 +- .../scribe-snippet-list-remote.json | 334 ------------------ .../deep-dives/performance-optimization.mdx | 2 +- .../appdev/modules/m4-json-api-tutorial.mdx | 2 +- .../appdev/modules/m4-query-with-pqs.mdx | 36 +- .../modules/m5-environment-configuration.mdx | 4 +- .../appdev/reference/pqs-sql-reference.mdx | 6 +- ...ocs-src-public-configuration-shell-223.mdx | 0 ...-docs-src-public-configuration-yaml-60.mdx | 0 ...-rst-code-docs-src-public-dpm-shell-86.mdx | 0 ...ocs-src-public-dpm-components-shell-14.mdx | 5 - ...ocs-src-public-dpm-components-shell-22.mdx | 5 - ...ocs-src-public-dpm-components-shell-32.mdx | 6 - ...nent-howtos-pqs-optimize-index-sql-194.mdx | 0 ...-howtos-pqs-references-sql-api-sql-208.mdx | 0 ...-howtos-pqs-references-sql-api-sql-216.mdx | 0 ...-howtos-pqs-references-sql-api-sql-244.mdx | 0 ...applications-develop-pqs-index-sql-109.mdx | 0 ...applications-develop-pqs-index-sql-122.mdx | 0 ...applications-develop-pqs-index-sql-135.mdx | 0 ...applications-develop-pqs-index-sql-144.mdx | 0 ...applications-develop-pqs-index-sql-161.mdx | 0 ...applications-develop-pqs-index-sql-175.mdx | 0 ...-applications-develop-pqs-index-sql-19.mdx | 0 ...applications-develop-pqs-index-sql-216.mdx | 0 ...applications-develop-pqs-index-sql-225.mdx | 0 ...applications-develop-pqs-index-sql-248.mdx | 0 ...applications-develop-pqs-index-sql-254.mdx | 0 ...applications-develop-pqs-index-sql-267.mdx | 0 ...applications-develop-pqs-index-sql-277.mdx | 0 ...-applications-develop-pqs-index-sql-58.mdx | 0 ...-applications-develop-pqs-index-sql-69.mdx | 0 ...-applications-develop-pqs-index-sql-75.mdx | 0 ...-applications-develop-pqs-index-sql-96.mdx | 0 ...applications-develop-pqs-index-text-23.mdx | 0 scripts/generate_external_snippets.py | 10 - tests/test_generate_external_snippets.py | 154 ++++++++ 38 files changed, 180 insertions(+), 497 deletions(-) delete mode 100644 config/snippet-config/dpm-snippet-list-remote.json delete mode 100644 config/snippet-config/scribe-snippet-list-remote.json rename docs-main/snippets/{external/dpm/main => dpm}/dpm-rst-code-docs-src-public-configuration-shell-223.mdx (100%) rename docs-main/snippets/{external/dpm/main => dpm}/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx (100%) rename docs-main/snippets/{external/dpm/main => dpm}/dpm-rst-code-docs-src-public-dpm-shell-86.mdx (100%) delete mode 100644 docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-14.mdx delete mode 100644 docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-22.mdx delete mode 100644 docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-32.mdx rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx (100%) rename docs-main/snippets/{external/scribe/main => pqs}/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx (100%) diff --git a/config/snippet-config/dpm-snippet-list-remote.json b/config/snippet-config/dpm-snippet-list-remote.json deleted file mode 100644 index 278e3309b..000000000 --- a/config/snippet-config/dpm-snippet-list-remote.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "snippets": [ - { - "snippetName": "dpm-rst-code-docs-src-public-configuration-yaml-60", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/configuration.rst", - "location": { - "type": "lines", - "start": 60, - "end": 63 - }, - "description": "", - "options": { - "language": "yaml", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-configuration-shell-223", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/configuration.rst", - "location": { - "type": "lines", - "start": 223, - "end": 224 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-dpm-components-shell-14", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/dpm-components.rst", - "location": { - "type": "lines", - "start": 14, - "end": 17 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-dpm-components-shell-22", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/dpm-components.rst", - "location": { - "type": "lines", - "start": 22, - "end": 24 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-dpm-components-shell-32", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/dpm-components.rst", - "location": { - "type": "lines", - "start": 32, - "end": 35 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-dpm-components-shell-42", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/dpm-components.rst", - "location": { - "type": "lines", - "start": 42, - "end": 43 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - }, - { - "snippetName": "dpm-rst-code-docs-src-public-dpm-shell-86", - "sourceRepo": "dpm", - "sourceFilepath": "docs/src/public/dpm.rst", - "location": { - "type": "lines", - "start": 86, - "end": 87 - }, - "description": "", - "options": { - "language": "shell", - "normalizeIndent": false - } - } - ] -} diff --git a/config/snippet-config/remote-snippet-lists.json b/config/snippet-config/remote-snippet-lists.json index db5b7df38..1dafa0926 100644 --- a/config/snippet-config/remote-snippet-lists.json +++ b/config/snippet-config/remote-snippet-lists.json @@ -5,9 +5,7 @@ "daml-snippet-list-remote.json", "daml-shell-snippet-list-remote.json", "daml-finance-snippet-list-remote.json", - "dpm-snippet-list-remote.json", "cn-quickstart-snippet-list-remote.json", - "splice-snippet-list-remote.json", - "scribe-snippet-list-remote.json" + "splice-snippet-list-remote.json" ] } diff --git a/config/snippet-config/scribe-snippet-list-remote.json b/config/snippet-config/scribe-snippet-list-remote.json deleted file mode 100644 index fcc79336f..000000000 --- a/config/snippet-config/scribe-snippet-list-remote.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "snippets": [ - { - "snippetName": "scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/component-howtos/pqs/optimize/index.rst", - "location": { - "type": "lines", - "start": 194, - "end": 198 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/component-howtos/pqs/references/sql-api.rst", - "location": { - "type": "lines", - "start": 208, - "end": 211 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/component-howtos/pqs/references/sql-api.rst", - "location": { - "type": "lines", - "start": 216, - "end": 218 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/component-howtos/pqs/references/sql-api.rst", - "location": { - "type": "lines", - "start": 244, - "end": 248 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 19, - "end": 20 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 23, - "end": 47 - }, - "description": "", - "options": { - "language": "text", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 58, - "end": 61 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 69, - "end": 72 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 75, - "end": 79 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 96, - "end": 100 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 109, - "end": 113 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 122, - "end": 126 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 135, - "end": 136 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 144, - "end": 147 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 161, - "end": 164 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 175, - "end": 179 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 216, - "end": 222 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 225, - "end": 231 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 248, - "end": 249 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 254, - "end": 257 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 267, - "end": 272 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - }, - { - "snippetName": "scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277", - "sourceRepo": "scribe", - "sourceFilepath": "docs/user/sdlc-howtos/applications/develop/pqs/index.rst", - "location": { - "type": "lines", - "start": 277, - "end": 282 - }, - "description": "", - "options": { - "language": "sql", - "normalizeIndent": false - } - } - ] -} diff --git a/docs-main/appdev/deep-dives/performance-optimization.mdx b/docs-main/appdev/deep-dives/performance-optimization.mdx index 82a922010..b0b75fef2 100644 --- a/docs-main/appdev/deep-dives/performance-optimization.mdx +++ b/docs-main/appdev/deep-dives/performance-optimization.mdx @@ -5,7 +5,7 @@ description: "Scale Canton applications for throughput and latency: network and import ExternalCantonMainCommunityAppSrcTestResourcesDocumentationSnippetsCommandServiceMaxCommandsInFlight from "/snippets/external/canton/main/community/app/src/test/resources/documentation-snippets/command-service-max-commands-in-flight.mdx"; import ExternalCantonMainCommunityAppSrcTestResourcesDocumentationSnippetsSequencerClientThrottling from "/snippets/external/canton/main/community/app/src/test/resources/documentation-snippets/sequencer-client-throttling.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsOptimizeIndexSql194 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsOptimizeIndexSql194 from "/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx"; import ExternalCantonMainCommunityAppSrcTestResourcesDocumentationSnippetsCachingConfig from "/snippets/external/canton/main/community/app/src/test/resources/documentation-snippets/caching-configs.mdx"; import DamlAppdevModulesM7PerformanceL36 from "/snippets/daml-docs/appdev_modules_m7-performance_L36.mdx"; import DamlAppdevModulesM7PerformanceL45 from "/snippets/daml-docs/appdev_modules_m7-performance_L45.mdx"; diff --git a/docs-main/appdev/modules/m4-json-api-tutorial.mdx b/docs-main/appdev/modules/m4-json-api-tutorial.mdx index 36959aec3..aab8bc467 100644 --- a/docs-main/appdev/modules/m4-json-api-tutorial.mdx +++ b/docs-main/appdev/modules/m4-json-api-tutorial.mdx @@ -4,7 +4,7 @@ description: "Get started with Canton and the JSON Ledger API, first with curl a --- import DamlSdksToolsCliToolsDpmL44 from "/snippets/daml-docs/sdks-tools_cli-tools_dpm_L44.mdx"; -import ExternalDpmMainDpmRstCodeDocsSrcPublicDpmShell86 from "/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-shell-86.mdx"; +import ExternalDpmMainDpmRstCodeDocsSrcPublicDpmShell86 from "/snippets/dpm/dpm-rst-code-docs-src-public-dpm-shell-86.mdx"; {/* COPIED_START source="docs-website:docs/replicated/canton/3.5/sdk/tutorials/json-api/canton_and_the_json_ledger_api.rst" hash="20dc2f6c" */} diff --git a/docs-main/appdev/modules/m4-query-with-pqs.mdx b/docs-main/appdev/modules/m4-query-with-pqs.mdx index a86377889..33dae3e6a 100644 --- a/docs-main/appdev/modules/m4-query-with-pqs.mdx +++ b/docs-main/appdev/modules/m4-query-with-pqs.mdx @@ -3,24 +3,24 @@ title: "Query Contracts and Transactions with PQS" description: "Use the Participant Query Store (PQS) to query Daml contracts and transactions via SQL." --- -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql19 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexText23 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql58 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql69 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql75 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql96 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql109 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql122 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql135 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql144 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql161 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql175 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql216 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql225 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql248 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql254 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql267 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql277 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql19 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexText23 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql58 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql69 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql75 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql96 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql109 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql122 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql135 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql144 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql161 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql175 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql216 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql225 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql248 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql254 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql267 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserSdlcHowtosApplicationsDevelopPqsIndexSql277 from "/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx"; {/* COPIED_START source="docs-website:docs/replicated/pqs/3.4/sdlc-howtos/applications/develop/pqs/index.rst" hash="a0009fae" */} diff --git a/docs-main/appdev/modules/m5-environment-configuration.mdx b/docs-main/appdev/modules/m5-environment-configuration.mdx index 101c22961..6621c15a9 100644 --- a/docs-main/appdev/modules/m5-environment-configuration.mdx +++ b/docs-main/appdev/modules/m5-environment-configuration.mdx @@ -6,8 +6,8 @@ description: "Configuring DPM, project settings, and authentication for differen import DamlDocsAppdevModulesM5EnvironmentConfigurationL96 from "/snippets/daml-docs/appdev_modules_m5-environment-configuration_L96.mdx"; import DamlDocsAppdevModulesM5EnvironmentConfigurationL108 from "/snippets/daml-docs/appdev_modules_m5-environment-configuration_L108.mdx"; import DamlDocsAppdevModulesM5EnvironmentConfigurationL127 from "/snippets/daml-docs/appdev_modules_m5-environment-configuration_L127.mdx"; -import ExternalDpmMainDpmRstCodeDocsSrcPublicConfigurationYaml60 from "/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx"; -import ExternalDpmMainDpmRstCodeDocsSrcPublicConfigurationShell223 from "/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-shell-223.mdx"; +import ExternalDpmMainDpmRstCodeDocsSrcPublicConfigurationYaml60 from "/snippets/dpm/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx"; +import ExternalDpmMainDpmRstCodeDocsSrcPublicConfigurationShell223 from "/snippets/dpm/dpm-rst-code-docs-src-public-configuration-shell-223.mdx"; Canton applications need different configurations for each environment — LocalNet, DevNet, TestNet, and MainNet. This page covers the configuration layers you work with: DPM global settings, project-level `daml.yaml`, environment variables, and authentication setup. diff --git a/docs-main/appdev/reference/pqs-sql-reference.mdx b/docs-main/appdev/reference/pqs-sql-reference.mdx index d1fc2103a..850b481f5 100644 --- a/docs-main/appdev/reference/pqs-sql-reference.mdx +++ b/docs-main/appdev/reference/pqs-sql-reference.mdx @@ -13,9 +13,9 @@ import DamlDocsAppdevReferencePqsSqlReferenceL410 from "/snippets/daml-docs/appd import DamlDocsAppdevReferencePqsSqlReferenceL416 from "/snippets/daml-docs/appdev_reference_pqs-sql-reference_L416.mdx"; import DamlDocsAppdevReferencePqsSqlReferenceL432 from "/snippets/daml-docs/appdev_reference_pqs-sql-reference_L432.mdx"; import DamlDocsAppdevReferencePqsSqlReferenceL455 from "/snippets/daml-docs/appdev_reference_pqs-sql-reference_L455.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql208 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql216 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx"; -import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql244 from "/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql208 from "/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql216 from "/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx"; +import ExternalScribeMainScribeRstCodeDocsUserComponentHowtosPqsReferencesSqlApiSql244 from "/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx"; The PQS SQL API is provisioned directly in the PostgreSQL database. Data consumers interact with it through SQL -- not through the PQS process itself. diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-shell-223.mdx b/docs-main/snippets/dpm/dpm-rst-code-docs-src-public-configuration-shell-223.mdx similarity index 100% rename from docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-shell-223.mdx rename to docs-main/snippets/dpm/dpm-rst-code-docs-src-public-configuration-shell-223.mdx diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx b/docs-main/snippets/dpm/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx similarity index 100% rename from docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx rename to docs-main/snippets/dpm/dpm-rst-code-docs-src-public-configuration-yaml-60.mdx diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-shell-86.mdx b/docs-main/snippets/dpm/dpm-rst-code-docs-src-public-dpm-shell-86.mdx similarity index 100% rename from docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-shell-86.mdx rename to docs-main/snippets/dpm/dpm-rst-code-docs-src-public-dpm-shell-86.mdx diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-14.mdx b/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-14.mdx deleted file mode 100644 index 5a841828a..000000000 --- a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-14.mdx +++ /dev/null @@ -1,5 +0,0 @@ -```shell - dpm publish component oci://: \ - --platform generic="/path/to/component/directory" \ - --extra-tags devnet # optional -``` \ No newline at end of file diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-22.mdx b/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-22.mdx deleted file mode 100644 index 7ff685bf0..000000000 --- a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-22.mdx +++ /dev/null @@ -1,5 +0,0 @@ -```shell - dpm publish component oci://example.com/my/components/foo:1.0.0 \ - --platform generic="~/component-foo" \ - --extra-tags devnet # optional -``` \ No newline at end of file diff --git a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-32.mdx b/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-32.mdx deleted file mode 100644 index 87058a5e4..000000000 --- a/docs-main/snippets/external/dpm/main/dpm-rst-code-docs-src-public-dpm-components-shell-32.mdx +++ /dev/null @@ -1,6 +0,0 @@ -```shell - dpm publish component oci://example.com/my/components/foo:1.0.0 \ - --platform linux/arm64="/some/directory" \ - --platform windows/amd64="/another/directory" \ - --extra-tags devnet # optional -``` \ No newline at end of file diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-optimize-index-sql-194.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-208.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-216.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-component-howtos-pqs-references-sql-api-sql-244.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-109.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-122.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-135.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-144.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-161.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-175.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-19.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-216.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-225.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-248.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-254.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-267.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-277.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-58.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-69.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-75.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-sql-96.mdx diff --git a/docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx b/docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx similarity index 100% rename from docs-main/snippets/external/scribe/main/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx rename to docs-main/snippets/pqs/scribe-rst-code-docs-user-sdlc-howtos-applications-develop-pqs-index-text-23.mdx diff --git a/scripts/generate_external_snippets.py b/scripts/generate_external_snippets.py index 77f4e27bc..8cb1a43db 100644 --- a/scripts/generate_external_snippets.py +++ b/scripts/generate_external_snippets.py @@ -48,11 +48,6 @@ class SnippetRepo: ), needs_docker=True, ), - "dpm": SnippetRepo( - name="dpm", - config_name="dpm-snippet-list-remote.json", - aliases=("dpm",), - ), "daml": SnippetRepo( name="daml", config_name="daml-snippet-list-remote.json", @@ -68,11 +63,6 @@ class SnippetRepo: config_name="daml-finance-snippet-list-remote.json", aliases=("daml-finance",), ), - "scribe": SnippetRepo( - name="scribe", - config_name="scribe-snippet-list-remote.json", - aliases=("scribe",), - ), "splice": SnippetRepo( name="splice", config_name="splice-snippet-list-remote.json", diff --git a/tests/test_generate_external_snippets.py b/tests/test_generate_external_snippets.py index 550e5b15c..ed0bc6eeb 100644 --- a/tests/test_generate_external_snippets.py +++ b/tests/test_generate_external_snippets.py @@ -135,3 +135,157 @@ def test_wrapper_copies_helper_runs_extraction_and_copies_output( "```text\nhello\n```" ) assert (target / "example.mdx").read_text(encoding="utf-8") == "```text\nhello\n```" + + +def _write_fixture_repo( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + source_text: str, + location: dict, + options: dict | None = None, +) -> tuple[generator.SnippetRepo, Path]: + import json + + real_helper = generator.helper_path() + fake_root = tmp_path / "cf-docs" + fake_helper = fake_root / "scripts" / "helpers" / "generateOutputDocs.js" + fake_config = fake_root / "config" / "snippet-config" / "test-snippet-list.json" + source_dir = tmp_path / "source" + + fake_helper.parent.mkdir(parents=True) + shutil.copy2(real_helper, fake_helper) + fake_config.parent.mkdir(parents=True) + fake_config.write_text( + json.dumps( + { + "snippets": [ + { + "snippetName": "example", + "sourceRepo": "test", + "sourceFilepath": "docs/example.txt", + "location": location, + "options": options or {"language": "text"}, + } + ] + } + ), + encoding="utf-8", + ) + (source_dir / "docs").mkdir(parents=True) + (source_dir / "docs" / "example.txt").write_text(source_text, encoding="utf-8") + + repo = generator.SnippetRepo( + name="test", + config_name="test-snippet-list.json", + aliases=("test",), + ) + monkeypatch.setattr(generator, "CF_DOCS_ROOT", fake_root) + return repo, source_dir + + +def test_string_marker_preserves_indentation_of_first_line( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch +) -> None: + """Indented sources (e.g. RST literal blocks) must keep relative alignment. + + Regression test for the former ``.trim()`` behavior that stripped leading + whitespace from the first content line only, misaligning multi-line + indented snippets. + """ + repo, source_dir = _write_fixture_repo( + tmp_path, + monkeypatch, + source_text=( + ".. code-block:: text\n" + " :name: marker-start\n" + "\n" + " > command\n" + " output line\n" + "\n" + ".. marker-end\n" + ), + location={"type": "stringMarker", "start": "marker-start", "end": "marker-end"}, + options={"language": "text", "normalizeIndent": False}, + ) + + helper = generator.copy_helper_and_config(repo, source_dir, dry_run=False) + generator.run_extraction(source_dir, helper, quiet=True, dry_run=False) + + assert (source_dir / "docs-output" / "example.mdx").read_text(encoding="utf-8") == ( + "```text\n > command\n output line\n```" + ) + + +def test_string_marker_must_appear_exactly_once( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch +) -> None: + import subprocess + + repo, source_dir = _write_fixture_repo( + tmp_path, + monkeypatch, + source_text="MARKER_START\nfirst\nMARKER_END\nMARKER_START\nsecond\nMARKER_END\n", + location={"type": "stringMarker", "start": "MARKER_START", "end": "MARKER_END"}, + ) + + helper = generator.copy_helper_and_config(repo, source_dir, dry_run=False) + with pytest.raises(subprocess.CalledProcessError): + generator.run_extraction(source_dir, helper, quiet=True, dry_run=False) + + +def test_internal_source_configs_have_no_line_selectors() -> None: + """canton/daml-shell must use string markers; scribe/dpm remote configs are retired. + + Line-number selectors silently corrupt published snippets when the + upstream source shifts. The internal-source migration replaced them with + string markers (canton, daml-shell) or removed the remote source entirely + (scribe and dpm transferred docs ownership to cf-docs). + """ + import json + + config_dir = generator.CF_DOCS_ROOT / "config" / "snippet-config" + + for name in ("canton-snippet-list-remote.json", "daml-shell-snippet-list-remote.json"): + data = json.loads((config_dir / name).read_text(encoding="utf-8")) + lines_entries = [ + s["snippetName"] + for s in data["snippets"] + if s["location"]["type"] == "lines" + ] + assert lines_entries == [], f"{name} must not use line selectors: {lines_entries}" + + for retired in ("scribe-snippet-list-remote.json", "dpm-snippet-list-remote.json"): + assert not (config_dir / retired).exists(), f"{retired} was retired; do not re-add it" + + lists = json.loads( + (config_dir / "remote-snippet-lists.json").read_text(encoding="utf-8") + )["snippetLists"] + assert "scribe-snippet-list-remote.json" not in lists + assert "dpm-snippet-list-remote.json" not in lists + + +def test_internal_source_marker_tokens_are_unique_per_source_file() -> None: + """Marker tokens must be unique and non-overlapping within each source file.""" + import itertools + import json + + config_dir = generator.CF_DOCS_ROOT / "config" / "snippet-config" + + for name in ("canton-snippet-list-remote.json", "daml-shell-snippet-list-remote.json"): + data = json.loads((config_dir / name).read_text(encoding="utf-8")) + by_file: dict[str, list[str]] = {} + for snippet in data["snippets"]: + location = snippet["location"] + if location["type"] != "stringMarker": + continue + tokens = by_file.setdefault(snippet["sourceFilepath"], []) + tokens.extend((location["start"], location["end"])) + for source_file, tokens in by_file.items(): + assert len(tokens) == len(set(tokens)), ( + f"duplicate marker tokens for {source_file} in {name}" + ) + for a, b in itertools.permutations(tokens, 2): + assert a not in b, ( + f"marker token {a!r} is a substring of {b!r} in {source_file}; " + "extraction by indexOf would match the wrong marker" + )