question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically include file argument (or add documentation) on ConfiguredCommand

See original GitHub issue

ConfiguredCommand does not include the configuration file argument automatically but makes you call addFileArgument on bootstrap.

Failing to call this method your command will complain that you’re passing a file argument and none is expected.

This is not documented anywhere:

Screen Shot 2021-01-26 at 14 33 47

It would be a good idea to either:

  • automatically accept the file argument (this is what the docs say, btw)
Screen Shot 2021-01-26 at 14 37 38
  • document that the call to addFileArgument is needed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
joschicommented, Jan 28, 2021

@pablo-silverback I would expect people to call the parent’s method if they’re overriding a method, i. e. call super(subparser) if they’re overriding the configure(Subparser) method.

If you don’t call super, you’re basically saying that you’re not interested in inheriting the behavior of the parent class.

0reactions
pablo-silverbackcommented, Feb 5, 2021

From where else could it get the configuration?

From environment variables, from system properties, from a configuration database or configuration service (think Consul or AWS System Manager Parameter Store and similar services).

Isn’t the purpose of ConfiguredCommand to read a configuration file?

No. The purpose is to provide a Configuration to the command (run() method).

Read more comments on GitHub >

github_iconTop Results From Across the Web

ConfiguredCommand (Dropwizard 1.0.2 API) - javadoc.io
A command whose first parameter is the location of a YAML configuration file. That file is parsed into an instance of a Configuration...
Read more >
Dropwizard Core
A ConfiguredCommand can have additional command line options specified, while keeping the last argument the path to the YAML configuration.
Read more >
config-env=<name>=<envvar>] <command> [<args>] - Git SCM
Pass a configuration parameter to the command. The value given will override values from configuration files. The <name> is expected in the same...
Read more >
Dropwizard Documentation - Read the Docs
A ConfiguredCommand can have additional command line options specified, while keeping the last argument the path to the YAML configuration.
Read more >
Generate Pre-configured Command Lines - Intel Advisor
Go to. File · Set properties to configure the analysis, if required. · Select the · Specify MPI run parameters: · Open the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found