scio icon indicating copy to clipboard operation
scio copied to clipboard

Using PipelineOptions clobbers string args with same name

Open kellen opened this issue 1 year ago • 0 comments

Have two tests in the same repository, one which uses:

val (_, args) = ContextAndArgs(cmdLineArgs)

and one which uses

ContextAndArgs.typed[MyPipelineOptions](cmdLineArgs)

where both tests share a parameter name e.g. --myOption. When running test suites (in parallel by default) the default parser used by .apply will recognize --myOption as belonging to a registered option and not provide it as part of the returned args. Later calls to args("myOption") will fail.

Will not arise if a repository uses exclusively PipelineOptions or string arguments. Will not arise if parameter names are not shared.

Related: #3122 ... which appears to have identified the same issue but not resolved

kellen avatar Jul 15 '22 18:07 kellen