Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picocli command line continuation issue in docker-compose #2348

Closed
nodece opened this issue Oct 31, 2024 · 2 comments
Closed

Picocli command line continuation issue in docker-compose #2348

nodece opened this issue Oct 31, 2024 · 2 comments

Comments

@nodece
Copy link

nodece commented Oct 31, 2024

Motivation

In the Pulsar 4.0.0, we use the [email protected] instead of the jcommander for command-line argument parsing. While applying Pulsar 4.0.0 for the Pulsar Go Client CI, we encountered an issue during cluster initialization with docker-compse. The script fails because Picocli cannot correctly parse options that include spaces.

I'm not sure if it's affected by the OS:

  • Pulsar 4.0.0 uses the alpine as the base image.
  • Pulsar 3.0.7 uses the ubuntu:22.04 as the base image.

You can find the our test docker-compose.yml on https://github.com/apache/pulsar-client-go/blob/26e80855bb9848d41781840368e53d74f7df1102/integration-tests/clustered/docker-compose.yml#L51, or master branch.

Case 1(Pulsar 4.0.0 doesn't work, Pulsar 3.0.7 works fine):

docker-compose.yml

  # Initialize cluster metadata
  pulsar-init:
    container_name: pulsar-init
    hostname: pulsar-init
    image: apachepulsar/pulsar:${PULSAR_VERSION}
    networks:
      - pulsar
    environment:
      - PULSAR_MEM=-Xms128m -Xmx128m -XX:MaxDirectMemorySize=516m -Dpicocli.trace=DEBUG
    command: >
      bin/pulsar initialize-cluster-metadata \
               --cluster cluster-a \
               --zookeeper zookeeper:2181 \
               --configuration-store zookeeper:2181 \
               --web-service-url http://broker-1:8080 \
               --broker-service-url pulsar://broker-1:6650
    depends_on:
      zookeeper:
        condition: service_healthy

Deploy script:

PULSAR_VERSION=4.0.0 docker compose -f integration-tests/clustered/docker-compose.yml up -d

Docker inspect:

{
	"Id": "4796d8f9fec319f1b113e908f599508dd3d3ff6b4c8290fdc9013d3dc9fa58e7",
	"Created": "2024-10-31T08:04:20.603609493Z",
	"Path": "bin/pulsar",
	"Args": [
		"initialize-cluster-metadata",
		"\n",
		"--cluster",
		"cluster-a",
		"\n",
		"--zookeeper",
		"zookeeper:2181",
		"\n",
		"--configuration-store",
		"zookeeper:2181",
		"\n",
		"--web-service-url",
		"http://broker-1:8080",
		"\n",
		"--broker-service-url",
		"pulsar://broker-1:6650"
	]

Error log:

2024-10-31 16:04:36 [picocli DEBUG] Creating CommandSpec for org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83 with factory picocli.CommandLine$DefaultFactory
2024-10-31 16:04:36 [picocli INFO] Picocli version: 4.7.5, JVM: 21.0.4 (Amazon.com Inc. OpenJDK 64-Bit Server VM 21.0.4+7-LTS), OS: Linux 6.10.4-linuxkit amd64
2024-10-31 16:04:36 [picocli INFO] Parsing 15 command line args [
2024-10-31 16:04:36 , --cluster, cluster-a, 
2024-10-31 16:04:36 , --zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Parser configuration: optionsCaseInsensitive=false, subcommandsCaseInsensitive=false, abbreviatedOptionsAllowed=false, abbreviatedSubcommandsAllowed=false, allowOptionsAsOptionParameters=false, allowSubcommandsAsOptionParameters=false, aritySatisfiedByAttachedOptionParam=false, atFileCommentChar=#, caseInsensitiveEnumValuesAllowed=false, collectErrors=false, endOfOptionsDelimiter=--, expandAtFiles=true, limitSplit=false, overwrittenOptionsAllowed=false, posixClusteredShortOptionsAllowed=true, separator=null, splitQuotedStrings=false, stopAtPositional=false, stopAtUnmatched=false, toggleBooleanFlags=false, trimQuotes=false, unmatchedArgumentsAllowed=false, unmatchedOptionsAllowedAsOptionParameters=true, unmatchedOptionsArePositionalParams=false, useSimplifiedAtFiles=false
2024-10-31 16:04:36 [picocli DEBUG] (ANSI is disabled by default: systemproperty[picocli.ansi]=null, isatty=false, TERM=null, OSTYPE=null, isWindows=false, JansiConsoleInstalled=false, ANSICON=null, ConEmuANSI=null, NO_COLOR=null, CLICOLOR=null, CLICOLOR_FORCE=null)
2024-10-31 16:04:36 [picocli DEBUG] Initializing command 'initialize-cluster-metadata' (user object: org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83): 25 options, 0 positional parameters, 2 required, 0 groups, 0 subcommands.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles of type int to 0.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled of type class java.lang.Boolean to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis of type int to 30000.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers of type int to 16.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators of type int to 16.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol of type class org.apache.pulsar.client.api.ProxyProtocol to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl of type class java.lang.String to null.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help of type boolean to false.
2024-10-31 16:04:36 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs of type boolean to false.
2024-10-31 16:04:36 [picocli DEBUG] [0] Processing argument '
2024-10-31 16:04:36 '. Remainder=[--cluster, cluster-a, 
2024-10-31 16:04:36 , --zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '
2024-10-31 16:04:36 ' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Could not find option '
2024-10-31 16:04:36 ', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:04:36 [picocli DEBUG] No option named '
2024-10-31 16:04:36 ' found. Processing as positional parameter
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 [picocli DEBUG] [0] Processing next arg as a positional parameter. Command-local position=0. Remainder=[
2024-10-31 16:04:36 , --cluster, cluster-a, 
2024-10-31 16:04:36 , --zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:04:36 [picocli DEBUG] [1] Processing argument '--cluster'. Remainder=[cluster-a, 
2024-10-31 16:04:36 , --zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '--cluster' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Found option named '--cluster': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster, arity=1
2024-10-31 16:04:36 [picocli DEBUG] 'cluster-a' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:04:36 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster to 'cluster-a' (was 'null') for option --cluster on Arguments@6bc28a83
2024-10-31 16:04:36 [picocli DEBUG] [3] Processing argument '
2024-10-31 16:04:36 '. Remainder=[--zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '
2024-10-31 16:04:36 ' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Could not find option '
2024-10-31 16:04:36 ', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:04:36 [picocli DEBUG] No option named '
2024-10-31 16:04:36 ' found. Processing as positional parameter
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 [picocli DEBUG] [3] Processing next arg as a positional parameter. Command-local position=0. Remainder=[
2024-10-31 16:04:36 , --zookeeper, zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:04:36 [picocli DEBUG] [4] Processing argument '--zookeeper'. Remainder=[zookeeper:2181, 
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '--zookeeper' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Found option named '--zookeeper': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper, arity=1
2024-10-31 16:04:36 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:04:36 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper to 'zookeeper:2181' (was 'null') for option --zookeeper on Arguments@6bc28a83
2024-10-31 16:04:36 [picocli DEBUG] [6] Processing argument '
2024-10-31 16:04:36 '. Remainder=[--configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '
2024-10-31 16:04:36 ' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Could not find option '
2024-10-31 16:04:36 ', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:04:36 [picocli DEBUG] No option named '
2024-10-31 16:04:36 ' found. Processing as positional parameter
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 [picocli DEBUG] [6] Processing next arg as a positional parameter. Command-local position=0. Remainder=[
2024-10-31 16:04:36 , --configuration-store, zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:04:36 [picocli DEBUG] [7] Processing argument '--configuration-store'. Remainder=[zookeeper:2181, 
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '--configuration-store' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Found option named '--configuration-store': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore, arity=1
2024-10-31 16:04:36 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:04:36 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore to 'zookeeper:2181' (was 'null') for option --configuration-store on Arguments@6bc28a83
2024-10-31 16:04:36 [picocli DEBUG] [9] Processing argument '
2024-10-31 16:04:36 '. Remainder=[--web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '
2024-10-31 16:04:36 ' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Could not find option '
2024-10-31 16:04:36 ', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:04:36 [picocli DEBUG] No option named '
2024-10-31 16:04:36 ' found. Processing as positional parameter
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 [picocli DEBUG] [9] Processing next arg as a positional parameter. Command-local position=0. Remainder=[
2024-10-31 16:04:36 , --web-service-url, http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:04:36 [picocli DEBUG] [10] Processing argument '--web-service-url'. Remainder=[http://broker-1:8080, 
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '--web-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Found option named '--web-service-url': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl, arity=1
2024-10-31 16:04:36 [picocli DEBUG] 'http://broker-1:8080' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:04:36 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl to 'http://broker-1:8080' (was 'null') for option --web-service-url on Arguments@6bc28a83
2024-10-31 16:04:36 [picocli DEBUG] [12] Processing argument '
2024-10-31 16:04:36 '. Remainder=[--broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '
2024-10-31 16:04:36 ' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Could not find option '
2024-10-31 16:04:36 ', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:04:36 [picocli DEBUG] No option named '
2024-10-31 16:04:36 ' found. Processing as positional parameter
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 [picocli DEBUG] [12] Processing next arg as a positional parameter. Command-local position=0. Remainder=[
2024-10-31 16:04:36 , --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:04:36 [picocli DEBUG] [13] Processing argument '--broker-service-url'. Remainder=[pulsar://broker-1:6650]
2024-10-31 16:04:36 [picocli DEBUG] '--broker-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:04:36 [picocli DEBUG] Found option named '--broker-service-url': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl, arity=1
2024-10-31 16:04:36 [picocli DEBUG] 'pulsar://broker-1:6650' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:04:36 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl to 'pulsar://broker-1:6650' (was 'null') for option --broker-service-url on Arguments@6bc28a83
2024-10-31 16:04:36 [picocli DEBUG] Applying default values for command 'initialize-cluster-metadata'
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help
2024-10-31 16:04:36 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs
2024-10-31 16:04:36 [picocli DEBUG] Single-character arguments that don't match known options are considered positional parameters: 
2024-10-31 16:04:36 
2024-10-31 16:04:36 picocli.CommandLine$UnmatchedArgumentException: Unmatched arguments from index 0: '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 '
2024-10-31 16:04:36 Exception in thread "main" picocli.CommandLine$UnmatchedArgumentException: Unmatched arguments from index 0: '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 ', '
2024-10-31 16:04:36 '
2024-10-31 16:04:36     at picocli.CommandLine$Interpreter.validateConstraints(CommandLine.java:13662)
2024-10-31 16:04:36     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13614)
2024-10-31 16:04:36     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13559)
2024-10-31 16:04:36     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13454)
2024-10-31 16:04:36     at picocli.CommandLine.parseArgs(CommandLine.java:1552)
2024-10-31 16:04:36     at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:227)

Case 2(Pulsar 4.0.0 doesn't work, Pulsar 3.0.7 works fine):

docker-compose.yml

  # Initialize cluster metadata
  pulsar-init:
    container_name: pulsar-init
    hostname: pulsar-init
    image: apachepulsar/pulsar:${PULSAR_VERSION}
    networks:
      - pulsar
    environment:
      - PULSAR_MEM=-Xms128m -Xmx128m -XX:MaxDirectMemorySize=516m -Dpicocli.trace=DEBUG
    command: >
      bin/pulsar initialize-cluster-metadata \
      --cluster cluster-a \
      --zookeeper zookeeper:2181 \
      --configuration-store zookeeper:2181 \
      --web-service-url http://broker-1:8080 \
      --broker-service-url pulsar://broker-1:6650
    depends_on:
      zookeeper:
        condition: service_healthy

Deploy script:

PULSAR_VERSION=4.0.0 docker compose -f integration-tests/clustered/docker-compose.yml up -d

Docker inspect:

{
	"Id": "c259f6c5c17b45e2c39bec4778beaf2010172e93880e8ef6e78380caa289b8b9",
	"Created": "2024-10-31T08:15:51.819816269Z",
	"Path": "bin/pulsar",
	"Args": [
		"initialize-cluster-metadata",
		" --cluster",
		"cluster-a",
		" --zookeeper",
		"zookeeper:2181",
		" --configuration-store",
		"zookeeper:2181",
		" --web-service-url",
		"http://broker-1:8080",
		" --broker-service-url",
		"pulsar://broker-1:6650"
	]

Error log:

2024-10-31 16:16:28 [picocli DEBUG] Creating CommandSpec for org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83 with factory picocli.CommandLine$DefaultFactory
2024-10-31 16:16:28 [picocli INFO] Picocli version: 4.7.5, JVM: 21.0.4 (Amazon.com Inc. OpenJDK 64-Bit Server VM 21.0.4+7-LTS), OS: Linux 6.10.4-linuxkit amd64
2024-10-31 16:16:28 [picocli INFO] Parsing 10 command line args [ --cluster, cluster-a,  --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Parser configuration: optionsCaseInsensitive=false, subcommandsCaseInsensitive=false, abbreviatedOptionsAllowed=false, abbreviatedSubcommandsAllowed=false, allowOptionsAsOptionParameters=false, allowSubcommandsAsOptionParameters=false, aritySatisfiedByAttachedOptionParam=false, atFileCommentChar=#, caseInsensitiveEnumValuesAllowed=false, collectErrors=false, endOfOptionsDelimiter=--, expandAtFiles=true, limitSplit=false, overwrittenOptionsAllowed=false, posixClusteredShortOptionsAllowed=true, separator=null, splitQuotedStrings=false, stopAtPositional=false, stopAtUnmatched=false, toggleBooleanFlags=false, trimQuotes=false, unmatchedArgumentsAllowed=false, unmatchedOptionsAllowedAsOptionParameters=true, unmatchedOptionsArePositionalParams=false, useSimplifiedAtFiles=false
2024-10-31 16:16:28 [picocli DEBUG] (ANSI is disabled by default: systemproperty[picocli.ansi]=null, isatty=false, TERM=null, OSTYPE=null, isWindows=false, JansiConsoleInstalled=false, ANSICON=null, ConEmuANSI=null, NO_COLOR=null, CLICOLOR=null, CLICOLOR_FORCE=null)
2024-10-31 16:16:28 [picocli DEBUG] Initializing command 'initialize-cluster-metadata' (user object: org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83): 25 options, 0 positional parameters, 2 required, 0 groups, 0 subcommands.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles of type int to 0.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled of type class java.lang.Boolean to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis of type int to 30000.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers of type int to 16.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators of type int to 16.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol of type class org.apache.pulsar.client.api.ProxyProtocol to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl of type class java.lang.String to null.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help of type boolean to false.
2024-10-31 16:16:28 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs of type boolean to false.
2024-10-31 16:16:28 [picocli DEBUG] [0] Processing argument ' --cluster'. Remainder=[cluster-a,  --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] ' --cluster' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option ' --cluster', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named ' --cluster' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] ' --cluster' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [0] Processing next arg as a positional parameter. Command-local position=0. Remainder=[ --cluster, cluster-a,  --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [1] Processing argument 'cluster-a'. Remainder=[ --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] 'cluster-a' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option 'cluster-a', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named 'cluster-a' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] 'cluster-a' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [1] Processing next arg as a positional parameter. Command-local position=0. Remainder=[cluster-a,  --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [2] Processing argument ' --zookeeper'. Remainder=[zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] ' --zookeeper' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option ' --zookeeper', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named ' --zookeeper' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] ' --zookeeper' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [2] Processing next arg as a positional parameter. Command-local position=0. Remainder=[ --zookeeper, zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [3] Processing argument 'zookeeper:2181'. Remainder=[ --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] 'zookeeper:2181' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option 'zookeeper:2181', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named 'zookeeper:2181' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [3] Processing next arg as a positional parameter. Command-local position=0. Remainder=[zookeeper:2181,  --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [4] Processing argument ' --configuration-store'. Remainder=[zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] ' --configuration-store' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option ' --configuration-store', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named ' --configuration-store' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] ' --configuration-store' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [4] Processing next arg as a positional parameter. Command-local position=0. Remainder=[ --configuration-store, zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [5] Processing argument 'zookeeper:2181'. Remainder=[ --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] 'zookeeper:2181' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option 'zookeeper:2181', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named 'zookeeper:2181' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [5] Processing next arg as a positional parameter. Command-local position=0. Remainder=[zookeeper:2181,  --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [6] Processing argument ' --web-service-url'. Remainder=[http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] ' --web-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option ' --web-service-url', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named ' --web-service-url' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] ' --web-service-url' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [6] Processing next arg as a positional parameter. Command-local position=0. Remainder=[ --web-service-url, http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [7] Processing argument 'http://broker-1:8080'. Remainder=[ --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] 'http://broker-1:8080' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option 'http://broker-1:8080', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named 'http://broker-1:8080' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] 'http://broker-1:8080' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [7] Processing next arg as a positional parameter. Command-local position=0. Remainder=[http://broker-1:8080,  --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [8] Processing argument ' --broker-service-url'. Remainder=[pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] ' --broker-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option ' --broker-service-url', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named ' --broker-service-url' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] ' --broker-service-url' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [8] Processing next arg as a positional parameter. Command-local position=0. Remainder=[ --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] [9] Processing argument 'pulsar://broker-1:6650'. Remainder=[]
2024-10-31 16:16:28 [picocli DEBUG] 'pulsar://broker-1:6650' cannot be separated into <option>=<option-parameter>
2024-10-31 16:16:28 [picocli DEBUG] Could not find option 'pulsar://broker-1:6650', deciding whether to treat as unmatched option or positional parameter...
2024-10-31 16:16:28 [picocli DEBUG] No option named 'pulsar://broker-1:6650' found. Processing as positional parameter
2024-10-31 16:16:28 [picocli DEBUG] 'pulsar://broker-1:6650' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:16:28 [picocli DEBUG] [9] Processing next arg as a positional parameter. Command-local position=0. Remainder=[pulsar://broker-1:6650]
2024-10-31 16:16:28 [picocli DEBUG] Consumed 0 arguments and 0 interactive values, moving command-local position to index 0.
2024-10-31 16:16:28 [picocli DEBUG] Applying default values for command 'initialize-cluster-metadata'
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help
2024-10-31 16:16:28 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs
2024-10-31 16:16:28 picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
2024-10-31 16:16:28 Exception in thread "main" picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
2024-10-31 16:16:28     at picocli.CommandLine$MissingParameterException.create(CommandLine.java:18661)
2024-10-31 16:16:28     at picocli.CommandLine$MissingParameterException.access$21200(CommandLine.java:18649)
2024-10-31 16:16:28     at picocli.CommandLine$Interpreter.validateConstraints(CommandLine.java:13651)
2024-10-31 16:16:28     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13614)
2024-10-31 16:16:28     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13559)
2024-10-31 16:16:28     at picocli.CommandLine$Interpreter.parse(CommandLine.java:13454)
2024-10-31 16:16:28     at picocli.CommandLine.parseArgs(CommandLine.java:1552)
2024-10-31 16:16:28     at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:227)

Case 3(Both Pulsar 3.0.7 and 4.0.7 can work properly)

docker-compose.yml:

  # Initialize cluster metadata
  pulsar-init:
    container_name: pulsar-init
    hostname: pulsar-init
    image: apachepulsar/pulsar:${PULSAR_VERSION}
    networks:
      - pulsar
    environment:
      - PULSAR_MEM=-Xms128m -Xmx128m -XX:MaxDirectMemorySize=516m -Dpicocli.trace=DEBUG
    command: >
      /bin/sh -c "bin/pulsar initialize-cluster-metadata \
      --cluster cluster-a \
      --zookeeper zookeeper:2181 \
      --configuration-store zookeeper:2181 \
      --web-service-url http://broker-1:8080 \
      --broker-service-url pulsar://broker-1:6650"
    depends_on:
      zookeeper:
        condition: service_healthy

Deploy script:

PULSAR_VERSION=4.0.0 docker compose -f integration-tests/clustered/docker-compose.yml up -d

Docker Inspect:

{
	"Id": "421a7c904cf05820d9bcc946be02d29527c262eb4a36e72e8112455e77d24d15",
	"Created": "2024-10-31T08:22:49.29622037Z",
	"Path": "/bin/sh",
	"Args": [
		"-c",
		"bin/pulsar initialize-cluster-metadata  --cluster cluster-a  --zookeeper zookeeper:2181  --configuration-store zookeeper:2181  --web-service-url http://broker-1:8080  --broker-service-url pulsar://broker-1:6650"
	],

Success log:

2024-10-31 16:22:53 [picocli DEBUG] Creating CommandSpec for org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83 with factory picocli.CommandLine$DefaultFactory
2024-10-31 16:22:53 [picocli INFO] Picocli version: 4.7.5, JVM: 21.0.4 (Amazon.com Inc. OpenJDK 64-Bit Server VM 21.0.4+7-LTS), OS: Linux 6.10.4-linuxkit amd64
2024-10-31 16:22:53 [picocli INFO] Parsing 10 command line args [--cluster, cluster-a, --zookeeper, zookeeper:2181, --configuration-store, zookeeper:2181, --web-service-url, http://broker-1:8080, --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] Parser configuration: optionsCaseInsensitive=false, subcommandsCaseInsensitive=false, abbreviatedOptionsAllowed=false, abbreviatedSubcommandsAllowed=false, allowOptionsAsOptionParameters=false, allowSubcommandsAsOptionParameters=false, aritySatisfiedByAttachedOptionParam=false, atFileCommentChar=#, caseInsensitiveEnumValuesAllowed=false, collectErrors=false, endOfOptionsDelimiter=--, expandAtFiles=true, limitSplit=false, overwrittenOptionsAllowed=false, posixClusteredShortOptionsAllowed=true, separator=null, splitQuotedStrings=false, stopAtPositional=false, stopAtUnmatched=false, toggleBooleanFlags=false, trimQuotes=false, unmatchedArgumentsAllowed=false, unmatchedOptionsAllowedAsOptionParameters=true, unmatchedOptionsArePositionalParams=false, useSimplifiedAtFiles=false
2024-10-31 16:22:53 [picocli DEBUG] (ANSI is disabled by default: systemproperty[picocli.ansi]=null, isatty=false, TERM=null, OSTYPE=null, isWindows=false, JansiConsoleInstalled=false, ANSICON=null, ConEmuANSI=null, NO_COLOR=null, CLICOLOR=null, CLICOLOR_FORCE=null)
2024-10-31 16:22:53 [picocli DEBUG] Initializing command 'initialize-cluster-metadata' (user object: org.apache.pulsar.PulsarClusterMetadataSetup$Arguments@6bc28a83): 25 options, 0 positional parameters, 2 required, 0 groups, 0 subcommands.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles of type int to 0.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled of type class java.lang.Boolean to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis of type int to 30000.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers of type int to 16.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators of type int to 16.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol of type class org.apache.pulsar.client.api.ProxyProtocol to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl of type class java.lang.String to null.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help of type boolean to false.
2024-10-31 16:22:53 [picocli DEBUG] Set initial value for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs of type boolean to false.
2024-10-31 16:22:53 [picocli DEBUG] [0] Processing argument '--cluster'. Remainder=[cluster-a, --zookeeper, zookeeper:2181, --configuration-store, zookeeper:2181, --web-service-url, http://broker-1:8080, --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] '--cluster' cannot be separated into <option>=<option-parameter>
2024-10-31 16:22:53 [picocli DEBUG] Found option named '--cluster': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster, arity=1
2024-10-31 16:22:53 [picocli DEBUG] 'cluster-a' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:22:53 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.cluster to 'cluster-a' (was 'null') for option --cluster on Arguments@6bc28a83
2024-10-31 16:22:53 [picocli DEBUG] [2] Processing argument '--zookeeper'. Remainder=[zookeeper:2181, --configuration-store, zookeeper:2181, --web-service-url, http://broker-1:8080, --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] '--zookeeper' cannot be separated into <option>=<option-parameter>
2024-10-31 16:22:53 [picocli DEBUG] Found option named '--zookeeper': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper, arity=1
2024-10-31 16:22:53 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:22:53 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zookeeper to 'zookeeper:2181' (was 'null') for option --zookeeper on Arguments@6bc28a83
2024-10-31 16:22:53 [picocli DEBUG] [4] Processing argument '--configuration-store'. Remainder=[zookeeper:2181, --web-service-url, http://broker-1:8080, --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] '--configuration-store' cannot be separated into <option>=<option-parameter>
2024-10-31 16:22:53 [picocli DEBUG] Found option named '--configuration-store': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore, arity=1
2024-10-31 16:22:53 [picocli DEBUG] 'zookeeper:2181' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:22:53 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStore to 'zookeeper:2181' (was 'null') for option --configuration-store on Arguments@6bc28a83
2024-10-31 16:22:53 [picocli DEBUG] [6] Processing argument '--web-service-url'. Remainder=[http://broker-1:8080, --broker-service-url, pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] '--web-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:22:53 [picocli DEBUG] Found option named '--web-service-url': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl, arity=1
2024-10-31 16:22:53 [picocli DEBUG] 'http://broker-1:8080' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:22:53 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrl to 'http://broker-1:8080' (was 'null') for option --web-service-url on Arguments@6bc28a83
2024-10-31 16:22:53 [picocli DEBUG] [8] Processing argument '--broker-service-url'. Remainder=[pulsar://broker-1:6650]
2024-10-31 16:22:53 [picocli DEBUG] '--broker-service-url' cannot be separated into <option>=<option-parameter>
2024-10-31 16:22:53 [picocli DEBUG] Found option named '--broker-service-url': field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl, arity=1
2024-10-31 16:22:53 [picocli DEBUG] 'pulsar://broker-1:6650' doesn't resemble an option: 0 matching prefix chars out of 43 option names
2024-10-31 16:22:53 [picocli INFO] Setting field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrl to 'pulsar://broker-1:6650' (was 'null') for option --broker-service-url on Arguments@6bc28a83
2024-10-31 16:22:53 [picocli DEBUG] Applying default values for command 'initialize-cluster-metadata'
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numberOfDefaultNamespaceBundles
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterWebServiceUrlTls
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerServiceUrlTls
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field Boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterBrokerClientTlsEnabled
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationPlugin
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterAuthenticationParameters
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreUrl
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.zkSessionTimeoutMillis
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.globalZookeeper
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationMetadataStore
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.metadataStoreConfigPath
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.configurationStoreConfigPath
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numStreamStorageContainers
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field int org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.numTransactionCoordinators
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.existingBkMetadataServiceUri
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.bookieMetadataServiceUri
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field org.apache.pulsar.client.api.ProxyProtocol org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyProtocol
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field String org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.clusterProxyUrl
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.help
2024-10-31 16:22:53 [picocli DEBUG] defaultValue not defined for field boolean org.apache.pulsar.PulsarClusterMetadataSetup$Arguments.generateDocs
2024-10-31 16:22:53 2024-10-31T08:22:53,523+0000 [main] INFO  org.apache.pulsar.PulsarClusterMetadataSetup - Setting up cluster cluster-a with metadata-store=zk:zookeeper:2181 configuration-metadata-store=zookeeper:2181

This issue appears to be related specifically to how picocli handles line continuation in the docker compose context, particularly when using Alpine/Ubuntu as the base image. Any guidance or potential workarounds to ensure compatibility with our existing scripts would be greatly appreciated.

@nodece nodece changed the title Picocli command line continuation Issue in docker-compose Picocli command line continuation issue in docker-compose Oct 31, 2024
@remkop
Copy link
Owner

remkop commented Nov 3, 2024

@nodece Thank you for raising this, very interesting!

Glad to see that you already found a solution!

Analysis

I have to respectfully disagree with the last paragraph of your analysis though: 😅

This issue appears to be related specifically to how picocli handles line continuation in the docker compose context, particularly when using Alpine/Ubuntu as the base image.

Picocli does not receive (or handle) the line continuation backslashes, Docker receives the line continuations. Docker is responsible for parsing the line starting with command: >, and parsing that line into the command Path and its Args. Picocli only receives the resulting array of arguments.

Thank you for including the Docker Inspect snippets: they clearly show that Pulsar 4.0.0 and Pulsar 3.0.7 produce different Args arrays, and therefore picocli receives different argument arrays.

My conclusion: this is a Docker bug

This looks like a bug in Docker to me. The array of Args that Docker passes to the command should not contain newline elements.

The Docker documentation for line continuations has an example showing that 2 lines with a backslash escaping the newline is equivalent to 1 line with the backslash and newline removed. Clearly the intention is that newline characters should be removed by Docker. This is not working correctly. It may be worth reporting this to the Docker maintainers.

Should picocli be modified?

About your request

Any guidance or potential workarounds to ensure compatibility with our existing scripts would be greatly appreciated.

Firstly, again, I am glad to see that you found a solution that eliminates these newline arguments before picocli is invoked.

Should picocli be modified? It is possible to modify picocli to remove \n and \r\n arguments from the array of arguments, before parsing further. However, I am not sure if this would be a good idea... The fix may cause problems for other users who intentionally pass newline arguments to their application.

Additionally, other applications may also have problems handling a command line arguments array containing newline string elements. Picocli is only one application. It really should be fixed upstream (in Docker), IMHO.

@nodece
Copy link
Author

nodece commented Nov 3, 2024

Thanks for your explanation! I agree with your viewpoints, and the picocli is more strict than the jcommander, I accept it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants