Skip to content

Conversation

javuto
Copy link
Collaborator

@javuto javuto commented Apr 3, 2025

Removing all references for debug_service and debug_http settings and better debug messages.

@javuto javuto added refactor Refactorization of code osctrl-tls osctrl-tls related changes osctrl-admin osctrl-admin related changes 🧹 cleanup Cleanup related issues labels Apr 3, 2025
@javuto javuto requested a review from Copilot April 3, 2025 14:17
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 pull request removes conditional DebugService and DebugHTTP calls from various services and replaces them with direct debug logging calls, streamlining the logging flow and updating some message formats. Key changes include:

  • Removing DebugService conditionals from logging in TLS, API, and Admin packages.
  • Consolidating and simplifying debug log messages.
  • Removing unused debug-related settings in templates and admin handlers.

Reviewed Changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/tls/main.go Replaced DebugService condition with direct debug logging.
cmd/api/settings.go Simplified settings initialization by removing DebugService checks.
cmd/api/handlers/* Updated all API handlers to use plain debug logging messages.
cmd/admin/* Removed debug service conditions from administrative handlers.
cmd/admin/static/js/settings.js Removed the unused changeDebug function.
cmd/admin/handlers/types-templates.go Removed debug flags no longer in use.
Files not reviewed (1)
  • cmd/admin/templates/components/page-aside-right.html: Language not supported
Comments suppressed due to low confidence (1)

cmd/api/handlers/environments.go:183

  • The log message format is missing a space after 'environment'. Consider updating it to "Returned data for environment %s : %s" to improve readability.
log.Debug().Msgf("Returned data for environment%s : %s", env.Name, returnData)

Better text formatting

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@javuto
Copy link
Collaborator Author

javuto commented Apr 3, 2025

@zhuoyuan-liu please take a look, thanks!

Copy link
Contributor

@zhuoyuan-liu zhuoyuan-liu left a comment

Choose a reason for hiding this comment

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

LGTM

@javuto javuto merged commit a161b86 into main Apr 3, 2025
53 checks passed
@javuto javuto deleted the cleanup-debug-http-admin branch April 3, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 cleanup Cleanup related issues osctrl-admin osctrl-admin related changes osctrl-tls osctrl-tls related changes refactor Refactorization of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants