Skip to content
Snippets Groups Projects
  1. Feb 24, 2020
  2. Jan 24, 2020
  3. Jan 03, 2020
  4. Oct 16, 2019
  5. Aug 28, 2019
  6. Aug 23, 2019
    • Stan Hu's avatar
      Eliminate Gitaly N+1 queries with notes API · e24b9c25
      Stan Hu authored
      Similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31834,
      we see that in https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
      there can be hundreds, even thousands, of Gitaly requests in the
      `/api/:version/projects/:id/merge_requests/:noteable_id/notes` endpoint.
      
      Previously, the API to retrieve notes generated hundreds of Gitaly calls
      to determine whether a system note should be shown to the user. It did
      this by:
      
      1. Rendering the Markdown
      2. Extracting cross-references from the Markdown
      3. Issuing a Gitaly `FindCommit` RPC for every reference to validate
      that the commit exists.
      
      The last step is unnecessary because we don't need to display a commit
      if the user doesn't have access to the project in the first place.
      `RendersNotes#prepare_notes_for_rendering` is already used in
      `MergeRequestsController`, which is why we don't see N+1 Gitaly calls
      there. We use it here to optimize the note redaction process.
      e24b9c25
  7. Jun 19, 2019
    • Patrick Derichs's avatar
      Use NotesFinder to fetch notes on API and Controllers · 932a9a0c
      Patrick Derichs authored
      Fix missing iid query on NotesFinder
      
      Changed parameters of find_noteable, 
      so changes across a few files were needed.
      MergeRequest also requires iid instead of id query
      
      Make NotesFinder fail with RecordNotFound again
      
      Add specs for target_iid
      
      Using RSpec tablesyntax for target_iid specs
      
      Revert "Using RSpec tablesyntax for target_iid specs"
      
      This reverts commit ba45c7f569a.
      
      Allow find_by! here
      
      Fix variable name
      
      Add readable check
      
      Revert "Add readable check"
      
      This reverts commit 9e3a1a7aa39.
      
      Remove unnecessary assignment
      
      Add required changes for EE
      
      Fix parameter count
      
      Reduce code duplication by extracting a noteable module method
      
      The call to find_noteable was redundant so
      multiple files and lines have changed in that
      commit to use the newly introduced module
      method `noteable`.
      
      Replace casecmp with include check
      
      Add parent_type parameter
      
      
      Revert "Reduce code duplication by extracting
      a noteable module method"
      
      This reverts commit 8c0923babff16.
      
      Method is no longer needed
      
      Check whether noteable can be read by user
      932a9a0c
  8. Mar 04, 2019
    • Yorick Peterse's avatar
      Refactor API noteable types constants · 654c4dd9
      Yorick Peterse authored
      This replaces API::Notes::NOTEABLE_TYPES and
      API::Discussions::NOTEABLE_TYPES with class methods defined in a
      separate helper modules. This allows EE to extend the list of noteable
      types, without having to modify the constant in-place. We can't define
      these methods directly in the API classes, as they would be used before
      we're able to extend them in EE.
      Unverified
      654c4dd9
  9. Feb 16, 2019
  10. Nov 28, 2018
  11. Sep 30, 2018
  12. Sep 11, 2018
  13. May 01, 2018
  14. Mar 07, 2018
    • Jan Provaznik's avatar
      Add discussion API · dcdfa04b
      Jan Provaznik authored
      * adds basic discussions API for issues and snippets
      * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
      dcdfa04b
  15. Nov 29, 2017
  16. Nov 21, 2017
  17. Sep 14, 2017
  18. Aug 31, 2017
  19. Aug 28, 2017
  20. Aug 08, 2017
  21. Jul 20, 2017
  22. Jun 21, 2017
  23. Apr 09, 2017
  24. Mar 27, 2017
    • Toon Claes's avatar
      API: Make the /notes endpoint work with noteable iid instead of id · add5cd99
      Toon Claes authored
      In API V4 all endpoints were changed so Merge Requests and Issues
      should be referred by iid, instead of id. Except the /notes endpoint
      was forgotten. So change the endpoints from:
      
      - /projects/:id/issues/:issue_id/notes
      - /projects/:id/merge_requests/:merge_request_id/notes
      
      To:
      
      - /projects/:id/issues/:issue_iid/notes
      - /projects/:id/merge_requests/:merge_request_iid/notes
      
      For Project Snippets nothing changes.
      add5cd99
  25. Mar 16, 2017
  26. Feb 28, 2017
  27. Feb 23, 2017
  28. Feb 08, 2017
  29. Jan 23, 2017
  30. Dec 28, 2016
  31. Dec 04, 2016
  32. Nov 15, 2016
  33. Sep 16, 2016
  34. Jun 17, 2016
  35. Jun 03, 2016
Loading