Skip to content

fix: keep the health checks out of the access log - #3908

Merged
micbar merged 1 commit into
mainfrom
fix/healthcheck-access-log
Nov 6, 2026
Merged

micbar merged 1 commit into
mainfrom
fix/healthcheck-access-log

Conversation

@micbar

@micbar micbar commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

The health and readiness checks of the proxy and the collaboration service send a request to their own HTTP port. It ran through the whole middleware chain, so every probe wrote an access log line from the pod's own address.

  • the check sends a HEAD with the user agent opencloud-health-check
  • the access logs of the proxy and collaboration leave out a request with that user agent when it comes from the server's own address, a client sending the user agent is still logged
  • the check uses the probe's context

The check stays an HTTP request: a TCP connect also succeeds when the server accepts connections but doesn't answer.

Related Issue

  • none

Motivation and Context

With the probe intervals of the helm chart that is about 18 access log lines per minute per pod, none of them from a client.

How Has This Been Tested?

  • unit tests for the check and the access log filter, not yet deployed

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

@micbar micbar added the Type:Bug label Nov 5, 2026
@micbar
micbar marked this pull request as ready for review November 5, 2026 20:36
@micbar
micbar requested a review from butonic November 5, 2026 20:36
@codacy-production

codacy-production Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 9 complexity

Metric Results
Complexity 9

View in Codacy

🟢 Coverage 58.33% diff coverage · +0.02% coverage variation

Metric Results
Coverage variation ✅ +0.02% coverage variation (-1.00%)
Diff coverage ✅ 58.33% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2eb513b) 93435 26771 28.65%
Head commit (f558acd) 93455 (+20) 26791 (+20) 28.67% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3908) 24 14 58.33%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@micbar
micbar enabled auto-merge November 5, 2026 20:48
@micbar
micbar force-pushed the fix/healthcheck-access-log branch from b480519 to f558acd Compare November 5, 2026 22:00
wrap := middleware.NewWrapResponseWriter(w, r.ProtoMajor)
next.ServeHTTP(wrap, r)

if checks.IsLocalHealthCheck(r) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even need the collaboration service to have an accesslog middleware? all services are routed through the proxy and if we for whatever reason need to deploy another collaboration service for a second WOPI applicatio we can also deploy it togehter with the proxy ...

@micbar
micbar merged commit 413082e into main Nov 6, 2026
61 checks passed
@micbar
micbar deleted the fix/healthcheck-access-log branch November 6, 2026 08:56
@openclouders openclouders mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants