1. 25 Jun, 2019 2 commits
  2. 24 Jun, 2019 3 commits
  3. 21 Jun, 2019 2 commits
  4. 20 Jun, 2019 7 commits
    • Markus Koller's avatar
      Build correct basenames for title search results · 6905a628
      Markus Koller authored
      The "basename" here needs to be the full path without the trailing
      extension, instead of stripping the leading path as well.
      
      This was previously fixed in 2f36efa0 inside the view, but the
      problematic code was still present in FoundBlob, and the corresponding
      spec didn't actually use a child wiki page to properly verify the fix.
      6905a628
    • drew's avatar
      f3b2dde8
    • Sarah Yasonik's avatar
      Add embedding flag and filter to CPU/Mem · f49dd76a
      Sarah Yasonik authored
      This commits adds support for metrics dashboards
      for embedding. If the flag 'embedded' is provided
      to the environments/id/metrics_dashboard endpoint,
      the response will be suitable for embedding in
      issues or other content.
      
      This is a precursor for support for embedding
      metrics in GFM.
      f49dd76a
    • Zeger-Jan van de Weg's avatar
      Add Gitaly data to the usage ping · 44528f6c
      Zeger-Jan van de Weg authored
      Gitaly data wasn't available to the team, an this change is a first
      iteration towards understanding what data we need and how to interpret
      it. Later more values will be added.
      
      For now the most important thing is the filesystem String Array, as that
      includes data on ext4 exposure and NFS.
      
      Part of: #60602
      44528f6c
    • Sean McGivern's avatar
      Fix label serialisation in issue and note hooks · da470249
      Sean McGivern authored
      We were not calling hook_attrs on the labels correctly. Specs were
      passing because the issues under test did not have any labels!
      da470249
    • Bob Van Landuyt's avatar
      Render GFM html in GraphQL · 40680858
      Bob Van Landuyt authored
      This adds a `markdown_field` to our types.
      
      Using this helper will render a model's markdown field using the
      existing `MarkupHelper` with the context of the GraphQL query
      available to the helper.
      
      Having the context available to the helper is needed for redacting
      links to resources that the current user is not allowed to see.
      
      Because rendering the HTML can cause queries, the complexity of a
      these fields is raised by 5 above the default.
      
      The markdown field helper can be used as follows:
      
            ```
            markdown_field :note_html, null: false
            ```
      
      This would generate a field that will render the markdown field `note`
      of the model. This could be overridden by adding the `method:`
      argument. Passing a symbol for the method name:
      
            ```
            markdown_field :body_html, null: false, method: :note
            ```
      
      It will have this description by default:
      
      > The GitLab Flavored Markdown rendering of `note`
      
      This could be overridden by passing a `description:` argument.
      
      The type of a `markdown_field` is always `GraphQL::STRING_TYPE`.
      40680858
    • Ash McKenzie's avatar
      Gitlab::JsonCache#parse_value ensure string · 03220c00
      Ash McKenzie authored
      03220c00
  5. 19 Jun, 2019 9 commits
    • Stan Hu's avatar
      Avoid storing backtraces from Bitbucket Cloud imports in the database · 30f52b69
      Stan Hu authored
      We noticed in
      gitlab-com/gl-infra/production#908 some
      Bitbucket imports took over a second to load their projects row because
      `import_error` was huge due to errors. To prevent this, we now:
      
      1. Clean the backtraces
      2. Log the details into importer.log
      3. Omit the details from the database
      30f52b69
    • Luke Duncalfe's avatar
      CE backport for changes in EE MR 14017 · dcf811ba
      Luke Duncalfe authored
      This backports to CE changes to allow the EE model
      DesignManagement::Repository to override the #attributes_at method to
      provide its own git attributes.
      
      The #attributes_at method was freely available, as it's never called by
      anything in the app. It looks like the code that called it got
      refactored out of existence in ca66a04f. It was still being called in a
      spec
      https://gitlab.com/gitlab-org/gitlab-ce/blob/85b29c1c2fa3b94d7371cf454c485457a0756cb1/spec/services/files/create_service_spec.rb#L40
      which I've left because with the change in Lfs::FileTransformer in fact
      is now again the perfect test!
      
      See EE MR
      gitlab-ee!14017
      
      And these comment threads
      gitlab-ee!13894 (comment 178002089)
      gitlab-ee!13894 (comment 178049984)
      dcf811ba
    • Piet Jaspers's avatar
      Use correct arg name · 6f5daf49
      Piet Jaspers authored
      So funny story, true story. I tried to run the test locally, but
      didn't make it past setting up Gitaly.
      
      Here's what I tried:
      
      First attempt:
      
      `git clone gitlab-ce`
      `cd gitlab-ce && bundle install`
      `be rspec`
      
      This didn't work because I was missing the config/database.yml, I
      didn't see a `script/bootstrap` so I looked in the readme which
      redirected me to a webpage which redirected me to the
      gitlab-development-kit.
      
      Second attempt:
      
      `gem install gitlab-development-kit`
      cd gitlab-development-kit
      gdk init
      gdk isntall
      
      This broke somwhere along the way because it couldn't install Gitaly
      because my go version was too low. But it did clone the gitlab repo
      again and this time it did have a config/database.yml.
      
      So I tried to cd into it and `be rspec
      spec/lib/gitlab/database/migration_helpers_spec.rb` which complained
      about the database not being configured so I:
      
      - Changed the socket to localhost (in the config/database.yml)
      - `createdb <dev_db>` `createdb test_db`
      - `be rake db:test:prepare`
      
      Great success, it was doing things! But then failed when it came at
      the Gitaly step.
      
      Since I only want to change these three lines, at the point I gave up
      and entrusted the pipeline to do its thing.
      
      What I would have liked:
      
      - A 'It's a Rails system, I know this' readme/docs (It's in there
        somewhere just couldn't find it)
      - A way to run tests without having to use Gitaly
      - Not having too install all the things for a small fix (I get why'd
        you want this, but to me it's overkill)
      6f5daf49
    • Filipa Lacerda's avatar
      Adds missing class · d3a1468b
      Filipa Lacerda authored
      Will apply identation from
      CSS to collapsible sections
      d3a1468b
    • Piet Jaspers's avatar
      Fix syntax coloring on emacs · 31438ddd
      Piet Jaspers authored
      The rather cryptic:
      
            "fk_#{Digest::SHA256.hexdigest("#{table}_#{column}_fk").first(10)}"
      
      Was too much for emacs too handle*, since it was coming from the Rails
      codebase I took their way of doing the same thing and applied it here.
      
      I think it's easier to read and it also makes emacs render the
      migration helpers pretty again.
      
      * not true, emacs can handle anything, leave emacs alone!
      31438ddd
    • Adam Hegyi's avatar
      Fix copying a single line from Firefox · 86c08225
      Adam Hegyi authored
      This change ensures that all open <span> tags are closed before adding a
      <br> tag.
      86c08225
    • Manoj MJ's avatar
      Add documentation and tests · 53b17f03
      Manoj MJ authored
      This commit adds
       - feature specs
        - to test the ability of a user with "developer" permission
          to delete tags in repositories.
       - documentation
      53b17f03
    • Philippe Lafoucrière's avatar
      2a6dab97
    • Manoj MJ's avatar
  6. 18 Jun, 2019 6 commits
    • Thong Kuah's avatar
      Stop matching on legacy app label · 04608acf
      Thong Kuah authored
      From now on, only match on the annotations, instead of falling back to
      legacy app label. This enables users to use the app label for other
      purposes such as helm charts.
      04608acf
    • Kartikey Tanna's avatar
      #57815 Password authentication disabled for UltraAuth users · 53af3e6b
      Kartikey Tanna authored
      Disabled password authentication for the users registered using
      omniauth-ultraauth strategy
      53af3e6b
    • Zeger-Jan van de Weg's avatar
      Turn on Cat-File cache by default · 4dfaaf40
      Zeger-Jan van de Weg authored
      The feature flag has been introduced an was turned off by default,
      now the it will default to be turned on. That change would still allow
      users to turn this feature off by leveraging the Rails console by
      running:
      
      `Feature.disable("gitaly_catfile-cache")`
      
      Another option is to manage the number of items the LRU cache will
      contain, by updating the `config.toml` for Gitaly. This would be the
      `catfile_cache_size`:
      https://gitlab.com/gitlab-org/gitaly/blob/0dcb5c579e63754f557aef91a4fa7a00e5b8b127/config.toml.example#L27
      
      Closes: gitaly#1712
      4dfaaf40
    • Zeger-Jan van de Weg's avatar
      Move Gitaly feature flag logic to Feature::Gitaly · 968674e4
      Zeger-Jan van de Weg authored
      The GitalyClient held a lot of logic which was all very tightly coupled.
      In this instance the feature logic was extracted to make it do just a
      little less and create a bit more focus in the GitalyClient's
      responsibilies.
      968674e4
    • Kamil Trzciński's avatar
      Introduce default: for gitlab-ci.yml · 505d71ec
      Kamil Trzciński authored
      This moves all existing `image/services/before_script/variables`
      into `default:`. This allows us to easily add a default and
      top-level entries. `default`: is keep backward compatible: to
      be considered to be job if `default:script:` is specified. This
      behavior should be removed.
      
      All existing `image/services/before_script/variables` are properly
      handled in root context.
      505d71ec
    • Tiger Watson's avatar
      Enable project-level JIT resource creation · 74702f0e
      Tiger Watson authored
      Previously this behaviour was only available to group
      and instance-level clusters, as some project clusters
      relied on Kubernetes credentials being passed through
      to the runner instead of having their resources managed
      by GitLab (which is not available when using JIT). These
      clusters have been migrated to unmanaged, so resources
      can be created on demand for the remaining managed clusters.
      74702f0e
  7. 17 Jun, 2019 11 commits