Skip to content

Fix missing time package import in database#75

Merged
JoshuaAFerguson merged 3 commits into
mainfrom
claude/fix-time-import-01L7zGJsTeF5uRGim4fzgxBN
Nov 18, 2025
Merged

Fix missing time package import in database#75
JoshuaAFerguson merged 3 commits into
mainfrom
claude/fix-time-import-01L7zGJsTeF5uRGim4fzgxBN

Conversation

@JoshuaAFerguson

Copy link
Copy Markdown
Member

No description provided.

The database.go file was using time.Minute on lines 188-189 but the
time package was not imported, causing build failures.

This fixes the Docker build error by adding the time import to the
import block.
- Add missing log package import in notifications.go (line 645)
- Remove unused ctx variable in handlers.go SyncRepository function
  (line 1505 - not needed since goroutine uses context.Background())
UI fixes:
- Add optional chaining for user.role and user.provider in UserDetail.tsx
  to prevent TypeError when fields are undefined
- Fallback to 'N/A' label when values are missing

API fixes:
- Handle nil k8sClient gracefully in GetMetrics endpoint
- Return metrics with default values instead of error when k8s unavailable
- Log warnings but continue serving metrics from database
- Prevents frontend 'Failed to get cluster nodes' error
@JoshuaAFerguson JoshuaAFerguson merged commit 7b16495 into main Nov 18, 2025
9 of 23 checks passed
@JoshuaAFerguson JoshuaAFerguson deleted the claude/fix-time-import-01L7zGJsTeF5uRGim4fzgxBN branch November 18, 2025 00:55
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.

2 participants