Repository navigation
[-] build remote log parser server paths with forward slashes - #1607
Merged
Merged
Conversation
On a Windows host checkHasRemotePrivileges probed the log file with
filepath.Join, so a Linux server got a backslash path, answered 58P01, and
server_log_event_counts was never sent ("lacking required privileges").
- add serverPath (path.Join) for every path sent to the server
- use it in checkHasRemotePrivileges and remoteFileSizes; local mode keeps filepath
- assert the probe argument holds only "/"; mocks expect server paths via path.Join
- add the spec and its task list
Coverage Report for CI Build 39014149448Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 89.709%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a Windows host the remote log parser probed the server's log with
filepath.Join, so a Linux server got\var\lib\..., answered58P01, andserver_log_event_countswas never sent. Server paths now go through one helper that always uses/.Also cherry-picks #1603 from
master:AGENTS.mdscopes the AI attribution rule to external contributors and points at GitHub releases for release notes.Server path call sites checked:
logparser.gocheckHasRemotePrivilegesprobelogparser_stream.goremoteFileSizesmap keyserverPath(was already/)logparser_stream.goremoteFileSizeslookuplogparser_stream.goopenRemotejoinRemoteusespath.JoinopenLocal,checkHasLocalPrivileges)filepathEvidence
TestCheckHasRemotePrivilegesUsesServerPath(expects/var/lib/postgresql/18/docker/log/postgresql-2026-10-16_203849.log) fails on Windows with an unmatched expectation. pgwatch fromorigin/v7on Windows againstpostgres:18in Docker withlog_destination = jsonlog:server_log_event_countsrows in the sink.After:
go test -p 1 ./pkg/reaperpasses on Windows;golangci-lint run ./pkg/reaper/...reports 0 issues. Same setup:Existing mocks that expected the probe as
filepath.Joinnow expectpath.Join, so they assert the server path on Windows too.Merge Danger
Door: two-way
Blast Radius: small
Remote log parsing only. Linux and macOS hosts send the same paths as before; Windows hosts start sending
/paths, which PostgreSQL on any OS accepts.