Skip to content

Pull requests missclassified as 'default' and request URLs not stored correctly #1185

@kriswest

Description

@kriswest

Describe the bug
I note that since #1164 all proxied requests are being logged in the pushes table. However, I also note that:

  • both fetch and pull requests appear to be POST requests and get classified as "default" - where parseAction seems to expect a GET request:
    if (pathBreakdown.gitPath.endsWith('git-upload-pack') && req.method === 'GET') {
  • We don't store the request URL correctly (url field appears to be a duplicate of the repo field, giving the remote repo URL) making it hard to determine what the original request was!

Misclassification will mean that the wrong action chain is applied. These are currently the same pull and default, but they might not be when plugins are in use or in future if we develop more processors to apply on pull.

To Reproduce
Steps to reproduce the behavior:

  1. Observe content of DB (or DB file)
  2. Perform a fetch and a pull through the proxy
  3. Investigate the content of the DB records created in the pull table, pay attention to the type, url and repo values..

Expected behavior
Pulls are classified correctly and sufficient detail on each request is recorded to determine what git call it was after-the-fact. Investigate why the url field is being populated with the repository url (which is in the repo field already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions