Call new rails api /git_audit_event to report git steaming event
What does this MR do and why?
According to this [discussion]#384960 (comment 1384459575), refactor the git streaming process flow in this merge request.
sequenceDiagram
User->>+GitLabShell: git clone or pull (SSH)
GitLabShell->>Rails: request /allowed
rect rgb(200, 150, 255)
Rails->>GitLabShell: authentication info (with NeedAudit)
end
GitLabShell->>Gitaly: UploadPackWithSidechannel
Gitaly->>GitLabShell: UploadPackWithSidechannelResponse(stats={Wants=9, Haves=0, ...})
alt NeedAudit
rect rgb(200, 150, 255)
GitLabShell-->>Rails: Report audit
end
end
GitLabShell->>-User: Return
Update 5 files
- /workhorse/internal/api/api.go
- /workhorse/internal/api/api_test.go
- /workhorse/internal/git/git-http.go
- /workhorse/internal/git/receive-pack.go
- /workhorse/internal/git/upload-pack.go
- /workhorse/internal/gitaly/smarthttp.go
Workhorse will request /api/v4/internal/shellhorse/git_audit_event
in this MR, it depends on:
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sword