{"record":{"id":"ba2be64befca1965","repo":"apache/seatunnel","slug":"wal-show-requires-id-row-id-run-db-wal-list","errorCode":null,"errorMessage":"wal-show requires --id <row-id> (run db wal-list; use the id column)","messagePattern":"wal-show requires --id <row-id> \\(run db wal-list; use the id column\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-starter/src/main/java/org/apache/seatunnel/edge/agent/starter/command/db/DbCommandArgs.java","lineNumber":87,"sourceCode":"            description = \"Filter source positions\")\n    private String sourceId;\n\n    @Parameter(\n            names = {\"--older-than-ms\"},\n            description = \"Cutoff age in ms for wal-purge-acked\")\n    private long olderThanMs = 0L;\n\n    @Override\n    public EdgeAgentCommand<?> buildCommand() {\n        if (getSubcommand() == null || \"help\".equals(getSubcommand())) {\n            return new EdgeAgentDbHelpCommand();\n        }\n        DbSubcommand subcommand = DbSubcommand.fromCliName(getSubcommand());\n        if (subcommand == null) {\n            throw new IllegalArgumentException(\"Unknown db subcommand: \" + getSubcommand());\n        }\n        if (subcommand == DbSubcommand.WAL_SHOW && walId == null) {\n            throw new IllegalArgumentException(\n                    \"wal-show requires --id <row-id> (run db wal-list; use the id column)\");\n        }\n        return new EdgeAgentDbCommand(this, subcommand);\n    }\n\n    public String getSubcommand() {\n        if (commands == null || commands.isEmpty()) {\n            return null;\n        }\n        return commands.get(0);\n    }\n\n    public Path getSqlitePathOverride() {\n        if (sqlitePath == null || sqlitePath.trim().isEmpty()) {\n            return null;\n        }\n        return Paths.get(sqlitePath.trim());\n    }","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-starter/src/main/java/org/apache/seatunnel/edge/agent/starter/command/db/DbCommandArgs.java#L69-L105","documentation":"DbCommandArgs.buildCommand() requires the --id option when the resolved subcommand is wal-show, because wal-show cannot identify a WAL row without one. Missing it throws IllegalArgumentException with a hint pointing at db wal-list.","triggerScenarios":"Running `db wal-show` without --id <row-id> (walId == null in buildCommand).","commonSituations":"Copy-pasting a wal-show example without the id; forgetting that ids come from `db wal-list` output; scripting wal-show before wal-list has produced any rows.","solutions":["Add --id <row-id> using an id from the `db wal-list` output","Run `db wal-list` first to obtain valid row ids","Use `db help` to confirm wal-show's required options"],"exampleFix":"// before\ndb wal-show\n// after\ndb wal-show --id 42","handlingStrategy":"validation","validationCode":"if (\"wal-show\".equals(subcommand) && id == null) {\n    throw new IllegalArgumentException(\"wal-show requires --id\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    dbCommandArgs.buildCommand();\n} catch (IllegalArgumentException e) {\n    LOG.error(\"{} — run `db wal-list` to get ids\", e.getMessage());\n}","preventionTips":["Always obtain the id from `db wal-list` before wal-show","Validate required flags in wrapper scripts","Use `db help` to check each subcommand's required options"],"tags":["cli","command-line","missing-argument"],"backgroundTag":"missing-required-flag","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}