Skip to content

Improve the description/help text... - #786

Open
amolpati30 wants to merge 1 commit into
theforeman:masterfrom
amolpati30:improve_text_for_log_level_parameter
Open

Improve the description/help text...#786
amolpati30 wants to merge 1 commit into
theforeman:masterfrom
amolpati30:improve_text_for_log_level_parameter

Conversation

@amolpati30

Copy link
Copy Markdown
Contributor

Improve the help text so that --help provides clear and accurate descriptions for the following parameters:

--log-level
--foreman-log-level
--foreman-proxy-log-level
--valkey-log-level
--pulp-log-level

Previously, the descriptions were not clear. They are now more precise and provide better information about the purpose and behavior of each parameter.

Comment thread docs/user/parameters.md Outdated
Comment thread src/playbooks/_logging/metadata.obsah.yaml Outdated
help: Name of the PAM service to use for IPA authentication
foreman_log_level:
help: Log level for Foreman. Defaults to the global log level.
help: Default log level for all services. unless overridden by the service-specific parameters.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
help: Default log level for all services. unless overridden by the service-specific parameters.
help: Default log level for all services, unless overridden by the service-specific parameters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line is not applicable to Foreman, so I added a different line that is applicable to Foreman.

Comment thread docs/user/parameters.md Outdated
Comment thread src/playbooks/_logging/metadata.obsah.yaml Outdated
Comment thread docs/user/parameters.md Outdated
- fatal
foreman_proxy_log_level:
help: Log level for Foreman Proxy. Defaults to the global log level.
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

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.

Suggested change
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.
help: Log level for Foreman Proxy. Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I intentionally removed that part because the parameter is already foreman_proxy, so I don't think it's necessary to mention that the log is for foreman_proxy.

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.

I tend to disagree with your reasoning. Yes, the parameter name makes it clear, but we should still describe the functionality.

cc @jafiala & @ekohl for additional opinions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My first step was to try myself to see how it looks and I'm surprised that I can't even get the parameter to show up:

$ git describe 
3.1.0-develop-29-g978f0a1db5b7
$ ./foremanctl deploy --help
usage: foremanctl deploy [-h] [-v]
                         [--external-authentication {ipa,ipa_with_api}]
                         [--external-authentication-pam-service EXTERNAL_AUTHENTICATION_PAM_SERVICE]
                         [--add-feature FEATURES] [--flavor {katello}]
                         [--foreman-log-level {debug,info,warn,error,fatal}]
                         [--content-export-path PULP_EXPORT_PATHS]
                         [--content-import-path PULP_IMPORT_PATHS]
                         [--remove-feature FEATURES]

Install Server

options:
  -h, --help            show this help message and exit
  -v, --verbose         verbose output
  --external-authentication {ipa,ipa_with_api}
                        External authentication method to use (persisted)
  --external-authentication-pam-service EXTERNAL_AUTHENTICATION_PAM_SERVICE
                        Name of the PAM service to use for IPA authentication
                        (persisted)
  --add-feature FEATURES
                        Additional features to enable in this deployment.
                        (persisted)
  --flavor {katello}    Base flavor to use in this deployment. (persisted)
  --foreman-log-level {debug,info,warn,error,fatal}
                        Log level for Foreman. Defaults to the global log
                        level. (persisted)
  --content-export-path PULP_EXPORT_PATHS
                        Extra file path that Pulp can use for content exports.
                        Argument may be used more than once. (persisted)
  --content-import-path PULP_IMPORT_PATHS
                        Extra file path that Pulp can use for content imports.
                        Argument may be used more than once. (persisted)
  --remove-feature FEATURES
                        Additional features to disable in this deployment.
                        (persisted)

Parameters marked as (persisted) can be reset by --reset-<parameter-name>.

I know I don't have the Foreman Proxy feature enabled, but this hurts discoverability.

As a user, how am I supposed to know this parameter exists?

Now on the more concrete question: I do think the description is nice. They can be on different lines and being explicit helps IMHO. We have pretty much the same thing for --external-authentication and I wouldn't know what else to write there. 👍 for keeping the description part.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@stejskalleos
If you insist, I can add a line describing the functionality of the parameter.

- fatal
valkey_log_level:
help: Log level for Valkey.
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

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.

Suggested change
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.
help: Log level for Valkey. Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I intentionally removed that part because the parameter is already Valkey, so I don't think it's necessary to mention that the log is for Valkey.

- nothing
pulp_log_level:
help: Log level for Pulp. Defaults to the global log level.
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

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.

Suggested change
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.
help: Log level for Pulp. Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same here; it is not required, as mentioned above.

help: Name of the PAM service to use for IPA authentication
foreman_log_level:
help: Log level for Foreman. Defaults to the global log level.
help: Default log level for all services. unless overridden by the service-specific parameters.

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.

Suggested change
help: Default log level for all services. unless overridden by the service-specific parameters.
help: Log level for Foreman. Default log level for all services. unless overridden by the service-specific parameters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same here; it is not required, as mentioned above.

--log-level
--foreman-log-level
--foreman-proxy-log-level
--valkey-log-level
--pulp-log-level
Comment thread docs/user/parameters.md
| Parameter | Description |
| ----------| ----------- |
| `--log-level` | Default log level for all services. Accepted values: `debug`, `info`, `warn`, `error`, `fatal`. Defaults to `info`. |
| `--log-level` | Default log level for all services, unless overridden by the service-specific parameters. Accepted values: `debug`, `info`, `warn`, `error`, `fatal`. Defaults to `info`. |

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.

Suggested change
| `--log-level` | Default log level for all services, unless overridden by the service-specific parameters. Accepted values: `debug`, `info`, `warn`, `error`, `fatal`. Defaults to `info`. |
| `--log-level` | Default log level for all services, unless overridden by the service-specific parameters. Accepted values: `debug`, `info`, `warn`, `error`, `fatal`. Defaults to `info`. |

- fatal
foreman_proxy_log_level:
help: Log level for Foreman Proxy. Defaults to the global log level.
help: Defaults to the global log level, can be set independently. Once set, it overrides --log-level and is unaffected by later changes.

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.

I tend to disagree with your reasoning. Yes, the parameter name makes it clear, but we should still describe the functionality.

cc @jafiala & @ekohl for additional opinions.

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.

5 participants