This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| gitlab.com/gitlab-org/labkit/v2 | require | patch |
v2.0.0-20260313093530-689dca33010c -> v2.0.0-20260316151747-255e9e7abf22
|
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
This MR has been generated by Renovate Bot.
@igor.drozdov Thank you so much for taking time to sync with me on my local issue.
@nateweinshenker, the MCP tools were getting registered, but the main problem was that only gitlab_search was being returned, which we weren't looking at. We also checked out your MRs to verify whether we could access the other MCP tools and add them in the new agents UI. I think it's still in development, as there are some console errors in the UI when accessing existing agents.
Thank you everyone for your support.
Naman Jagdish Gala (bccba630) at 17 Mar 09:05
Naman Jagdish Gala (7e4aff87) at 17 Mar 09:05
Merge branch 'ef-migrate-to-v2-labkit' into 'master'
... and 1 more commit
Migrates all structured logging in gitlab-pages from Logrus (github.com/sirupsen/logrus) and labkit v1 (gitlab.com/gitlab-org/labkit/log) to the labkit v2 slog-based API (gitlab.com/gitlab-org/labkit/v2/log).
LabKit v2 standardises on Go's log/slog for structured logging across all GitLab Go services. This migration:
log dependencies from the logging pathCore logging (internal/logging/logging.go)
logrus.Entry-based LogRequest with a context-enriching function that returns context.Context with correlation_id, host, and path fields via logv2.WithFields
log.AccessLogger middleware with a self-contained BasicAccessLogger using a responseRecorder wrapper that captures status code and response sizevar Logger = logv2.New() as the global application logger, reconfigured by ConfigureLogging
LevelTrace constant (slog.LevelDebug - 4) for verbose diagnostic loggingAll call sites (20+ files)
logging.LogRequest(r).WithField(...).Info(...) pattern with logging.Logger.InfoContext(logging.LogRequest(r), ..., key, value) throughout:
internal/auth/auth.go and internal/auth/session.go (OAuth flow logging)internal/acme/acme.go (ACME challenge redirects)internal/artifact/artifact.go (artifact proxy requests)internal/domain/domain.go (domain resolution errors)internal/handlers/ (authentication and artifact handlers)internal/httperrors/httperrors.go (500 error logging)internal/httprange/http_reader.go (range request errors)internal/httptransport/metered_round_tripper.go (trace-level response logging)internal/namespaceinpath/middleware.go (namespace URL rewriting)internal/primarydomain/middleware.go (primary domain redirects)internal/ratelimiter/middleware.go and tls.go (rate limit logging)logrus.Fields{} with inline key-value pairs.WithError(err) with "error", err attributeSlow-log middleware (internal/logging/slowlogs/)
LoggerFunc signature from func(*http.Request) *logrus.Entry to func(*http.Request) context.Context
logtest.LogRecorder instead of testlog.Hook
Tests
testlog.Hook (Logrus) to logtest.LogRecorder (labkit v2)internal/ratelimiter/middleware_test.go and tls_test.go to swap the global Logger for test isolationCI
allow_failure: true on code_quality job pending golangci-lint v2 upgradego.mod (other packages may still import it transitively)Changelog trailer to the commits that need to be included in the changelog (e.g. Changelog: changed)Initiated the revert: gitlab-com/gl-infra/k8s-workloads/gitlab-com!5278
@vglafirov Can you please review this small change. Thank you.
This reverts the change from !5174, which increased the gitlab-pages authCookieSessionTimeout to 60m in gprd.
The authCookieSessionTimeout line is removed, restoring the default behavior.
gitlab-com/gl-infra/production#21559: We are investigating if this revert can fix the incident.
Naman Jagdish Gala (4729846c) at 17 Mar 07:16
Revert "gprd: increase gitlab-pages authCookieSessionTimeout to 60m"
Please ensure that any updates to GraphQL filters are reflected in the saved view MCP tool.
/cc @mmacfarlane
Created a follow up issue: #1180
Migrates all structured logging in gitlab-pages from Logrus (github.com/sirupsen/logrus) and labkit v1 (gitlab.com/gitlab-org/labkit/log) to the labkit v2 slog-based API (gitlab.com/gitlab-org/labkit/v2/log).
LabKit v2 standardises on Go's log/slog for structured logging across all GitLab Go services. This migration:
log dependencies from the logging pathCore logging (internal/logging/logging.go)
logrus.Entry-based LogRequest with a context-enriching function that returns context.Context with correlation_id, host, and path fields via logv2.WithFields
log.AccessLogger middleware with a self-contained BasicAccessLogger using a responseRecorder wrapper that captures status code and response sizevar Logger = logv2.New() as the global application logger, reconfigured by ConfigureLogging
LevelTrace constant (slog.LevelDebug - 4) for verbose diagnostic loggingAll call sites (20+ files)
logging.LogRequest(r).WithField(...).Info(...) pattern with logging.Logger.InfoContext(logging.LogRequest(r), ..., key, value) throughout:
internal/auth/auth.go and internal/auth/session.go (OAuth flow logging)internal/acme/acme.go (ACME challenge redirects)internal/artifact/artifact.go (artifact proxy requests)internal/domain/domain.go (domain resolution errors)internal/handlers/ (authentication and artifact handlers)internal/httperrors/httperrors.go (500 error logging)internal/httprange/http_reader.go (range request errors)internal/httptransport/metered_round_tripper.go (trace-level response logging)internal/namespaceinpath/middleware.go (namespace URL rewriting)internal/primarydomain/middleware.go (primary domain redirects)internal/ratelimiter/middleware.go and tls.go (rate limit logging)logrus.Fields{} with inline key-value pairs.WithError(err) with "error", err attributeSlow-log middleware (internal/logging/slowlogs/)
LoggerFunc signature from func(*http.Request) *logrus.Entry to func(*http.Request) context.Context
logtest.LogRecorder instead of testlog.Hook
Tests
testlog.Hook (Logrus) to logtest.LogRecorder (labkit v2)internal/ratelimiter/middleware_test.go and tls_test.go to swap the global Logger for test isolationCI
allow_failure: true on code_quality job pending golangci-lint v2 upgradego.mod (other packages may still import it transitively)Changelog trailer to the commits that need to be included in the changelog (e.g. Changelog: changed)Can we create an issue to track golangci-lint v2 upgrade. Thank you.
@JonstonChan backend LGTM. Thank you.
@eduardobonet Can you please perform backend maintainer review. Thank you.
Fixes non-auto-correctable Naming/HeredocDelimiterNaming offenses
| Before | After |
|---|---|
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #589138
5th March: There hasn't been any change in Pages on this date.
2nd March: The only change that occurred is gitlab-com/gl-infra/k8s-workloads/gitlab-com!5174 (merged). We can revert it to verify whether that caused the issue.
/cc @kivikakk