Skip to content

SOLR-18468: Rename --prompt-inputs to --script-inputs - #4927

Merged
epugh merged 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18468-rename-session-inputs
Oct 1, 2026
Merged

epugh merged 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18468-rename-session-inputs

Conversation

@serhiy-bzhezytskyy

@serhiy-bzhezytskyy serhiy-bzhezytskyy commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18468

Description

--prompt-inputs is already documented in deployment-guide/solr-control-script-reference.adoc -- it was added in the same PR that introduced the feature (#4127, merged 2026-02-18), including a usage example and a note about quoting on Windows. Checked guide/solr/latest directly: it's Solr 10.0 and doesn't have it yet, so that's a publishing lag, not a documentation gap -- it'll show up once a release picks up main.

On the rename: the overload is real. bin/solr already has three differently-shaped --prompt* flags on one script:

  • --prompt <true|false> under auth enable -- a boolean, whether to prompt for credentials
  • --no-prompt under start -e -- skip the interactive session, use defaults
  • --prompt-inputs <values> under start -e -- skip the interactive session, use these values instead

Solution

Renamed --prompt-inputs to --script-inputs. Considered four options:

  • --example-inputs -- rejected. -e/--example <name> already means "which built-in example to run" (cloud, techproducts, schemaless, films), so --example-inputs reads as input about the example, not answers to a prompt. Trades one overload for another.
  • --answers <values> -- workable, no collisions, but doesn't tie to any existing term in the guide.
  • --session-inputs <values> -- the first version of this PR, replaced after review.
  • --script-inputs <values> -- picked. The guide calls bin/solr the Solr Control Script and run_example already takes --script for the path to it, so the flag reads as the inputs for the script. The name is unused on main, doesn't collide with -e, --prompt or --no-prompt, and can be reused by other bin/solr tools later.

Didn't touch --no-prompt, even though it has the same --prompt* collision shape: it dates to 2014 (SOLR-3617), a decade in every release, versus --prompt-inputs's 7 months entirely unreleased. Renaming it would be a real breaking change for a widely-used flag, and that's a separate call from this ticket.

Clean rename, no deprecated alias -- --prompt-inputs has never shipped in a release, so there's no compatibility cost to weigh against the simplicity.

Full sweep, not just the flag name: RunExampleTool.java (option constant, the usingScriptInputs field, the CloudExampleParams record component, the mutual-exclusivity error message), bin/solr and bin/solr.cmd (help text, arg parsing and the :set_script_inputs label), TestSolrCLIRunExample.java (test name, variables, assertion message), the ref guide, and the still-unreleased changelog entry for #4127 (its title said --prompt-inputs; corrected since it hasn't shipped under that name).

Tests

./gradlew :solr:core:compileJava :solr:core:compileTestJava :solr:core:spotlessCheck -Pvalidation.errorprone=true is clean. TestSolrCLIRunExample passes (6 tests), including testSolrCloudExampleWithScriptInputs, which starts a real SolrCloud example through --script-inputs and checks the collection it creates. buildLocalAntoraSite and checkSiteLinks pass with no broken links; the only Antora messages are the six (five warnings and one table-row error, in configsets-api, rule-based-authorization-plugin and document-enrichment-with-llms) that #4922 (SOLR-18464) fixed on main after this branch was cut; this PR does not touch those pages. A search for the old names finds nothing.

AI-assisted (Claude Sonnet 5).

bin/solr already has --prompt under auth enable and --no-prompt under start -e; adding --prompt-inputs made three differently-shaped --prompt* flags on one script. The interactive setup flow is already called an 'interactive session' throughout the ref guide, so --session-inputs reuses that term instead of adding a new overload. The flag has been unreleased for its whole 7-month life (main only), so this is a clean rename with no deprecated alias.
@serhiy-bzhezytskyy

Copy link
Copy Markdown
Contributor Author

@epugh tagging you since this is under SOLR-18459/SOLR-18468, which you filed.

@github-actions github-actions Bot added documentation Improvements or additions to documentation start-scripts tests cat:cli labels Sep 20, 2026
@epugh

epugh commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

I've been struggling a lot on this one.... --session-inputs seems to generic... What about "--script-inputs"? I could potentially imagine that at some point in the future you could use something like that for multiple bin/solr tools, like the bin/solr package....

…e takes

--session-inputs was judged too generic. The guide calls bin/solr the Solr Control Script and run_example already takes --script for its path, so --script-inputs reads as the inputs for the script, and other bin/solr tools can reuse it. The flag has never been released, so the rename carries no alias; the unreleased changelog title for SOLR-18118 changes with it.
@serhiy-bzhezytskyy serhiy-bzhezytskyy changed the title SOLR-18468: Rename --prompt-inputs to --session-inputs SOLR-18468: Rename --prompt-inputs to --script-inputs Oct 1, 2026
@serhiy-bzhezytskyy

Copy link
Copy Markdown
Contributor Author

Switched to --script-inputs. The name is unused on main, run_example already takes --script for the path to bin/solr, and the guide calls it the Solr Control Script, so the flag reads as the inputs for the script and other bin/solr tools can reuse it. Renamed everywhere the old name appeared: the CLI option, bin/solr and bin/solr.cmd, the test, the guide page and the unreleased changelog entry. The description is updated to match.

@epugh

epugh commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This feature feels obsure enough (only landed in 10.0) that we don't actually need deprecation and backwards compat.... It's kind of a power user feature that honestly probably only @epugh knows about until we use it in more places ;-(.

@epugh

epugh commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Got lucky, it's a 10.1 feature, so going to merge it and hope we can get a backport.

@epugh
epugh merged commit b4ef2ea into apache:main Oct 1, 2026
7 checks passed
@epugh epugh added this to the 10.x milestone Oct 1, 2026
@epugh

epugh commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Per dev@ thread, confirmed with RM @sigram I am backporting this to branch_10x and then branch_10_1!

epugh pushed a commit that referenced this pull request Oct 2, 2026
epugh pushed a commit that referenced this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:cli documentation Improvements or additions to documentation start-scripts tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants