Commit Graph

9221 Commits

Author SHA1 Message Date
Sarah Groff Hennigh-Palermo b8b1b02994 Add new version of script
More aligned design. More functionality.
2019-05-17 15:01:01 +00:00
Zeger-Jan van de Weg a3f80f9f2e Add PoolRepository to the usage ping
PoolRepository is a relatively new model of which the counts could help
to further determine the priority of new features. Also gives some
insight into the number of forks customers have.
2019-05-17 09:10:29 +00:00
Evan Read 43d21b831a Edit comments in CI template 2019-05-17 08:45:23 +00:00
Douglas Barbosa Alexandre 35e9d58e2e Merge branch 'haml-lint-fe' into 'master'
Add haml-lint.yml to FE for roulette

See merge request gitlab-org/gitlab-ce!28301
2019-05-16 18:16:11 +00:00
Lin Jen-Shin 112193e8a6 Merge branch 'jc-omit-count-diverging-commits-max' into 'master'
Omit max-count for diverging_commit_counts behind feature flag

See merge request gitlab-org/gitlab-ce!28157
2019-05-16 15:27:50 +00:00
Vladimir Shushlin 3c33724e2e Add Let's Encrypt client
Part of adding Let's Encrypt certificates for pages domains

Add acme-client gem

Client is being initialized by private key stored in secrets.yml
Let's Encrypt account is being created lazily.
If it's already created, Acme::Client just gets account_kid by
calling new_account method

Make Let's Encrypt client an instance
Wrap order and challenge classes
2019-05-16 09:32:25 +00:00
Achilleas Pipinellis b2ed767b53 Merge branch 'patch-55' into 'master'
Removed the unnecessary line. It would be covered anyway by line 352...

See merge request gitlab-org/gitlab-ce!28228
2019-05-15 18:49:40 +00:00
John Cai f86797b5a9 Omit max-count for diverging_commit_counts behind feature flag
We want to optimize the query for the CountDivergingCommits rpc by
removing the --max-count argument now that we have commit graphs
enabled for all repositories during housekeeping. However, we want to
test this first behind a feature flag.
2019-05-14 12:13:19 -05:00
Luke Bennett 4c19474eef Add haml-lint.yml to FE for roulette 2019-05-13 22:16:17 +00:00
Bob Van Landuyt 4c2f681490 Add correlation id to all sentry errors
Before this, we were only adding the correlation id to the "acceptable
exceptions" which we handle in code.

But we need to add it to the default raven context so the information
would be available for uncaught exceptions.
2019-05-13 13:27:41 -05:00
bardia zamanian 37ac7a2d8c Removed the unnecessary line. It would be covered anyway by line 352 (replicas=$(get_replicas "$track" "$percentage") 2019-05-09 19:54:28 +00:00
Patrick Derichs b145d9b873 Refactor spec to reload existing_label right after creation
This will avoid timestamp comparison issues later within equality check
with attributes
2019-05-08 12:39:54 +00:00
Robert Speicher 7b7416d986 Merge branch 'ce-11099-removing-the-project-that-holds-the-insights-configuration-raises-an-error' into 'master'
Add remove_foreign_key_if_exists

See merge request gitlab-org/gitlab-ce!28172
2019-05-07 20:24:22 +00:00
Ash McKenzie c5a9bc17a1 Merge branch '56850-add-new-unicorn-metrics' into 'master'
Resolve "Add new Unicorn metrics"

Closes #56850

See merge request gitlab-org/gitlab-ce!27474
2019-05-07 16:21:40 +00:00
Jacob Vosmaer 5dc68854f8 Register "gitaly_delta_islands" feature flag 2019-05-07 15:18:08 +00:00
Olivier Gonzalez ff83da7150 Bump clair-local-scan to v2.0.8 2019-05-07 13:41:14 +00:00
Francisco Javier López 68e533dc21 Add improvements to the global search process
Removed the conditions added to
Project.with_feature_available_for_user, and moved to the
IssuableFinder. Now, we ensure that, in the projects retrieved
in the Finder, the user has enough access for the feature.
2019-05-07 11:08:25 +00:00
Lin Jen-Shin 24eff5e083 Add remove_foreign_key_if_exists 2019-05-07 15:38:43 +08:00
Felipe Artur c40bad741f Fix issuables state_id nil when importing projects from GitHub
Issues and merge requests imported from GitHub are having state_id
set to null. This fixes the GitHub project importer and schedule
migrations to fix state_id.
2019-05-06 19:45:17 +00:00
Douwe Maan 908860087f Merge branch '30093-apply-bfg-object-map-to-database' into 'master'
Remove cleaned up OIDs from database and cache

Closes #30093

See merge request gitlab-org/gitlab-ce!26555
2019-05-06 11:33:11 +00:00
Stan Hu 02ca1577ea Merge branch 'jc-disconnect-git-alternates-client' into 'master'
Add client methods for DisconnectGitAlternates rpc

See merge request gitlab-org/gitlab-ce!27938
2019-05-06 10:54:16 +00:00
Nick Thomas 8973f32d42
Remove cleaned up OIDs from database and cache 2019-05-06 11:35:03 +01:00
Dmitriy Zaporozhets d7eb886b9f Merge branch 'jej/session-stored-globaly' into 'master'
Session stored globally per request

See merge request gitlab-org/gitlab-ce!27658
2019-05-06 10:33:52 +00:00
Stan Hu f93b2e02a5 Run rubocop -a on CE files 2019-05-05 03:24:28 -07:00
John Cai 0e033b3124 Add client methods for DisconnectGitAlternates rpc
DisconnectGitAlternates is a Gitaly RPC that will delete a repository's
objects/info/alternates file. This commit adds client support for that
RPC.
2019-05-03 15:59:28 -07:00
Fabien Catteau 447c40d58d Propagate excluded paths to SAST & DS jobs
Propagate DS_EXCLUDED_PATHS to dependency_scanning job,
and SAST_EXCLUDED_PATHS and SAST_BANDIT_EXCLUDED_PATHS to sast job.
This makes possible to excluded certains paths from SAST reports
and Dependency Scanning reports, respectively.
2019-05-03 09:03:44 +00:00
Mayra Cabrera 89132bbdd6 Add gitlab-managed option to clusters form
When this option is enabled, GitLab will create namespaces and service
accounts as usual. When disabled, GitLab wont create any project
specific kubernetes resources

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
2019-05-03 01:05:53 +00:00
Jan Provaznik d25239ee0b Use git_garbage_collect_worker to run pack_refs
PackRefs is not an expensive gitaly call - we want to
call it more often (than as part of full `gc`) because
it helps to keep number of refs files small - too many
refs file may be a problem for deployments with
slow storage.
2019-05-02 21:41:05 +00:00
Mayra Cabrera 5432f5480f Adds a way to start multiple manual jobs in stage
- Adds an endpoint on PipelinesController
- Adds a service that iterates over every build in a stage and
plays it.
- Includes 'play_manual' details on EntitySerializer
- Builds a new Stage state: PlayManual. An stage can take this status if
it has manual builds or an skipped, scheduled or manual status
- Includes FE modifications and specs
2019-05-02 18:27:35 +00:00
Luke Duncalfe 49cb4b3dfc Add support for two-step Gitaly Rebase RPC
The new two-step Gitaly `Rebase` RPC yields the rebase commit SHA to the
client before proceeding with the rebase.

This avoids an issue where the rebase commit SHA was returned when the
RPC had fully completed, and in some cases this would be after the Rails
`post_receive` worker services had already run. In these situations,
the merge request did not yet have its rebase_commit_sha attribute set
introducing the possibility for bugs (such as previous approvals being
reset).

https://gitlab.com/gitlab-org/gitlab-ee/issues/5966
2019-05-02 17:30:07 +00:00
Douglas Barbosa Alexandre 4e67122e38 Merge branch '27777-drop-projects-ci_id-column' into 'master'
Resolve "Drop "projects"."ci_id" column"

Closes #27777

See merge request gitlab-org/gitlab-ce!27623
2019-05-02 16:56:48 +00:00
Jason Goodman 1b8646804d Update deployment chat message notification
Include link to user and commit title.
Rearrange text
2019-05-02 16:07:26 +00:00
Dmitriy Zaporozhets ee7d2c1b2f
Remove unused projects.ci_id column
And remove Gitlab::Ci::Trace#deprecated_path as it relies on ci_id

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-02 17:55:28 +03:00
Jan Provaznik 96750fac4c Add opentracing integration for graphql
Extends existing graphql's tracer with opentracing measurements. Because
it also adds Tracing::Graphql class (for opentracing), it also renames
Graphql::Tracing class to Graphql::GenericTracing to minimize confusion
with similar class names.
2019-05-02 07:01:14 +00:00
James Edwards-Jones 5faa98f481 Session stored globally per request
- This can be accessed with Session.current and is restored after.
- Data can be stored under a key with NamespacedSessionStore
2019-05-02 12:28:26 +07:00
Victor Zagorodny aaceabdd05 Propagate ENV vars to SAST and Dependency Scanning Docker containers only if they are set 2019-05-01 12:30:48 +00:00
Douwe Maan e6767f5922 Merge branch 'bvl-upload-designs-fix-ce' into 'master'
Make Gitlab::GlRepository#types an instance method

See merge request gitlab-org/gitlab-ce!27902
2019-05-01 11:52:57 +00:00
Sarah Yasonik 552a3d2fd9 Update metrics dashboard API to load yml from repo
Updates the EnvironmentController#metrics_dashboard endpoint
to support a "dashboard" param, which can be used to specify
the filepath of a dashboard configuration from a project
repository. Dashboard configurations are expected to be
stored in .gitlab/dashboards/.

Updates dashboard post-processing steps to exclude custom
metrics, which should only display on the system dashboard.
2019-05-01 10:16:03 +00:00
Douglas Barbosa Alexandre 29c5174274 Merge branch 'feat/sentry-environment' into 'master'
feat: add option to define the Sentry Environment

See merge request gitlab-org/gitlab-ce!27091
2019-04-30 18:27:27 +00:00
Stan Hu f4cc9438e3 Merge branch 'jc-client-for-fetch-objects-into-pool' into 'master'
Add client methods for FetchIntoObjectPool RPC

See merge request gitlab-org/gitlab-ce!27767
2019-04-30 18:05:14 +00:00
Roger Meier aebb2f7025 feat: allow Sentry configuration to be passed on gitlab.yml 2019-04-30 18:10:57 +02:00
John Cai 5ee7876534 Add client methods for FetchIntoObjectPool RPC
Gitaly's FetchIntoObjectPool RPC will idempotently fetch objects into an
object pool. If the pool doesn't exist, it will create an empty pool
before attempting the fetch. This change adds client code as well as
specs to cover this behavior.
2019-04-30 08:28:56 -07:00
Bob Van Landuyt 55457b2c16 Make Gitlab::GlRepository#types an instance method
Having this as an instance method makes it easier to override in the
prepended `EE` module.

If we try to override this method on the module itself, it would not
be overridden correctly, depending on the load order.
2019-04-30 17:17:08 +02:00
Grzegorz Bizon 56c8b35b84 Merge branch 'pl-fix-k8s-ns-query-variables' into 'master'
Use correct k8s namespace in Prometheus queries

See merge request gitlab-org/gitlab-ce!27812
2019-04-30 13:31:47 +00:00
Evan Read c5305a02e3 Docs aren't reviewed using roulette 2019-04-30 10:38:46 +00:00
Thong Kuah 33a765c17a Teach Helm::Api about #uninstall 2019-04-29 22:55:11 -07:00
Ryan Cobb 17986d91a5 Add back ruby_memory_bytes metric, limit duplication, clean up
This adds back ruby_memory_bytes for backwards compatibility, limits
code duplication, cleans up unused methods, and limits the unicorn
worker sampling scope.
2019-04-29 12:13:02 -06:00
Robert Speicher bb733375d1 Merge branch '6565-move-sidekiq-cluster-ce' into 'master'
Change comments to point to the new path of sidekiq-cluster

See merge request gitlab-org/gitlab-ce!27707
2019-04-29 17:17:31 +00:00
Douglas Barbosa Alexandre f832b96ad7 Merge branch 'use-keyword-args-for-databuilder-push' into 'master'
Use keyword args for databuilder push

See merge request gitlab-org/gitlab-ce!24088
2019-04-29 14:43:56 +00:00
Stan Hu b02458ef52 Fix slow performance with compiling HAML templates
In Rails 5, including `ActionView::Context` can have a significant and
hidden performance penalty because this module also includes
`ActionView::CompiledTemplates`. This means that any module that
includes ActionView::Context becomes a descendant of
`CompiledTemplates`.

When a partial is rendered for the first time, it runs
`ActionView::CompiledTemplates#module_eval`, which will evaluate a
string that defines a new method for that partial. For example, the
source of partial might be this string:

```
def _app_views_project_show_html_haml___12345(local_assigns, output)
  "hello world"
end
```

When this string is evaluated, the Ruby interpreter will define the
method and clear the global method cache for all descendants of
`ActionView::CompiledTemplates`. Previous to this change, we
inadvertently made a number of modules fall into this category:

* GroupChildEntity
* NoteUserEntity
* Notify
* MergeRequestUserEntity
* AnalyticsCommitEntity
* CommitEntity
* UserEntity
* Kaminari::Helpers::Paginator
* CurrentUserEntity
* ActionView::Base
* ActionDispatch::DebugExceptions::DebugView
* MarkupHelper
* MergeRequestPresenter

After this change:

* Kaminari::Helpers::Paginator
* ActionView::Base
* ActionDispatch::DebugExceptions::DebugView

Each time a partial is rendered for the first time, all methods for
those modules will have to be redefined. This can exact a significant
performance penalty.

How bad is this penalty? Using the following benchmark script, we can
use DTrace to sample the Ruby interpreter:

```
Benchmark.bm do |x|
  x.report do
    1000.times do
      ActionView::CompiledTemplates.module_eval("def testme\nend")
    end
  end
end
```

This revealed a 11x jump in the time spent in `core#define_method`
alone.

Rails 6 fixes this behavior by moving the `include CompiledTemplates`
into ActionView::Base so that including `ActionView::Context` doesn't
quietly affect other modules in this way.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/11198
2019-04-29 05:33:50 -07:00