Skip to content

fix: allow CLI group help without config#4109

Closed
Saithej2k wants to merge 1 commit into
elastic:mainfrom
Saithej2k:fix/help-without-cli-config
Closed

fix: allow CLI group help without config#4109
Saithej2k wants to merge 1 commit into
elastic:mainfrom
Saithej2k:fix/help-without-cli-config

Conversation

@Saithej2k

Copy link
Copy Markdown

Summary

  • Skip config loading for nested CLI help requests such as connectors job --help.
  • Update the missing-config message for real commands to point users at connectors login.

Testing

  • git diff --check

Closes #3700

@cla-checker-service

cla-checker-service Bot commented Jun 27, 2026

Copy link
Copy Markdown

💚 CLA has been signed

@Saithej2k
Saithej2k marked this pull request as ready for review June 27, 2026 14:53
@Saithej2k
Saithej2k requested a review from a team as a code owner June 27, 2026 14:53
@Jan-Kazlouski-elastic

Copy link
Copy Markdown
Contributor

Hello @Saithej2k
Thank you for your contribution. Could you please sign the Contributor License Agreement so that we could continue with CI and review?

@Saithej2k
Saithej2k force-pushed the fix/help-without-cli-config branch 2 times, most recently from 935c8a5 to aca9070 Compare June 29, 2026 18:32
@Jan-Kazlouski-elastic

Copy link
Copy Markdown
Contributor

buildkite test this

@Saithej2k
Saithej2k force-pushed the fix/help-without-cli-config branch from aca9070 to 5601c24 Compare July 2, 2026 17:04
@Saithej2k

Copy link
Copy Markdown
Author

buildkite build this

@Saithej2k
Saithej2k force-pushed the fix/help-without-cli-config branch from 5601c24 to 3c03766 Compare July 2, 2026 17:06
@Saithej2k

Copy link
Copy Markdown
Author

buildkite build this

@Jan-Kazlouski-elastic Jan-Kazlouski-elastic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, @Saithej2k! Unfortunately this only fixes <group> --help — nested help like connectors job start --help still fails, since the group callback runs ensure_config before Click processes the leaf command's --help. Also, is_help_request() is effectively dead code (ctx.args is empty in the parent callback, so it always returns False).

@Saithej2k

Copy link
Copy Markdown
Author

Thanks for the review. I addressed both points in #4150: configuration now loads only when a leaf command callback runs, and the tests cover every nested help route, including job start --help. I opened the corrected change as a focused follow-up because this PR was already closed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connectors login required before connectors <command group> --help, but error message doesn't say so

2 participants