Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bug) Add 'notice' log level to schema and deprecate #2410

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

beechtom
Copy link
Contributor

@beechtom beechtom commented Dec 1, 2020

This adds the notice log level back to the config schema, which was
removed in #2098. Because we now use the schema for config validation,
the absence of notice as a valid option resulted in Bolt raising an
error for any user that had that log level configured. Now, Bolt will
instead issue a deprecation warning that the log level is deprecated and
will be removed in 3.0.

!bug

  • Support notice log level

    Log levels can now be set to notice. Previously, Bolt would raise an
    error saying that notice was not a supported log level.

!deprecation

  • Deprecate notice log level

    The notice log level is deprecated and will be removed in Bolt 3.0.
    Use the info log level instead.

@beechtom beechtom marked this pull request as ready for review December 1, 2020 01:20
@beechtom beechtom requested review from hestonhoffman and a team as code owners December 1, 2020 01:20
@@ -200,6 +204,14 @@ begin
inventory = Bolt::Config::INVENTORY_OPTIONS.dup
@transports = Bolt::Config::TRANSPORT_CONFIG.keys

# Move sub-options for 'log' option up one level, as they're nested under
# 'console' and filepath
@opts['log'][:properties] = @opts['log'][:additionalProperties][:properties]
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the difference in generated outputs for this? I generated the doc on main and on this branch, and the results were the same...

Copy link
Contributor Author

@beechtom beechtom Dec 1, 2020

Choose a reason for hiding this comment

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

Run rake docs:defaults_reference. Without this change running that task on its own will show console instead of level and append in the docs.

This change isn't needed when running rake docs:all since docs:config_reference modifies the options hash first.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see. Ok.

This adds the `notice` log level back to the config schema, which was
removed in #2098. Because we now use the schema for config validation,
the absence of `notice` as a valid option resulted in Bolt raising an
error for any user that had that log level configured. Now, Bolt will
instead issue a deprecation warning that the log level is deprecated and
will be removed in 3.0.

!bug

* **Support `notice` log level**

  Log levels can now be set to `notice`. Previously, Bolt would raise an
  error saying that `notice` was not a supported log level.

!deprecation

* **Deprecate `notice` log level**

  The `notice` log level is deprecated and will be removed in Bolt 3.0.
  Use the `info` log level instead.
@lucywyman lucywyman merged commit e5f9a24 into puppetlabs:main Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants