Skip to content

Fix status CLI to accept --hostname, --port, and --trustAll arguments, and add them to all status command invocations in build.yml#630

Merged
vharseko merged 6 commits intomasterfrom
copilot/add-hostname-trustall-status-commands
Apr 10, 2026
Merged

Fix status CLI to accept --hostname, --port, and --trustAll arguments, and add them to all status command invocations in build.yml#630
vharseko merged 6 commits intomasterfrom
copilot/add-hostname-trustall-status-commands

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Several status/status.bat invocations in the CI workflow were missing --hostname localhost and/or --trustAll, which can cause connection failures against TLS-enabled servers that require explicit host/trust configuration. Additionally, the status CLI tool was not accepting --hostname and --port as valid arguments, causing them to be silently ignored.

Changes

CI Workflow (build.yml)

  • Test on Unix (line 70): added --hostname localhost and --trustAll
  • Test on Unix FIPS (line 128): added --hostname localhost (--trustAll was already present)
  • Test LDAP in Cassandra (line 153): added --hostname localhost and --trustAll
  • Test LDAP in Postgres (line 168): added --hostname localhost and --trustAll
  • Test on Windows (line 233): added --hostname localhost and --trustAll

All status calls now consistently use:

status --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll

Status CLI (StatusCliArgumentParser.java)

  • Removed the lines that were stripping --hostname and --port from the list of accepted arguments, so these flags are now properly parsed when passed on the command line.

Status CLI (StatusCli.java)

  • Fixed the code that sets hostname/port defaults to only apply when the arguments were not already provided by the user, so explicit --hostname and --port values passed on the command line are now honoured instead of being overwritten.
Original prompt

In .github/workflows/build.yml, add --hostname localhost and --trustAll parameters to every status / status.bat command invocation that is missing them.

Here are all the lines that need to be changed:

  1. Line 70 — "Test on Unix" step:

    • Current: opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password
    • Change to: opendj-server-legacy/target/package/opendj/bin/status --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll
  2. Line 128 — "Test on Unix FIPS" step:

    • Current: opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password --trustAll
    • Change to: opendj-server-legacy/target/package/opendj/bin/status --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll
      (only --hostname localhost is missing; --trustAll is already present)
  3. Line 153 — "Test LDAP in Cassandra" step:

    • Current: opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password
    • Change to: opendj-server-legacy/target/package/opendj/bin/status --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll
  4. Line 168 — "Test LDAP in Postgres" step:

    • Current: opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password
    • Change to: opendj-server-legacy/target/package/opendj/bin/status --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll
  5. Line 233 — "Test on Windows" step:

    • Current: opendj-server-legacy\target\package\opendj\bat\status.bat --bindDN "cn=Directory Manager" --bindPassword password
    • Change to: opendj-server-legacy\target\package\opendj\bat\status.bat --hostname localhost --bindDN "cn=Directory Manager" --bindPassword password --trustAll

Only modify these 5 lines. Do not change anything else in the file.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: добавь во все opendj/status.sh opendj/status.bat параметр --hostname localhost и --trustAll

Assistant:

Let me first find the exact lines in the workflow file where status commands are used without --hostname localhost and --trustAll.

Assistant: Now I have the full file content. Let me identify all the status command invocations that need --hostname localhost --trustAll added. Here are the occurrences:

  1. Line 70 (Test on Unix): status --bindDN "cn=Directory Manager" --bindPassword password — missing both --hostname localhost and --trustAll
  2. Line 128 (Test on Unix FIPS): status --bindDN "cn=Directory Manager" --bindPassword password --trustAll — missing --hostname localhost
  3. Line 153 (Test LDAP in Cassandra): status --bindDN "cn=Directory Manager" --bindPassword password — missing both
  4. Line 168 (Test LDAP in Postgres): status --bindDN "cn=Directory Manager" --bindPassword password — missing both
  5. Line 233 (Test on Windows): status.bat --bindDN "cn=Directory Manager" --bindPassword password — missing both

Assistant: I'm waiting for your confirmation to proceed with creating the pull request.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Add --hostname localhost and --trustAll to status commands Add --hostname localhost and --trustAll to all status command invocations in build.yml Apr 9, 2026
Copilot AI requested a review from vharseko April 9, 2026 15:19
@vharseko
Copy link
Copy Markdown
Member

vharseko commented Apr 9, 2026

@copilot merge from copilot/fix-status-cli-argument-parsing

…parsing' into copilot/add-hostname-trustall-status-commands

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot merge from copilot/fix-status-cli-argument-parsing

Merged in 8c6bdac. The Java fixes from copilot/fix-status-cli-argument-parsing are now included:

  • StatusCliArgumentParser.java: no longer strips --hostname/--port from accepted arguments
  • StatusCli.java: only falls back to default hostname/port when not explicitly provided via CLI

The build.yml changes (all 5 status commands with --hostname localhost --trustAll) are preserved.

Copilot AI changed the title Add --hostname localhost and --trustAll to all status command invocations in build.yml Fix status CLI to accept --hostname, --port, and --trustAll arguments, and add them to all status command invocations in build.yml Apr 9, 2026
@vharseko vharseko marked this pull request as ready for review April 10, 2026 05:07
@vharseko vharseko requested review from maximthomas and removed request for vharseko April 10, 2026 05:08
Add CDDL license header to build.yml
@vharseko vharseko merged commit ec3714c into master Apr 10, 2026
0 of 15 checks passed
@vharseko vharseko deleted the copilot/add-hostname-trustall-status-commands branch April 10, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants