Conversation
📝 WalkthroughWalkthroughPull request updates Helm chart dependencies (cortex-postgres 0.5.13 → 0.5.14), configures Renovate for automated PostgreSQL and Docker image management, adjusts logging levels across controllers, bumps PostgreSQL version to 17.9, and configures structured logging in the manager. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| }, | ||
| { | ||
| "fileMatch": ["^postgres/Dockerfile$"], | ||
| "matchStrings": ["FROM (?<depName>[^:\\n]+):(?<currentValue>[^@\\n]+)@sha256:(?<currentDigest>[a-f0-9]+)"], | ||
| "datasourceTemplate": "docker" | ||
| }, | ||
| { | ||
| "fileMatch": ["^postgres/Dockerfile$"], | ||
| "matchStrings": ["ENV PG_VERSION (?<currentValue>[\\d]+\\.[\\d]+)-[^\\n]+"], | ||
| "depNameTemplate": "postgres", | ||
| "datasourceTemplate": "docker", | ||
| "versioningTemplate": "semver-coerced", | ||
| "autoReplaceStringTemplate": "ENV PG_VERSION {{{newValue}}}-1.pgdg13+1" |
There was a problem hiding this comment.
Love this! And since we have a workflow that automatically updates the appVersion of the postgres chart this would also result in a helm-lint error when we are releasing a new version and forgot to update the postgres chart version.
| @@ -1,5 +1,5 @@ | |||
| # Last updated: 17 Mar 2026 | |||
| FROM debian:trixie-slim@sha256:26f98ccd92fd0a44d6928ce8ff8f4921b4d2f535bfa07555ee5d18f61429cf0c | |||
| # Last updated: 9 Apr 2026 | |||
There was a problem hiding this comment.
We used this comment before to trigger a new image build if there was an upstream fix and nothing to do for us. Since we have the renovate PR now (which doesn't update this comment) with the fixed sha we can get rid of this comment.
Test Coverage ReportTest Coverage 📊: 69.1% |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmd/manager/main.go (1)
154-157: Make slog level runtime-configurable instead of hardcoded INFO.Hardcoding
LevelInfosuppresses useful debug diagnostics from scheduling/data paths (for example ininternal/scheduling/lib/filter_weigher_pipeline_step_monitor.go:235-270andinternal/knowledge/db/db.go:290-305). Consider wiring this to a flag/env var withinfoas default.Proposed refactor
import ( "context" "crypto/tls" "flag" "log/slog" "net/http" "os" "path/filepath" "slices" + "strings" "time" @@ var secureMetrics bool var enableHTTP2 bool + var slogLevel string @@ flag.BoolVar(&enableHTTP2, "enable-http2", false, "If set, HTTP/2 will be enabled for the metrics and webhook servers") + flag.StringVar(&slogLevel, "slog-level", "info", "slog level: debug|info|warn|error") @@ - slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ - Level: slog.LevelInfo, - }))) + level := new(slog.LevelVar) + switch strings.ToLower(slogLevel) { + case "debug": + level.Set(slog.LevelDebug) + case "warn": + level.Set(slog.LevelWarn) + case "error": + level.Set(slog.LevelError) + default: + level.Set(slog.LevelInfo) + } + slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: level})))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cmd/manager/main.go` around lines 154 - 157, Change the hardcoded slog level in the slog.SetDefault call so it is configurable at runtime: read a new CLI flag or environment variable (e.g., "log-level") in main and parse it into a slog.Level (default to slog.LevelInfo), then pass that parsed level into slog.NewJSONHandler's HandlerOptions instead of slog.LevelInfo; update the initialization around slog.SetDefault and slog.NewJSONHandler so components using slog get the configured level.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cmd/manager/main.go`:
- Around line 154-157: Change the hardcoded slog level in the slog.SetDefault
call so it is configurable at runtime: read a new CLI flag or environment
variable (e.g., "log-level") in main and parse it into a slog.Level (default to
slog.LevelInfo), then pass that parsed level into slog.NewJSONHandler's
HandlerOptions instead of slog.LevelInfo; update the initialization around
slog.SetDefault and slog.NewJSONHandler so components using slog get the
configured level.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9e14f35b-4525-43e6-944f-52fd9165dafb
📒 Files selected for processing (1)
cmd/manager/main.go
No description provided.