Skip to content

Config prod fixes and better logging #70

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

Merged
merged 2 commits into from
Jun 26, 2025
Merged

Config prod fixes and better logging #70

merged 2 commits into from
Jun 26, 2025

Conversation

GrantBirki
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 21:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the production mode configuration and improves logging by:

  • Removing the explicit production flag in favor of relying solely on the environment value.
  • Adding debug logging for the global configuration in the builder component.
  • Bumping the version and updating corresponding tests to reflect these changes.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/unit/lib/hooks/core/config_loader_spec.rb Removed tests for the production flag in favor of environment check
spec/unit/lib/hooks/core/builder_spec.rb Updated custom logger expectations with added debug methods
lib/hooks/version.rb Bumped version from 0.6.2 to 0.6.3
lib/hooks/core/config_loader.rb Removed production flag assignment based on environment
lib/hooks/core/builder.rb Added debug logging for global config and removed production log
lib/hooks/app/endpoints/catchall.rb Updated error response enrichment to use @production instead
lib/hooks/app/api.rb Sets @production based on the environment
Comments suppressed due to low confidence (1)

lib/hooks/app/endpoints/catchall.rb:106

  • The change from using config[:production] to @production in the catchall endpoint may introduce unintended behavior if @production is not initialized in this scope. Consider explicitly passing the production flag to the endpoint or ensuring the instance variable is reliably set.
              error_response[:backtrace] = e.backtrace.join("\n") unless @production

@GrantBirki GrantBirki merged commit 1e806ce into main Jun 26, 2025
22 checks passed
@GrantBirki GrantBirki deleted the config-prod-fixes branch June 26, 2025 21:54
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.

1 participant