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

chore(deps): update dependency structlog to v25 #13067

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate-bot
Copy link
Contributor

@renovate-bot renovate-bot commented Jan 16, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
structlog (changelog) ==24.1.0 -> ==25.1.0 age adoption passing confidence

Release Notes

hynek/structlog (structlog)

v25.1.0

Compare Source

Added
  • Add structlog.stdlib.render_to_log_args_and_kwargs processor.
    Same as structlog.stdlib.render_to_log_kwargs, but also allows to pass positional arguments to logging.
    With it, you do not need to add structlog.stdlib.PositionalArgumentsFormatter processor to format positional arguments from structlog loggers.
    #​668

  • Native loggers now have is_enabled_for() and get_effective_level() methods that mirror the behavior of the standard library's logging.Logger.isEnabledFor() and logging.Logger.getEffectiveLevel().
    #​689

Changed
  • structlog.typing.BindableLogger protocol now returns Self instead of BindableLogger.
    This adds a dependency on typing-extensions for Pythons older than 3.11.
    #​642
    #​659

  • structlog.dev.ConsoleRenderer will quote string value with special characters.
    #​647

  • structlog.stdlib.recreate_defaults() now also adds structlog.stdlib.PositionalArgumentsFormatter.
    In default native mode, this is done by the loggers at the edge.

  • structlog.make_filtering_bound_logger() now also accepts a string for min_level.

Fixed
  • Fix handling calls to {logger}.exception() outside of exception blocks.
    Depending on the structlog configuration,
    this either resulted in an event dict key exception: "MISSING" or lead to an error.
    Now, an invalid or missing exc_info will just be ignored.
    This means, that calling {logger}.exception() outside of an exception block is basically the same as calling {logger}.error().
    #​634
    #​680

  • Instantiating structlog.dev.ConsoleRenderer does not mutate the passed styles dict anymore.
    #​669

  • The native FilteringBoundLogger.fatal() method now maps to the critical level, as it does in the standard library.
    Note that the level is discouraged to use there, so we recommend to stick to error() or critical().
    #​677

  • structlog.tracebacks.ExceptionDictTransformer now actually accepts None for locals_max_length and locals_max_string.
    #​675

v24.4.0

Compare Source

Changed

No code changes since 24.3.0

v24.3.0

Compare Source

Added
  • Restore feature parity between structlog.traceback.ExceptionDictTransformer and Rich's traceback extractor:

    • When displaying locals, use Rich for formatting if it is available.
    • When displaying locals, call repr() on strings, too (improves handling of SecretStr implementations).
    • Add locals_max_length config option
    • Add locals_hide_sunder config option
    • Add locals_hide_dunder config option
    • Add suppress config option

    #​627

Changed
  • structlog.testing.capture_logs() now maps the exception log level to error (as it's elsewhere).
    #​628

v24.2.0

Compare Source

Added
  • It is now possible to disable log level-padding in structlog.dev.LogLevelColumnFormatter and structlog.dev.ConsoleRenderer.
    #​599

  • The structlog.processors.CallsiteParameterAdder can now be pickled.
    #​603

  • structlog.processors.CallsiteParameterAdder now also works with structlog.stdlib.BoundLogger's non-standard async methods (ainfo(), and so forth)
    #​618

Changed
  • structlog.processors.LogfmtRenderer now escapes newlines.
    #​592

  • structlog.processors.LogfmtRenderer now escapes backslashes and double quotes.
    #​594

  • structlog.processors.CallsiteParameterAdder has been optimized to be about 2x faster.
    #​606

Fixed
  • structlog.stdlib.render_to_log_kwargs now correctly passes stacklevel as a kwarg to stdlib logging.
    #​619

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners January 16, 2025 16:04
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 16, 2025
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 16, 2025
@product-auto-label product-auto-label bot added the api: run Issues related to the Cloud Run API. label Jan 16, 2025
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary for you and other reviewers to quickly get up to speed:

This pull request, submitted by Renovate Bot, updates the structlog dependency across the repository from version 24.1.0 to 25.1.0. The primary intent is to keep dependencies up-to-date and benefit from bug fixes and new features in the latest structlog release.

Here's a breakdown of the changes:

  • Affected File: run/idp-sql/requirements.txt
  • Change: The structlog version is updated from ==24.1.0 to ==25.1.0.

The structlog changelog highlights several additions, changes, and fixes in version 25.1.0, including:

  • Added: A new processor for handling positional arguments in logging, improved native logger methods (is_enabled_for(), get_effective_level()).
  • Changed: Updates to the BindableLogger protocol and ConsoleRenderer behavior.
  • Fixed: Several bug fixes related to exception handling, ConsoleRenderer instantiation, and native logger level mapping.

The Renovate bot configuration is set to disable automerge, requiring manual review and merge once you're satisfied.


And now, a little haiku to brighten your day:

Code flows like a stream,
Updates refresh, bugs now flee,
Progress finds its way.

Thanks,
Gemini/code-review-assist

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request updates the structlog dependency to v25.1.0. The changelog indicates several additions, changes, and fixes, including improved handling of exceptions, rendering enhancements, and new methods for native loggers. It's a good practice to keep dependencies up-to-date, so this update is welcome. However, it's crucial to ensure that this update doesn't introduce any breaking changes in the project. Please consider adding a test case that specifically exercises the logging functionality to verify that everything works as expected after the update.

@davidcavazos
Copy link
Contributor

#13065 should have addressed the missing password. Re-running tests.

@davidcavazos davidcavazos added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 27, 2025
@renovate-bot renovate-bot force-pushed the renovate/structlog-25.x branch from dde6ad0 to cb1dec6 Compare January 29, 2025 13:09
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 29, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 29, 2025
@glasnt
Copy link
Contributor

glasnt commented Jan 29, 2025

This PR requires the IDP_KEY be restored to the secrets in order for the test to pass. Instructions on how to do this are in the tutorial https://cloud.google.com/run/docs/tutorials/identity-platform#set-up-identity-platform (apiKey)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: run Issues related to the Cloud Run API. owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants