1. 13 Aug, 2020 1 commit
    • Stan Hu's avatar
      Refactor uploaders to use different upload strategies · cb807306
      Stan Hu authored
      Previously it was particularly tricky to add a new object storage method
      because you had to be aware of how to deal with different Goroutines and
      contexts to handle the Workhorse upload flow
      (https://docs.gitlab.com/ee/development/uploads.html#direct-upload). In
      addition, the execution engine to handle this was duplicated across
      multiple files. The execution engine essentially did the following:
      
      1. Set up an upload context with a deadline
      2. Record upload metrics
      3. Initialize cleanup functions
      4. Initiate upload
      5. Validate upload ETag
      6. Do cleanup (e.g. delete the temporary file)
      
      To reduce code duplication and to make it easier to add new object
      stores, the common execution sequence is now encapsulated in the
      `uploader` `Execute()` method. We also introduce an `UploadStrategy`
      interface that handles the details of the uploads, and `Execute()` calls
      methods on this interface.
      
      Now adding a new object storage type is a matter of implementing the
      `UploadStrategy` interface without needing to understand the details of
      the execution engine.
      cb807306
  2. 12 Aug, 2020 5 commits
  3. 11 Aug, 2020 4 commits
  4. 10 Aug, 2020 7 commits
  5. 07 Aug, 2020 1 commit
    • Patrick Bajao's avatar
      Add References struct · 55363e35
      Patrick Bajao authored
      Extract references parsing logic to a separate file and struct.
      Also modified `Item` struct to have `Line` as `int32` so it'll
      be fixed size.
      
      This is in preparation for another MR wherein references will be
      stored in file instead of memory.
      55363e35
  6. 06 Aug, 2020 5 commits
  7. 31 Jul, 2020 1 commit
  8. 30 Jul, 2020 1 commit
  9. 24 Jul, 2020 1 commit
  10. 23 Jul, 2020 1 commit
  11. 16 Jul, 2020 4 commits
  12. 15 Jul, 2020 2 commits
    • Jacob Vosmaer's avatar
      Merge branch '217392-read-references' into 'master' · ce696bcf
      Jacob Vosmaer authored
      Read and parse LSIF references
      
      See merge request gitlab-org/gitlab-workhorse!524
      ce696bcf
    • Patrick Bajao's avatar
      Read and parse LSIF references · 978671ce
      Patrick Bajao authored
      In order to be able to "Find references" of a given range or
      definition, we need to be able to read `references` items from
      the LSIF file.
      
      This will then be written to the JSON file for each range via
      `references` property.
      
      The property will look something like:
      
      ```
      "references": [
        {
          "path": "main.go#L7"
        }
      ]
      ```
      
      Each reference will be an object with `path` property. The `path`
      property will point to the exact line where it is being used.
      
      This is currently behind a feature flag (`code_navigation_references`)
      which will set `ProcessLsifReferences` header to `true` when
      enabled. If `false`, the `references` won't be read and generated.
      978671ce
  13. 14 Jul, 2020 3 commits
  14. 13 Jul, 2020 3 commits
  15. 03 Jul, 2020 1 commit