Skip to content

[log] Add debug logging to vcsTimeFromBuildInfo - #9361

Merged
lpcox merged 2 commits into
mainfrom
log/version-vcs-time-debug-logging-625cbe525b998983
Jul 15, 2026
Merged

[log] Add debug logging to vcsTimeFromBuildInfo#9361
lpcox merged 2 commits into
mainfrom
log/version-vcs-time-debug-logging-625cbe525b998983

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds debug logging to vcsTimeFromBuildInfo in internal/version/version.go, mirroring the existing logging pattern already present in vcsCommitFromBuildInfo.

Changes

  • internal/version/version.go: Added 3 logVersion debug calls to vcsTimeFromBuildInfo:
    • Log when build info is unavailable (nil)
    • Log when vcs.time is found (with the value)
    • Log when vcs.time is not found in build settings

Why

Both VCS metadata extraction functions (vcsCommitFromBuildInfo and vcsTimeFromBuildInfo) serve the same purpose but only the commit variant had debug logging. This makes them consistent and helps troubleshoot version string generation issues when the gateway fails to embed build metadata.

Validation

  • go test ./internal/version/ passed
  • go vet ./internal/version/ passed
  • go build -o awmg . succeeded

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Go Logger Enhancement · 340.2 AIC · ⊞ 7.6K ·

Mirror the debug logging pattern already present in vcsCommitFromBuildInfo.
This makes both VCS metadata extraction functions consistent and helps
troubleshoot version string generation when build info is unavailable
or missing expected settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Jul 14, 2026
@lpcox
lpcox marked this pull request as ready for review July 15, 2026 14:38
Copilot AI review requested due to automatic review settings July 15, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds debug logging to vcsTimeFromBuildInfo in internal/version/version.go, aligning its observability with the existing logging already present in vcsCommitFromBuildInfo to help troubleshoot missing VCS build metadata.

Changes:

  • Added a debug log when buildInfo is nil in vcsTimeFromBuildInfo.
  • Added a debug log when vcs.time is found (including the extracted value).
  • Added a debug log when vcs.time is not found in build settings.
Show a summary per file
File Description
internal/version/version.go Adds debug logging around vcs.time extraction to improve troubleshooting consistency with vcsCommitFromBuildInfo.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread internal/version/version.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lpcox
lpcox merged commit 52645f7 into main Jul 15, 2026
24 checks passed
@lpcox
lpcox deleted the log/version-vcs-time-debug-logging-625cbe525b998983 branch July 15, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants