BigW Consortium Gitlab

  1. 01 Jun, 2016 21 commits
    • Fix note validation spec failures · 30aa6420
      Stan Hu authored
    • Merge branch 'separate-banzai-references' into 'master' · 2d084dd8
      Douwe Maan authored
      Separate reference gathering from rendering
      
      This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query.
      
      cc @rspeicher @DouweM 
      
      See merge request !3969
    • Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      
      == Explicit Stack
      
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      
      == Proc Behaviour Changed
      
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      
      == Permissions Checking
      
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.
    • Merge branch 'fix-cancelable-retryable' into 'master' · ef6fe42e
      Douwe Maan authored
      Fix cancelability and retriablity of pipeline with generic statuses
      
      Currently it's not possible to cancel or retry generic status since this is external thing to GitLab.
      
      This fixes shown actions of pipelines containing only these actions.
      
      
      See merge request !4380
    • Merge branch 'fix/error-500-in-pipeline-when-fork' into 'master' · 4581e71c
      Rémy Coutable authored
      Use project that belongs to pipeline in view
      
      ## What does this MR do?
      
      This MR makes project in pipelines view match the one that pipeline has been created for.
      
      Closes #17943 
      
      See merge request !4376
    • Fix rubocop offenses · 57992f3d
      Kamil Trzcinski authored
    • Merge branch 'emails-on-push-use-sidekiq-mailers' into 'master' · 9d88a3a1
      Douwe Maan authored
      Make EmailsOnPushWorker use Sidekiq mailers queue
      
      A customer was having issues with EmailsOnPushWorker clogging the Sidekiq queues and merge requests not being handled quickly. While researching whether it would possible to spin up a separate Sidekiq task just to handle merge requests and other key functions, I found that this worker was using the default Sidekiq queue. Moving to the `mailers` queue makes it possible to de-prioritize this worker and give more weight to the others.
      
      See merge request !4390
    • Merge branch 'prefer-to_reference' into 'master' · 173d83ca
      Douwe Maan authored
      Use `Snippet#to_reference` directly
      
      ## What does this MR do?
      
      Instead of hard coding snippet reference, we could just use the existing method for that.
      
      ## Why was this MR needed?
      
      To address https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4338#note_12166325 from @DouweM
      
      /cc @jschatz1 
      
      See merge request !4379
    • Merge branch 'rs-remember-me-2fa' into 'master' · 3416bc53
      Douwe Maan authored
      Pass the "Remember me" value to the 2FA token form
      
      Prior, if a user had 2FA enabled and checked the "Remember me" field,
      the setting was ignored because the OTP input was on a new form and the
      value was never passed.
      
      Closes #18000
      
      See merge request !4369
    • Merge branch 'fix-404-labels-in-todos' into 'master' · c0f19cc9
      Douwe Maan authored
      Fix 404 page when viewing TODOs that contain milestones or labels in different projects
      
      A user viewing the TODOs page will see a 404 if there are mentioned milestones or labels in multiple different projects. This is likely a caching bug and only occurs
      when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening:
          
      1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
      2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
      3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
      4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
      5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
      6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
      7. A is the wrong project, so the label lookup fails.
         
      This MR expands the `project_ref` to the right value as soon as we have it to avoid this caching bug.
          
      Closes #17898
      
      
      See merge request !4312
    • Merge branch 'doc_api_services_jira_amend' into 'master' · adcbd001
      Rémy Coutable authored
      Amend jira service api docs [ci skip]
      
      ## What does this MR do?
      
      Amends the API documentation for jira service integration
      
      ## Are there points in the code the reviewer needs to double check?
      
      No
      
      ## Why was this MR needed?
      
      The current documentation omits the username and password parameters
      
      ## What are the relevant issue numbers?
      
      ## Screenshots (if relevant)
      
      See merge request !4382
    • Merge branch 'issue_15557' into 'master' · 46ac3107
      Rémy Coutable authored
      Fix error 500 when sorting issues by milestone due date and filtering by labels
      
      fixes #15557 
      
      See merge request !4327
    • Merge branch 'rs-event-common-has-tooltip' into 'master' · 8959de25
      Dmitriy Zaporozhets authored
      Add tooltips for common Event feed entries
      
      This adds tooltips to the event target for events like "opened merge
      request !XYZ"
      
      After https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4090#note_11712839, several references in the event feed had titles but were still missing tooltips.
      
      See merge request !4371
    • Fix 404 page when viewing TODOs that contain milestones or labels in different projects · f8a3344d
      Stan Hu authored
      A user viewing the TODOs page will see a 404 if there are mentioned labels
      in multiple different projects. This is likely a caching bug and only occurs
      when Markdown rendering occurs across multiple projects, which is why it's so
      tricky to reproduce. This is what I think is happening:
      
      1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
      2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
      3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
      4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
      5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
      6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
      7. A is the wrong project, so the label lookup fails.
      
      This MR caches Markdown references if the key is present.
      
      Closes #17898
  2. 31 May, 2016 19 commits