StackStorm / StackStorm/st2

st2-register-content fails with unclear error messages if --config-file is not supplied.

Open
#2,827 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

complexity:medium enhancement
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Reported by: @code-ape

Currently, st2-register-content uses oslo and we require --config-file for things like logging config, db location etc. If --config-file option is not supplied, we try to go with the defaults and this pretty much blows up when people use custom installations.

  1. We should fail fast on --config-file option not being set. (We have to find a way to introduce a logging config that's default and not rely on config-file for log config location)
  2. We should really think about fail fast on first error as default option
  3. We should improve the UX for this CLI tool.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the st2-register-content CLI entry point and reproduce the failure without --config-file. Read the oslo configuration and logging setup to determine how missing configuration is handled; done should include a clear fail-fast error and verified behavior for the requested CLI error-handling improvements.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.