@redpanda-data/docs-extensions-and-macros 5.3.0 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/doc-tools.js +46 -8
- package/cli-utils/diff-utils.js +42 -7
- package/package.json +1 -1
- package/tools/property-extractor/Makefile +46 -12
- package/tools/property-extractor/cloud_config.py +43 -14
- package/tools/property-extractor/compare-properties.js +4 -3
- package/tools/property-extractor/pr-summary-formatter.js +7 -4
- package/tools/property-extractor/property_extractor.py +102 -7
- package/tools/rpk-docs/detect-platform-commands.js +566 -0
- package/tools/rpk-docs/generate-rpk-docs.js +33 -12
- package/tools/rpk-docs/rpk-docs-handler.js +105 -112
- package/tools/rpk-docs/templates/command.hbs +12 -0
- package/tools/rpk-docs/validate-overrides.js +16 -0
- package/tools/property-extractor/templates/property-backup.hbs +0 -161
- package/tools/property-extractor/templates/topic-property-backup.hbs +0 -148
|
@@ -8,6 +8,7 @@ const os = require('os')
|
|
|
8
8
|
const semver = require('semver')
|
|
9
9
|
const { findRepoRoot } = require('../../cli-utils/doc-tools-utils')
|
|
10
10
|
const { generateRpkDocs, applyOverridesToTree, resolveReferences, shouldExcludeCommand, shouldUsePartialDir } = require('./generate-rpk-docs')
|
|
11
|
+
const { detectLinuxOnlyFromSource, warnIfDetectionLooksBroken } = require('./detect-platform-commands')
|
|
11
12
|
const { generateRpkDiff, printDiffReport, generateWhatsNewSection, flattenToMap } = require('./report-delta')
|
|
12
13
|
const { loadAndValidateOverrides, ValidationResult } = require('./validate-overrides')
|
|
13
14
|
const { validateDirectory, formatResults } = require('./validate-output')
|
|
@@ -656,105 +657,6 @@ function fetchRpkTreeFromLinuxSource(sourcePath, pluginPins = {}) {
|
|
|
656
657
|
}
|
|
657
658
|
}
|
|
658
659
|
|
|
659
|
-
/**
|
|
660
|
-
* Scan Go source files for Linux-only build tags
|
|
661
|
-
* Looks for //go:build linux or // +build linux
|
|
662
|
-
* @param {string} sourcePath - Path to rpk Go source directory
|
|
663
|
-
* @returns {Set<string>} Set of Linux-only command paths (e.g., 'rpk redpanda tune')
|
|
664
|
-
*/
|
|
665
|
-
function detectLinuxOnlyFromSource(sourcePath) {
|
|
666
|
-
const linuxOnlyCommands = new Set()
|
|
667
|
-
|
|
668
|
-
// Map of source directory patterns to command paths
|
|
669
|
-
// rpk commands are typically in pkg/cli/cmd/<command>/<subcommand>/
|
|
670
|
-
const scanDirectory = (dir, prefix = '') => {
|
|
671
|
-
if (!fs.existsSync(dir)) return
|
|
672
|
-
|
|
673
|
-
const entries = fs.readdirSync(dir, { withFileTypes: true })
|
|
674
|
-
|
|
675
|
-
for (const entry of entries) {
|
|
676
|
-
const fullPath = path.join(dir, entry.name)
|
|
677
|
-
|
|
678
|
-
if (entry.isDirectory()) {
|
|
679
|
-
// Recurse into subdirectories
|
|
680
|
-
const newPrefix = prefix ? `${prefix} ${entry.name}` : entry.name
|
|
681
|
-
scanDirectory(fullPath, newPrefix)
|
|
682
|
-
} else if (entry.name.endsWith('.go') && !entry.name.endsWith('_test.go')) {
|
|
683
|
-
// Check Go files for build tags
|
|
684
|
-
try {
|
|
685
|
-
const content = fs.readFileSync(fullPath, 'utf8')
|
|
686
|
-
const firstLines = content.split('\n').slice(0, 20).join('\n')
|
|
687
|
-
|
|
688
|
-
// Check for Linux build constraints
|
|
689
|
-
const hasLinuxTag = /\/\/go:build\s+.*linux/.test(firstLines) ||
|
|
690
|
-
/\/\/\s*\+build\s+.*linux/.test(firstLines)
|
|
691
|
-
|
|
692
|
-
if (hasLinuxTag) {
|
|
693
|
-
// Try to determine command path from file location
|
|
694
|
-
const commandPath = inferCommandPath(sourcePath, fullPath, entry.name)
|
|
695
|
-
if (commandPath) {
|
|
696
|
-
linuxOnlyCommands.add(commandPath)
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
} catch (err) {
|
|
700
|
-
// Skip files we can't read
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
// Scan the cmd/rpk directory for command implementations
|
|
707
|
-
const cmdDir = path.join(sourcePath, 'pkg', 'cli', 'cmd')
|
|
708
|
-
if (fs.existsSync(cmdDir)) {
|
|
709
|
-
scanDirectory(cmdDir, 'rpk')
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
// Also check the older structure
|
|
713
|
-
const oldCmdDir = path.join(sourcePath, 'cmd', 'rpk')
|
|
714
|
-
if (fs.existsSync(oldCmdDir)) {
|
|
715
|
-
scanDirectory(oldCmdDir, 'rpk')
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
return linuxOnlyCommands
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Infer command path from Go source file location
|
|
723
|
-
* @param {string} sourcePath - Root source path
|
|
724
|
-
* @param {string} filePath - Full path to Go file
|
|
725
|
-
* @param {string} fileName - Name of the Go file
|
|
726
|
-
* @returns {string|null} Command path or null
|
|
727
|
-
*/
|
|
728
|
-
function inferCommandPath(sourcePath, filePath, fileName) {
|
|
729
|
-
// Get relative path from source root
|
|
730
|
-
const relativePath = filePath.replace(sourcePath, '').replace(/^\//, '')
|
|
731
|
-
|
|
732
|
-
// Common patterns:
|
|
733
|
-
// pkg/cli/cmd/redpanda/tune.go -> rpk redpanda tune
|
|
734
|
-
// pkg/cli/cmd/redpanda/start.go -> rpk redpanda start
|
|
735
|
-
// cmd/rpk/iotune/iotune.go -> rpk iotune
|
|
736
|
-
|
|
737
|
-
// Remove common prefixes and file extension
|
|
738
|
-
let parts = relativePath
|
|
739
|
-
.replace(/^pkg\/cli\/cmd\//, '')
|
|
740
|
-
.replace(/^cmd\/rpk\//, '')
|
|
741
|
-
.replace(/\.go$/, '')
|
|
742
|
-
.split('/')
|
|
743
|
-
|
|
744
|
-
// If file name matches directory name, use directory only
|
|
745
|
-
// e.g., iotune/iotune.go -> iotune
|
|
746
|
-
if (parts.length > 1 && parts[parts.length - 1] === parts[parts.length - 2]) {
|
|
747
|
-
parts = parts.slice(0, -1)
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Filter out common non-command directories
|
|
751
|
-
parts = parts.filter(p => !['internal', 'common', 'config', 'cmd'].includes(p))
|
|
752
|
-
|
|
753
|
-
if (parts.length === 0) return null
|
|
754
|
-
|
|
755
|
-
return 'rpk ' + parts.join(' ')
|
|
756
|
-
}
|
|
757
|
-
|
|
758
660
|
/**
|
|
759
661
|
* Add platform markers to command tree based on source analysis
|
|
760
662
|
* @param {Object} tree - Command tree from rpk --print-tree
|
|
@@ -769,11 +671,18 @@ function addPlatformMarkersFromSource(tree, linuxOnlyCommands) {
|
|
|
769
671
|
[...linuxOnlyCommands].some(loc => cmdPath.startsWith(loc + ' '))
|
|
770
672
|
}
|
|
771
673
|
|
|
674
|
+
// Collect every tree path actually marked Linux-only so the persisted
|
|
675
|
+
// linux_only_commands list is fully expanded (each descendant listed),
|
|
676
|
+
// matching what dynamic Linux-vs-Darwin tree comparison produces.
|
|
677
|
+
const markedPaths = new Set()
|
|
678
|
+
|
|
772
679
|
const markCommands = (commands, parentPath = 'rpk') => {
|
|
773
680
|
if (!commands) return commands
|
|
774
681
|
return commands.map(cmd => {
|
|
775
682
|
const fullPath = `${parentPath} ${cmd.name}`
|
|
776
|
-
const
|
|
683
|
+
const linuxOnly = isLinuxOnly(fullPath)
|
|
684
|
+
if (linuxOnly) markedPaths.add(fullPath)
|
|
685
|
+
const platforms = linuxOnly
|
|
777
686
|
? [PLATFORMS.LINUX]
|
|
778
687
|
: [PLATFORMS.LINUX, PLATFORMS.DARWIN]
|
|
779
688
|
return {
|
|
@@ -792,11 +701,15 @@ function addPlatformMarkersFromSource(tree, linuxOnlyCommands) {
|
|
|
792
701
|
}
|
|
793
702
|
}
|
|
794
703
|
|
|
704
|
+
const markedCommands = markCommands(tree.commands)
|
|
705
|
+
|
|
795
706
|
return {
|
|
796
707
|
...tree,
|
|
797
708
|
platforms: [PLATFORMS.LINUX, PLATFORMS.DARWIN],
|
|
798
|
-
|
|
799
|
-
|
|
709
|
+
// Union of detected paths and marked tree paths: keeps detected roots
|
|
710
|
+
// even when the tree was built on a platform where they don't exist
|
|
711
|
+
linux_only_commands: [...new Set([...linuxOnlyCommands, ...markedPaths])].sort(),
|
|
712
|
+
commands: markedCommands
|
|
800
713
|
}
|
|
801
714
|
}
|
|
802
715
|
|
|
@@ -1166,6 +1079,37 @@ function makeLinkablePredicate(overridesData) {
|
|
|
1166
1079
|
}
|
|
1167
1080
|
}
|
|
1168
1081
|
|
|
1082
|
+
// Command subtrees whose changes never belong in the Self-Managed What's
|
|
1083
|
+
// new. rpk ai's documentation home is adp-docs, and the ADP release notes
|
|
1084
|
+
// already cover its CLI changes per release. The plugin-release receiver
|
|
1085
|
+
// workflow excludes ai from --update-whats-new for exactly this reason; the
|
|
1086
|
+
// full-regeneration path must agree, or a full run floods the Self-Managed
|
|
1087
|
+
// release notes with rpk ai entries (a rename release alone produces 21 new
|
|
1088
|
+
// plus 21 removed bullets).
|
|
1089
|
+
const WHATS_NEW_EXCLUDED_SUBTREES = ['rpk ai']
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* Return a copy of diffData without entries under the excluded subtrees.
|
|
1093
|
+
* Only the published What's-new block filters; diff reports and PR
|
|
1094
|
+
* summaries keep the full picture.
|
|
1095
|
+
* @param {Object} diffData - Diff from generateRpkDiff
|
|
1096
|
+
* @param {string[]} [excluded] - Command-path prefixes to drop
|
|
1097
|
+
* @returns {Object} Filtered copy
|
|
1098
|
+
*/
|
|
1099
|
+
function filterDiffForWhatsNew(diffData, excluded = WHATS_NEW_EXCLUDED_SUBTREES) {
|
|
1100
|
+
const outside = (cmdPath) => !excluded.some(prefix =>
|
|
1101
|
+
cmdPath === prefix || (typeof cmdPath === 'string' && cmdPath.startsWith(prefix + ' ')))
|
|
1102
|
+
const details = diffData.details || {}
|
|
1103
|
+
const filteredDetails = { ...details }
|
|
1104
|
+
for (const key of ['newCommands', 'newlyDeprecatedCommands', 'removedCommands', 'descriptionChanges']) {
|
|
1105
|
+
if (Array.isArray(details[key])) filteredDetails[key] = details[key].filter(e => outside(e.path))
|
|
1106
|
+
}
|
|
1107
|
+
for (const key of ['newFlags', 'removedFlags', 'changedDefaults', 'changedFlagTypes', 'changedFlagRequirements', 'changedFlagDescriptions']) {
|
|
1108
|
+
if (Array.isArray(details[key])) filteredDetails[key] = details[key].filter(e => outside(e.commandPath))
|
|
1109
|
+
}
|
|
1110
|
+
return { ...diffData, details: filteredDetails }
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1169
1113
|
function updateWhatsNewFile(diffData, whatsNewPath, version, options = {}) {
|
|
1170
1114
|
// Each block opens with a "=== <version>" heading so accumulated blocks
|
|
1171
1115
|
// (successive RCs, multiple plugin releases) never collide on section ids
|
|
@@ -1437,8 +1381,28 @@ function acquireRpkBinary(rpkVersion, options = {}) {
|
|
|
1437
1381
|
console.warn(`Native build failed (${nativeErr.message.split('\n')[0]}); building in a container...`)
|
|
1438
1382
|
const goVersion = getRequiredGoVersion(sourcePath)
|
|
1439
1383
|
const goImage = goVersion ? `golang:${goVersion}` : 'golang:1'
|
|
1384
|
+
// Cross-compile for the HOST platform: the container reports
|
|
1385
|
+
// GOOS=linux, and a linux binary dies silently when executed on the
|
|
1386
|
+
// macOS host that needs it for plugin installs (review finding on the
|
|
1387
|
+
// 5.3.0 train). rpk builds with CGO disabled, so cross-compilation
|
|
1388
|
+
// from the linux container is safe.
|
|
1389
|
+
// Only macOS and Linux hosts are supported: mapping anything else to
|
|
1390
|
+
// linux would hand a Windows host an unrunnable binary, the exact bug
|
|
1391
|
+
// class the cross-compile fixes (review finding on #238).
|
|
1392
|
+
if (process.platform !== 'darwin' && process.platform !== 'linux') {
|
|
1393
|
+
throw new Error(
|
|
1394
|
+
`${nativeErr.message}\n` +
|
|
1395
|
+
`Container fallback does not support host platform "${process.platform}". ` +
|
|
1396
|
+
'Update Go, or pass --rpk-bin <path> to use an existing rpk binary.'
|
|
1397
|
+
)
|
|
1398
|
+
}
|
|
1399
|
+
const hostGoos = process.platform === 'darwin' ? 'darwin' : 'linux'
|
|
1400
|
+
const hostGoarch = process.arch === 'arm64' ? 'arm64' : 'amd64'
|
|
1440
1401
|
const buildResult = spawnSync('docker', [
|
|
1441
1402
|
'run', '--rm',
|
|
1403
|
+
'-e', `GOOS=${hostGoos}`,
|
|
1404
|
+
'-e', `GOARCH=${hostGoarch}`,
|
|
1405
|
+
'-e', 'CGO_ENABLED=0',
|
|
1442
1406
|
'-v', `${path.resolve(sourcePath)}:/rpk-source:ro`,
|
|
1443
1407
|
'-v', `${workDir}:/out`,
|
|
1444
1408
|
'-w', '/rpk-source',
|
|
@@ -2001,10 +1965,14 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2001
1965
|
// render without xrefs because plugin subtrees may render as
|
|
2002
1966
|
// partials with no linkable pages.
|
|
2003
1967
|
if (whatsNewPath) {
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1968
|
+
if (WHATS_NEW_EXCLUDED_SUBTREES.includes(`rpk ${plugin}`)) {
|
|
1969
|
+
console.log(`Skipping What's new for rpk ${plugin}: its documentation home covers CLI changes in its own release notes`)
|
|
1970
|
+
} else {
|
|
1971
|
+
const label = resolvedVersion
|
|
1972
|
+
? `${plugin} plugin ${resolvedVersion}`
|
|
1973
|
+
: `${plugin} plugin`
|
|
1974
|
+
updateWhatsNewFile(pluginDiffData, whatsNewPath, label, { xrefs: false, sectionHeading: '== rpk plugins' })
|
|
1975
|
+
}
|
|
2008
1976
|
}
|
|
2009
1977
|
}
|
|
2010
1978
|
|
|
@@ -2117,7 +2085,7 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2117
2085
|
|
|
2118
2086
|
// Update what's-new file if requested
|
|
2119
2087
|
if (whatsNewPath) {
|
|
2120
|
-
updateWhatsNewFile(diffData, whatsNewPath, rpkVersion, { linkable: makeLinkablePredicate(overridesData), hasSubcommands: makeSubcommandPredicate(tree) })
|
|
2088
|
+
updateWhatsNewFile(filterDiffForWhatsNew(diffData), whatsNewPath, rpkVersion, { linkable: makeLinkablePredicate(overridesData), hasSubcommands: makeSubcommandPredicate(tree) })
|
|
2121
2089
|
}
|
|
2122
2090
|
} else {
|
|
2123
2091
|
console.warn(`Warning: Could not load previous version ${diffVersion} for diff`)
|
|
@@ -2217,10 +2185,17 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2217
2185
|
rpkVersion = effectiveRef || 'local'
|
|
2218
2186
|
|
|
2219
2187
|
// Step 2: Detect Linux-only commands
|
|
2220
|
-
//
|
|
2221
|
-
//
|
|
2188
|
+
// Static detection (build-constraint analysis) works on any platform,
|
|
2189
|
+
// including Linux CI runners. Dynamic detection (comparing Linux vs
|
|
2190
|
+
// Darwin builds) supplements it below when the host can run both.
|
|
2222
2191
|
console.log('\nAnalyzing source for Linux-only commands...')
|
|
2223
2192
|
let linuxOnlyCommands = detectLinuxOnlyFromSource(sourcePath)
|
|
2193
|
+
if (linuxOnlyCommands.size > 0) {
|
|
2194
|
+
console.log(`Static detection found ${linuxOnlyCommands.size} Linux-only command path(s):`)
|
|
2195
|
+
for (const cmd of [...linuxOnlyCommands].sort()) {
|
|
2196
|
+
console.log(` - ${cmd}`)
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2224
2199
|
|
|
2225
2200
|
// Step 3: Build rpk and get command tree
|
|
2226
2201
|
// Use Docker if available (for running rpk plugins in Linux)
|
|
@@ -2230,8 +2205,19 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2230
2205
|
const canBuildNative = goCheck.status === 0
|
|
2231
2206
|
const canBuildLinux = dockerCheck.status === 0
|
|
2232
2207
|
|
|
2233
|
-
// Dynamic detection: if we can build on both platforms, compare the trees
|
|
2234
|
-
|
|
2208
|
+
// Dynamic detection: if we can build on both platforms, compare the trees.
|
|
2209
|
+
// Only possible on non-Linux hosts: a Linux runner can cross-compile a
|
|
2210
|
+
// darwin rpk but cannot execute it to get its command tree, so Linux CI
|
|
2211
|
+
// relies on the static detection above.
|
|
2212
|
+
// RPK_DOCS_SKIP_DYNAMIC_DETECTION=1 forces the static-only path (useful
|
|
2213
|
+
// for testing what a Linux CI runner would produce).
|
|
2214
|
+
const skipDynamicDetection = ['1', 'true'].includes(
|
|
2215
|
+
String(process.env.RPK_DOCS_SKIP_DYNAMIC_DETECTION || '').toLowerCase()
|
|
2216
|
+
)
|
|
2217
|
+
if (skipDynamicDetection) {
|
|
2218
|
+
console.log('\nDynamic platform detection disabled via RPK_DOCS_SKIP_DYNAMIC_DETECTION')
|
|
2219
|
+
}
|
|
2220
|
+
if (canBuildLinux && canBuildNative && os.platform() !== 'linux' && !skipDynamicDetection) {
|
|
2235
2221
|
console.log('\nBuilding rpk on both Linux and Darwin for dynamic platform detection...')
|
|
2236
2222
|
|
|
2237
2223
|
try {
|
|
@@ -2297,6 +2283,12 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2297
2283
|
)
|
|
2298
2284
|
}
|
|
2299
2285
|
|
|
2286
|
+
// Tripwire: an empty combined detection result while the source tree
|
|
2287
|
+
// demonstrably contains Linux-gated files means the scan is broken and
|
|
2288
|
+
// Linux-only pages are about to be published as cross-platform
|
|
2289
|
+
// (see redpanda-data/docs#1831).
|
|
2290
|
+
warnIfDetectionLooksBroken(sourcePath, linuxOnlyCommands)
|
|
2291
|
+
|
|
2300
2292
|
// Step 4: Add platform markers based on detection
|
|
2301
2293
|
// This includes both source scanning results and static fallback lists
|
|
2302
2294
|
tree = addPlatformMarkersFromSource(tree, linuxOnlyCommands)
|
|
@@ -2413,7 +2405,7 @@ async function handleRpkDocsGeneration(options = {}) {
|
|
|
2413
2405
|
|
|
2414
2406
|
// Update what's-new file if requested
|
|
2415
2407
|
if (whatsNewPath) {
|
|
2416
|
-
updateWhatsNewFile(diffData, whatsNewPath, rpkVersion, { linkable: makeLinkablePredicate(overridesData), hasSubcommands: makeSubcommandPredicate(tree) })
|
|
2408
|
+
updateWhatsNewFile(filterDiffForWhatsNew(diffData), whatsNewPath, rpkVersion, { linkable: makeLinkablePredicate(overridesData), hasSubcommands: makeSubcommandPredicate(tree) })
|
|
2417
2409
|
}
|
|
2418
2410
|
} else {
|
|
2419
2411
|
console.warn(`Warning: Could not load previous version ${diffVersion} for diff`)
|
|
@@ -2827,6 +2819,7 @@ module.exports = {
|
|
|
2827
2819
|
getPlatformDescription,
|
|
2828
2820
|
getCurrentPlatform,
|
|
2829
2821
|
updateOverridesWithIntroducedVersions,
|
|
2822
|
+
filterDiffForWhatsNew,
|
|
2830
2823
|
computeDescriptionCoverage,
|
|
2831
2824
|
updateWhatsNewFile,
|
|
2832
2825
|
KNOWN_PLUGINS,
|
|
@@ -389,8 +389,20 @@ This section provides examples of how to use `{{commandPath}}`.
|
|
|
389
389
|
|Command |Description
|
|
390
390
|
|
|
391
391
|
{{#each subcommands}}
|
|
392
|
+
{{#if cloudOnly}}
|
|
393
|
+
ifdef::env-cloud[]
|
|
394
|
+
{{/if}}
|
|
395
|
+
{{#if selfHostedOnly}}
|
|
396
|
+
ifndef::env-cloud[]
|
|
397
|
+
{{/if}}
|
|
392
398
|
|xref:{{xrefPath}}[`{{fullPath}}`]
|
|
393
399
|
|{{{shortDesc}}}
|
|
400
|
+
{{#if cloudOnly}}
|
|
401
|
+
endif::[]
|
|
402
|
+
{{/if}}
|
|
403
|
+
{{#if selfHostedOnly}}
|
|
404
|
+
endif::[]
|
|
405
|
+
{{/if}}
|
|
394
406
|
|
|
395
407
|
{{/each}}
|
|
396
408
|
|===
|
|
@@ -465,8 +465,24 @@ function validatePlatforms(commandOverride, context) {
|
|
|
465
465
|
function validateFlags(commandOverride, context) {
|
|
466
466
|
const result = new ValidationResult()
|
|
467
467
|
|
|
468
|
+
// cloudOnly and selfHostedOnly are mutually exclusive: setting both wraps
|
|
469
|
+
// the row in an ifdef::env-cloud + ifndef::env-cloud pair that no build
|
|
470
|
+
// can satisfy, so the row silently vanishes from BOTH sites.
|
|
471
|
+
if (commandOverride.cloudOnly && commandOverride.selfHostedOnly) {
|
|
472
|
+
result.addError(
|
|
473
|
+
'cloudOnly and selfHostedOnly are both set: the command row is unsatisfiable and disappears from every build. Set at most one.',
|
|
474
|
+
context
|
|
475
|
+
)
|
|
476
|
+
}
|
|
477
|
+
|
|
468
478
|
if (commandOverride.flags) {
|
|
469
479
|
for (const [flagName, flagOverride] of Object.entries(commandOverride.flags)) {
|
|
480
|
+
if (flagOverride.cloudOnly && flagOverride.selfHostedOnly) {
|
|
481
|
+
result.addError(
|
|
482
|
+
`cloudOnly and selfHostedOnly are both set on flag "${flagName}": the flag row is unsatisfiable and disappears from every build. Set at most one.`,
|
|
483
|
+
`${context}.flags.${flagName}`
|
|
484
|
+
)
|
|
485
|
+
}
|
|
470
486
|
// Validate flag name format
|
|
471
487
|
if (!flagName.match(/^[a-zA-Z][-a-zA-Z0-9]*$/)) {
|
|
472
488
|
result.addWarning(
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
{{#if category}}
|
|
2
|
-
// tag::category-{{category}}[]
|
|
3
|
-
{{/if}}
|
|
4
|
-
{{#if exclude_from_docs}}
|
|
5
|
-
// tag::exclude-from-docs[]
|
|
6
|
-
{{/if}}
|
|
7
|
-
{{#if is_deprecated}}
|
|
8
|
-
// tag::deprecated[]
|
|
9
|
-
{{/if}}
|
|
10
|
-
{{#if cloud_supported}}
|
|
11
|
-
// tag::redpanda-cloud[]
|
|
12
|
-
{{/if}}
|
|
13
|
-
=== {{name}}
|
|
14
|
-
{{#if version}}
|
|
15
|
-
|
|
16
|
-
ifndef::env-cloud[]
|
|
17
|
-
*Introduced in {{version}}*
|
|
18
|
-
endif::[]
|
|
19
|
-
{{/if}}
|
|
20
|
-
{{#if description}}
|
|
21
|
-
|
|
22
|
-
{{{description}}}
|
|
23
|
-
{{else}}
|
|
24
|
-
|
|
25
|
-
No description available.
|
|
26
|
-
|
|
27
|
-
{{/if}}
|
|
28
|
-
{{#if is_enterprise}}
|
|
29
|
-
|
|
30
|
-
ifndef::env-cloud[]
|
|
31
|
-
*Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
|
|
32
|
-
endif::[]
|
|
33
|
-
{{/if}}
|
|
34
|
-
{{#if cloud_byoc_only}}
|
|
35
|
-
|
|
36
|
-
ifdef::env-cloud[]
|
|
37
|
-
NOTE: This property is available only in Redpanda Cloud BYOC deployments.
|
|
38
|
-
endif::[]
|
|
39
|
-
|
|
40
|
-
{{/if}}
|
|
41
|
-
{{#if units}}
|
|
42
|
-
|
|
43
|
-
*Unit:* {{units}}
|
|
44
|
-
{{else}}
|
|
45
|
-
{{#if (formatUnits name)}}
|
|
46
|
-
|
|
47
|
-
*Unit:* {{formatUnits name}}
|
|
48
|
-
{{/if}}
|
|
49
|
-
{{/if}}
|
|
50
|
-
{{#if (ne defined_in "src/v/config/node_config.cc")}}
|
|
51
|
-
{{#if (ne needs_restart undefined)}}
|
|
52
|
-
|
|
53
|
-
*Requires restart:* {{#if needs_restart}}Yes{{else}}No{{/if}}
|
|
54
|
-
{{/if}}
|
|
55
|
-
{{/if}}
|
|
56
|
-
|
|
57
|
-
ifndef::env-cloud[]
|
|
58
|
-
*Restored during xref:manage:whole-cluster-restore.adoc[Whole Cluster Restore]:* {{#if (ne gets_restored false)}}Yes{{else}}No{{/if}}
|
|
59
|
-
endif::[]
|
|
60
|
-
{{#if visibility}}
|
|
61
|
-
|
|
62
|
-
// tag::self-managed-only[]
|
|
63
|
-
*Visibility:* `{{visibility}}`
|
|
64
|
-
// end::self-managed-only[]
|
|
65
|
-
{{/if}}
|
|
66
|
-
{{#if type}}
|
|
67
|
-
|
|
68
|
-
*Type:* {{type}}
|
|
69
|
-
{{/if}}
|
|
70
|
-
{{#if (and minimum maximum)}}
|
|
71
|
-
|
|
72
|
-
*Accepted values:* [`{{minimum}}`, `{{maximum}}`]
|
|
73
|
-
{{else}}
|
|
74
|
-
{{#if minimum}}
|
|
75
|
-
|
|
76
|
-
*Minimum value:* `{{minimum}}`
|
|
77
|
-
{{/if}}
|
|
78
|
-
{{#if maximum}}
|
|
79
|
-
|
|
80
|
-
*Maximum value:* `{{maximum}}`
|
|
81
|
-
{{/if}}
|
|
82
|
-
{{/if}}
|
|
83
|
-
{{#if (ne default undefined)}}
|
|
84
|
-
|
|
85
|
-
ifdef::env-cloud[]
|
|
86
|
-
*Default:* Available in the Redpanda Cloud Console
|
|
87
|
-
endif::[]
|
|
88
|
-
ifndef::env-cloud[]
|
|
89
|
-
*Default:* `{{formatPropertyValue default type}}`
|
|
90
|
-
endif::[]
|
|
91
|
-
{{/if}}
|
|
92
|
-
|
|
93
|
-
*Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
|
|
94
|
-
{{#if example}}
|
|
95
|
-
|
|
96
|
-
{{{renderPropertyExample this}}}
|
|
97
|
-
{{/if}}
|
|
98
|
-
{{#if related_topics}}
|
|
99
|
-
{{#with (allTopicsConditional related_topics) as |sectionType|}}
|
|
100
|
-
|
|
101
|
-
{{#if (eq sectionType "cloud")}}
|
|
102
|
-
ifdef::env-cloud[]
|
|
103
|
-
*Related topics:*
|
|
104
|
-
|
|
105
|
-
{{#each ../related_topics}}
|
|
106
|
-
{{#with (parseRelatedTopic this)}}
|
|
107
|
-
* {{{value}}}
|
|
108
|
-
{{/with}}
|
|
109
|
-
{{/each}}
|
|
110
|
-
endif::[]
|
|
111
|
-
{{else if (eq sectionType "self-managed")}}
|
|
112
|
-
ifndef::env-cloud[]
|
|
113
|
-
*Related topics:*
|
|
114
|
-
|
|
115
|
-
{{#each ../related_topics}}
|
|
116
|
-
{{#with (parseRelatedTopic this)}}
|
|
117
|
-
* {{{value}}}
|
|
118
|
-
{{/with}}
|
|
119
|
-
{{/each}}
|
|
120
|
-
endif::[]
|
|
121
|
-
{{else}}
|
|
122
|
-
*Related topics:*
|
|
123
|
-
|
|
124
|
-
{{#each ../related_topics}}
|
|
125
|
-
{{#with (parseRelatedTopic this)}}
|
|
126
|
-
{{#if (eq type "cloud")}}
|
|
127
|
-
ifdef::env-cloud[]
|
|
128
|
-
* {{{value}}}
|
|
129
|
-
endif::[]
|
|
130
|
-
{{else if (eq type "self-managed")}}
|
|
131
|
-
ifndef::env-cloud[]
|
|
132
|
-
* {{{value}}}
|
|
133
|
-
endif::[]
|
|
134
|
-
{{else}}
|
|
135
|
-
* {{{value}}}
|
|
136
|
-
{{/if}}
|
|
137
|
-
{{/with}}
|
|
138
|
-
{{/each}}
|
|
139
|
-
{{/if}}
|
|
140
|
-
{{/with}}
|
|
141
|
-
{{/if}}
|
|
142
|
-
{{#if aliases}}
|
|
143
|
-
|
|
144
|
-
// tag::self-managed-only[]
|
|
145
|
-
*Aliases:* {{join aliases ", "}}
|
|
146
|
-
// end::self-managed-only[]
|
|
147
|
-
{{/if}}
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
{{#if cloud_supported}}
|
|
151
|
-
// end::redpanda-cloud[]
|
|
152
|
-
{{/if}}
|
|
153
|
-
{{#if is_deprecated}}
|
|
154
|
-
// end::deprecated[]
|
|
155
|
-
{{/if}}
|
|
156
|
-
{{#if exclude_from_docs}}
|
|
157
|
-
// end::exclude-from-docs[]
|
|
158
|
-
{{/if}}
|
|
159
|
-
{{#if category}}
|
|
160
|
-
// end::category-{{category}}[]
|
|
161
|
-
{{/if}}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
{{#if category}}
|
|
2
|
-
// tag::category-{{category}}[]
|
|
3
|
-
{{/if}}
|
|
4
|
-
{{#if exclude_from_docs}}
|
|
5
|
-
// tag::exclude-from-docs[]
|
|
6
|
-
{{/if}}
|
|
7
|
-
{{#if is_deprecated}}
|
|
8
|
-
// tag::deprecated[]
|
|
9
|
-
{{/if}}
|
|
10
|
-
{{#if cloud_supported}}
|
|
11
|
-
// tag::redpanda-cloud[]
|
|
12
|
-
{{/if}}
|
|
13
|
-
=== {{name}}
|
|
14
|
-
{{#if version}}
|
|
15
|
-
|
|
16
|
-
*Introduced in {{version}}*
|
|
17
|
-
{{/if}}
|
|
18
|
-
{{#if description}}
|
|
19
|
-
|
|
20
|
-
{{{description}}}
|
|
21
|
-
{{else}}
|
|
22
|
-
|
|
23
|
-
No description available.
|
|
24
|
-
{{/if}}
|
|
25
|
-
{{#if is_enterprise}}
|
|
26
|
-
|
|
27
|
-
ifndef::env-cloud[]
|
|
28
|
-
*Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
|
|
29
|
-
endif::[]
|
|
30
|
-
{{/if}}
|
|
31
|
-
{{#if cloud_byoc_only}}
|
|
32
|
-
ifdef::env-cloud[]
|
|
33
|
-
NOTE: This property is only available in Redpanda Cloud BYOC deployments.
|
|
34
|
-
endif::[]
|
|
35
|
-
{{/if}}
|
|
36
|
-
{{#if type}}
|
|
37
|
-
|
|
38
|
-
*Type:* {{type}}
|
|
39
|
-
{{/if}}
|
|
40
|
-
{{#if acceptable_values}}
|
|
41
|
-
|
|
42
|
-
*Accepted values:* {{{acceptable_values}}}
|
|
43
|
-
{{/if}}
|
|
44
|
-
{{#if corresponding_cluster_property}}
|
|
45
|
-
|
|
46
|
-
*Related cluster property:* xref:reference:cluster-properties.adoc#{{corresponding_cluster_property}}[{{corresponding_cluster_property}}]
|
|
47
|
-
{{/if}}
|
|
48
|
-
{{#if (and minimum maximum)}}
|
|
49
|
-
|
|
50
|
-
*Accepted values:* [`{{minimum}}`, `{{maximum}}`]
|
|
51
|
-
{{else}}
|
|
52
|
-
{{#if minimum}}
|
|
53
|
-
|
|
54
|
-
*Minimum value:* `{{minimum}}`
|
|
55
|
-
{{/if}}
|
|
56
|
-
{{#if maximum}}
|
|
57
|
-
|
|
58
|
-
*Maximum value:* `{{maximum}}`
|
|
59
|
-
{{/if}}
|
|
60
|
-
{{/if}}
|
|
61
|
-
{{#if (ne default undefined)}}
|
|
62
|
-
{{#if cloud_supported}}
|
|
63
|
-
|
|
64
|
-
ifdef::env-cloud[]
|
|
65
|
-
*Default:* Available in the Redpanda Cloud Console
|
|
66
|
-
endif::[]
|
|
67
|
-
ifndef::env-cloud[]
|
|
68
|
-
*Default:* `{{formatPropertyValue default type}}`
|
|
69
|
-
endif::[]
|
|
70
|
-
{{else}}
|
|
71
|
-
|
|
72
|
-
*Default:* `{{formatPropertyValue default type}}`
|
|
73
|
-
{{/if}}
|
|
74
|
-
{{/if}}
|
|
75
|
-
|
|
76
|
-
*Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
|
|
77
|
-
|
|
78
|
-
ifndef::env-cloud[]
|
|
79
|
-
*Restored during xref:manage:whole-cluster-restore.adoc[Whole Cluster Restore]:* {{#if (ne gets_restored false)}}Yes{{else}}No{{/if}}
|
|
80
|
-
endif::[]
|
|
81
|
-
{{#if example}}
|
|
82
|
-
|
|
83
|
-
{{{renderPropertyExample this}}}
|
|
84
|
-
{{/if}}
|
|
85
|
-
{{#if related_topics}}
|
|
86
|
-
{{#with (allTopicsConditional related_topics) as |sectionType|}}
|
|
87
|
-
|
|
88
|
-
{{#if (eq sectionType "cloud")}}
|
|
89
|
-
ifdef::env-cloud[]
|
|
90
|
-
*Related topics:*
|
|
91
|
-
|
|
92
|
-
{{#each ../related_topics}}
|
|
93
|
-
{{#with (parseRelatedTopic this)}}
|
|
94
|
-
* {{{value}}}
|
|
95
|
-
{{/with}}
|
|
96
|
-
{{/each}}
|
|
97
|
-
endif::[]
|
|
98
|
-
{{else if (eq sectionType "self-managed")}}
|
|
99
|
-
ifndef::env-cloud[]
|
|
100
|
-
*Related topics:*
|
|
101
|
-
|
|
102
|
-
{{#each ../related_topics}}
|
|
103
|
-
{{#with (parseRelatedTopic this)}}
|
|
104
|
-
* {{{value}}}
|
|
105
|
-
{{/with}}
|
|
106
|
-
{{/each}}
|
|
107
|
-
endif::[]
|
|
108
|
-
{{else}}
|
|
109
|
-
*Related topics:*
|
|
110
|
-
|
|
111
|
-
{{#each ../related_topics}}
|
|
112
|
-
{{#with (parseRelatedTopic this)}}
|
|
113
|
-
{{#if (eq type "cloud")}}
|
|
114
|
-
ifdef::env-cloud[]
|
|
115
|
-
* {{{value}}}
|
|
116
|
-
endif::[]
|
|
117
|
-
{{else if (eq type "self-managed")}}
|
|
118
|
-
ifndef::env-cloud[]
|
|
119
|
-
* {{{value}}}
|
|
120
|
-
endif::[]
|
|
121
|
-
{{else}}
|
|
122
|
-
* {{{value}}}
|
|
123
|
-
{{/if}}
|
|
124
|
-
{{/with}}
|
|
125
|
-
{{/each}}
|
|
126
|
-
{{/if}}
|
|
127
|
-
{{/with}}
|
|
128
|
-
{{/if}}
|
|
129
|
-
{{#if aliases}}
|
|
130
|
-
|
|
131
|
-
// tag::self-managed-only[]
|
|
132
|
-
*Aliases:* {{join aliases ", "}}
|
|
133
|
-
// end::self-managed-only[]
|
|
134
|
-
{{/if}}
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
{{#if cloud_supported}}
|
|
138
|
-
// end::redpanda-cloud[]
|
|
139
|
-
{{/if}}
|
|
140
|
-
{{#if is_deprecated}}
|
|
141
|
-
// end::deprecated[]
|
|
142
|
-
{{/if}}
|
|
143
|
-
{{#if exclude_from_docs}}
|
|
144
|
-
// end::exclude-from-docs[]
|
|
145
|
-
{{/if}}
|
|
146
|
-
{{#if category}}
|
|
147
|
-
// end::category-{{category}}[]
|
|
148
|
-
{{/if}}
|