Skip to content

Extract test-depended log messages into constants #334

Open

Description

@WentingWu666666

Summary

Log messages that tests depend on (e.g., via \grep\ in CI workflows or string assertions in unit tests) should be extracted into a shared constants file with well-defined patterns. This prevents silent test breakage when log wording is changed.

Context

Raised by @rayhan-quilt in PR #328 review.

Scope

  • Audit controller log messages that are asserted on in CI workflows or unit tests
  • Create a constants file (e.g., \internal/controller/log_messages.go) with named constants
  • Update both the log call sites and test assertions to reference the constants

Notes

This is a codebase-wide convention change, not specific to any single feature PR.

Activity

  1. documentdb-triage-tool commented on Apr 29, 2026

    @documentdb-triage-tool

    🤖 Auto-triaged by documentdb-triage-tool.

    Applied: go, enhancement
    Project fields suggested: Component controllers · Priority P3 · Effort M · Status Triage
    Confidence: 0.82 (llm)

    Reasoning

    LLM: Codebase-wide refactor to extract log message constants for test resilience — no functional change, purely a polish/maintainability improvement across the controllers and test layers.

    If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

  2. added
    enhancement
    go
    on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgo

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions