summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Avoid overwriting default jaeger values with nilAndrew Newdigate2019-01-181-1/+1
| | | | | | | | | | | | | During the review process for adding opentracing factories, a bug was introduced which caused Jaeger to initialize an invalid tracer. The bug was due to use sending nil through as a kwarg when the Jaeger initializer used a non-nil default value. This is fairly insidious as, the tracer looks like a tracer, but, when methods are invoked, it throws `NoMethodError` errors. To ensure that this issue does not happen in future, the tests have been changed to ensure that the tracer works as expected. This could avoid problems in future when upgrading to newer versions of Jaeger.
* Merge branch '26375-markdown-footnotes-not-working' into 'master'Lin Jen-Shin2019-01-173-5/+93
|\ | | | | | | | | | | | | Markdown footnotes not working Closes #26375 See merge request gitlab-org/gitlab-ce!24168
| * Refactoring and addressing review commentsBrett Walker2019-01-172-16/+25
| | | | | | | | and additional spec
| * Updates based on review commentsBrett Walker2019-01-102-9/+9
| |
| * Properly process footnotes in markdownBrett Walker2019-01-083-2/+81
| | | | | | | | | | All the ids and classes were stripped. Add them back in and make ids unique
* | Merge branch 'backup_restore_fix_issue_46891' into 'master'Rémy Coutable2019-01-171-2/+8
|\ \ | | | | | | | | | | | | Modify file restore to rectify tar issue See merge request gitlab-org/gitlab-ce!24000
| * | Modify file restore to rectify tar issueJason Colyer2019-01-171-1/+1
| | | | | | | | | | | | | | | Fixed typo in run_pipeline! function -> Open3.pieline to Open3.pipeline
| * | Modify file restore to rectify tar issueJason Colyer2019-01-171-6/+4
| | | | | | | | | | | | | | | | | | | | | Adjusted run_pipeline! function to match rubocop syntax requirements Adjusted run_pipeline! function to use variable instead of string interpolation
| * | Modify file restore to rectify tar issueJason Colyer2019-01-171-6/+4
| | | | | | | | | | | | | | | | | | Changed run_pipeline! function to have use $ in regex Changed run_pipeline! function to use Open3.pipeline instead of Open3.pipeline_start
| * | Modified files.rb to handle tar errorJason Colyer2019-01-161-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | Changed the run_pipeline! function to instead use Open3.pipeline_start In doing so, the code is able to grab the last STDERR. In the case where the error is the one from older tar versions (relating to ./), it will not raise a Backup::Error. All other instances of command failure will result in Backup::Error being raised.
* | | Merge branch '47988-improve-milestone-queries-with-subq' into 'master'Andreas Brandl2019-01-171-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Improve MilestonesFinder to accept project and group relations Closes #47988 See merge request gitlab-org/gitlab-ce!24325
| * | | Fix MilestonesFinder to pass relations to scopeHeinrich Lee Yu2019-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of querying relations into ids we just pass them to the model scope because the scope supports it now. Also changes other calls to `Milestone.for_projects_and_groups`
* | | | Merge branch 'an-opentracing-factory' into 'master'Kamil Trzciński2019-01-173-0/+175
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conditionally initialize the global opentracing tracer See merge request gitlab-org/gitlab-ce!24186
| * | | | Conditionally initialize the global opentracing tracerAndrew Newdigate2019-01-173-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will instantiate an OpenTracing tracer and configure it as the global tracer when the GITLAB_TRACING environment variable is configured. GITLAB_TRACING takes a "connection string"-like value, encapsulating the driver (eg jaeger, etc) and options for the driver. Since each service, whether it's written in Ruby or Golang, uses the same connection-string, it should be very easy to configure all services in a cluster, or even a single development machine to be setup to use tracing. Note that this change does not include instrumentation or propagation changes as this is a way of breaking a previous larger change into components. The instrumentation and propagation changes will follow in separate changes.
* | | | | API for importing external reposBen2019-01-172-0/+47
|/ / / /
* | | | Added support for custom hosts/domainsAaron Walker2019-01-171-0/+10
| | | |
* | | | Merge branch ↵Stan Hu2019-01-161-5/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '56309-read-only-controller-doesn-t-account-for-relative-paths-for-admin-sidekiq-route' into 'master' Allow sidekiq admin requests, regardless of root Closes #56309 See merge request gitlab-org/gitlab-ce!24352
| * | | | Bang up predicate methods and use #internal_route?Ash McKenzie2019-01-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Extract internal route logic check out into #internal_route? Add ? to #grack_route and #lfs_route predicate methods
| * | | | Allow sidekiq admin requests, regardless of rootAsh McKenzie2019-01-161-3/+7
| | | | |
* | | | | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-01-162-0/+35
|\ \ \ \ \
| * \ \ \ \ Merge branch 'security-2770-verify-bundle-import-files' into 'master'Yorick Peterse2019-01-162-0/+35
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | [master] Validate bundle files before unpacking them Closes #2770 See merge request gitlab/gitlabhq!2772
| | * | | | Validate bundle files before unpacking themNick Thomas2019-01-102-0/+35
| | | | | |
* | | | | | Merge branch 'refactor-after-create-default-branch' into 'master'Nick Thomas2019-01-161-0/+42
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | Refactor Project#after_create_default_branch See merge request gitlab-org/gitlab-ce!24329
| * | | | | Refactor code for protecting default branchesYorick Peterse2019-01-161-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors some of the logic used for protecting default branches, in particular Project#after_create_default_branch. The logic for this method is moved into a separate service class. Ideally we'd get rid of Project#after_create_default_branch entirely, but unfortunately Project#after_import depends on it. This means it has to stick around until we also refactor Project#after_import. For branch protection levels we introduce Gitlab::Access::BranchProtection, which provides a small wrapper around Integer based branch protection levels. Using this class removes the need for having to constantly refer to Gitlab::Access::PROTECTION_* constants.
* | | | | | Extract process_name from GitLab::SentryAndrew Newdigate2019-01-162-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitLab::Sentry has a program_context method to determine whether a Sentry exception occurred in Sidekiq or rails. Since we will need similar functionality for distributed tracing, this change extracts the program_context method into GitLab.process_name for more general consumption.
* | | | | | Merge branch 'shared_with_group_path' into 'master'Nick Thomas2019-01-161-1/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add group ful path to project's shared_with_groups See merge request gitlab-org/gitlab-ce!24052
| * | | | | | Add group full path to project's shared_with_groupsMathieu Parent2019-01-151-1/+4
| | |/ / / / | |/| | | |
* | | | | | Merge branch 'fix-trivial-accessors' into 'master'Rémy Coutable2019-01-162-9/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | chore(rubocop): fix Style/TrivialAccessors issues See merge request gitlab-org/gitlab-ce!24416
| * | | | | | chore(rubocop): fix Style/TrivialAccessors issuesSemyon Pupkov2019-01-162-9/+3
| | |_|_|/ / | |/| | | |
* | | | | | Merge branch 'zj-feature-gate-set-project-path' into 'master'Kamil Trzciński2019-01-162-8/+45
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow setting of feature gates per project See merge request gitlab-org/gitlab-ce!24184
| * | | | | | Allow setting of feature gates per projectZeger-Jan van de Weg2019-01-142-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For features the feature gates are sometimes projects, not groups or users. For example for git object pools: https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5872 This commit allows for setting feature group gates based on projects, by its path as that seems most convenient.
* | | | | | | Merge branch 'update-sidekiq-cron' into 'master'Kamil Trzciński2019-01-161-5/+2
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | Update sidekiq-cron 0.6.0 -> 1.0 See merge request gitlab-org/gitlab-ce!24235
| * | | | | | Adopt Fugit to replace Rufus::SchedulerLin Jen-Shin2019-01-151-5/+2
| | | | | | |
* | | | | | | API: Fix default branch protection setting for Admin APIRobert Schilling2019-01-151-1/+1
|/ / / / / /
* | | | | | Merge branch ↵Douwe Maan2019-01-151-2/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '44780-wiki-page-with-a-dot-inside-title-slug-leads-to-404-in-the-api' into 'master' Support Wiki pages with dots in slugs Closes #44780 See merge request gitlab-org/gitlab-ce!24383
| * | | | | | API: Support dots in wiki slugsRobert Schilling2019-01-151-2/+4
| | | | | | |
* | | | | | | Merge branch 'sh-fix-backfill-project-repo-migration' into 'master'Douwe Maan2019-01-151-2/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix duplicate project disk path in BackfillLegacyProjectRepositories Closes #56061 See merge request gitlab-org/gitlab-ce!24213
| * | | | | | | Cleanup dead code and commentsToon Claes2019-01-111-20/+0
| | | | | | | |
| * | | | | | | Fix failing spec with orphaned namespaceToon Claes2019-01-111-1/+1
| | | | | | | |
| * | | | | | | Load all projects, namespaces, routes in 1 queryToon Claes2019-01-111-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid doing sequential database queries to load the namespaces and the routes of projects and namespaces. This results in the following query: ```sql SELECT "projects"."id" AS t0_r0, "projects"."name" AS t0_r1, "projects"."path" AS t0_r2, "projects"."description" AS t0_r3, "projects"."created_at" AS t0_r4, "projects"."updated_at" AS t0_r5, "projects"."creator_id" AS t0_r6, "projects"."namespace_id" AS t0_r7, "projects"."last_activity_at" AS t0_r8, "projects"."import_url" AS t0_r9, "projects"."visibility_level" AS t0_r10, "projects"."archived" AS t0_r11, "projects"."avatar" AS t0_r12, "projects"."import_status" AS t0_r13, "projects"."star_count" AS t0_r14, "projects"."import_type" AS t0_r15, "projects"."import_source" AS t0_r16, "projects"."import_error" AS t0_r17, "projects"."ci_id" AS t0_r18, "projects"."shared_runners_enabled" AS t0_r19, "projects"."runners_token" AS t0_r20, "projects"."build_coverage_regex" AS t0_r21, "projects"."build_allow_git_fetch" AS t0_r22, "projects"."build_timeout" AS t0_r23, "projects"."pending_delete" AS t0_r24, "projects"."public_builds" AS t0_r25, "projects"."last_repository_check_failed" AS t0_r26, "projects"."last_repository_check_at" AS t0_r27, "projects"."container_registry_enabled" AS t0_r28, "projects"."only_allow_merge_if_pipeline_succeeds" AS t0_r29, "projects"."has_external_issue_tracker" AS t0_r30, "projects"."repository_storage" AS t0_r31, "projects"."request_access_enabled" AS t0_r32, "projects"."has_external_wiki" AS t0_r33, "projects"."ci_config_path" AS t0_r34, "projects"."lfs_enabled" AS t0_r35, "projects"."description_html" AS t0_r36, "projects"."only_allow_merge_if_all_discussions_are_resolved" AS t0_r37, "projects"."printing_merge_request_link_enabled" AS t0_r38, "projects"."auto_cancel_pending_pipelines" AS t0_r39, "projects"."import_jid" AS t0_r40, "projects"."cached_markdown_version" AS t0_r41, "projects"."delete_error" AS t0_r42, "projects"."last_repository_updated_at" AS t0_r43, "projects"."storage_version" AS t0_r44, "projects"."resolve_outdated_diff_discussions" AS t0_r45, "projects"."repository_read_only" AS t0_r46, "projects"."merge_requests_ff_only_enabled" AS t0_r47, "projects"."merge_requests_rebase_enabled" AS t0_r48, "projects"."jobs_cache_index" AS t0_r49, "projects"."pages_https_only" AS t0_r50, "projects"."remote_mirror_available_overridden" AS t0_r51, "projects"."pool_repository_id" AS t0_r52, "projects"."runners_token_encrypted" AS t0_r53, "projects"."bfg_object_map" AS t0_r54, "namespaces"."id" AS t1_r0, "namespaces"."name" AS t1_r1, "namespaces"."path" AS t1_r2, "namespaces"."owner_id" AS t1_r3, "namespaces"."created_at" AS t1_r4, "namespaces"."updated_at" AS t1_r5, "namespaces"."type" AS t1_r6, "namespaces"."description" AS t1_r7, "namespaces"."avatar" AS t1_r8, "namespaces"."share_with_group_lock" AS t1_r9, "namespaces"."visibility_level" AS t1_r10, "namespaces"."request_access_enabled" AS t1_r11, "namespaces"."description_html" AS t1_r12, "namespaces"."lfs_enabled" AS t1_r13, "namespaces"."parent_id" AS t1_r14, "namespaces"."require_two_factor_authentication" AS t1_r15, "namespaces"."two_factor_grace_period" AS t1_r16, "namespaces"."cached_markdown_version" AS t1_r17, "namespaces"."runners_token" AS t1_r18, "namespaces"."runners_token_encrypted" AS t1_r19, "routes"."id" AS t2_r0, "routes"."source_id" AS t2_r1, "routes"."source_type" AS t2_r2, "routes"."path" AS t2_r3, "routes"."created_at" AS t2_r4, "routes"."updated_at" AS t2_r5, "routes"."name" AS t2_r6, "routes_projects"."id" AS t3_r0, "routes_projects"."source_id" AS t3_r1, "routes_projects"."source_type" AS t3_r2, "routes_projects"."path" AS t3_r3, "routes_projects"."created_at" AS t3_r4, "routes_projects"."updated_at" AS t3_r5, "routes_projects"."name" AS t3_r6 FROM "projects" LEFT OUTER JOIN "namespaces" ON "namespaces"."id" = "projects"."namespace_id" LEFT OUTER JOIN "routes" ON "routes"."source_id" = "namespaces"."id" AND "routes"."source_type" = $1 LEFT OUTER JOIN "routes" "routes_projects" ON "routes_projects"."source_id" = "projects"."id" AND "routes_projects"."source_type" = $2 LEFT OUTER JOIN "project_repositories" ON "projects"."id" = "project_repositories"."project_id" WHERE ("projects"."storage_version" IS NULL OR "projects"."storage_version" = 0) AND "project_repositories"."project_id" IS NULL AND ("projects"."id" BETWEEN $3 AND $4); -- [["source_type", "Namespace"], -- ["source_type", "Project"], -- ["id", 1], -- ["id", 4]] ```
| * | | | | | | Fix duplicate disk path in Backfill ProjectReposStan Hu2019-01-111-1/+12
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On GitLab.com, we saw numerous duplicate disk entry inserts because the migration was not taking the routes table into account. We now implement this in the migration to be consistent. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56061
* | | | | | | Merge branch 'backstage/gb/refactor-only-except-policies-config' into 'master'Kamil Trzciński2019-01-158-26/+25
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | Refactor only/except configuration policies See merge request gitlab-org/gitlab-ce!24359
| * | | | | | Simplify code related to setting default config valuesGrzegorz Bizon2019-01-152-1/+3
| | | | | | |
| * | | | | | Make default config entry value configurableGrzegorz Bizon2019-01-159-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce `default:` configuration entry setting that makes it possible to configure a default value of an entry, what overrides class-level `def self.default` value.
| * | | | | | Add more specs for only/except policy config entryGrzegorz Bizon2019-01-141-1/+1
| | | | | | |
| * | | | | | Make fabrication of default config entry more readableGrzegorz Bizon2019-01-142-5/+7
| | | | | | |
| * | | | | | Refactor only/except configuration policiesGrzegorz Bizon2019-01-1410-21/+21
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit refactors only/except policies so that these policies could be self-contained. This also adds some changes to YAML configuration library to provide more context to default entry value fabrication process.
* | | | | | Merge branch 'sh-fix-gon-helper-avatar' into 'master'Rémy Coutable2019-01-141-4/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix no avatar not showing in user selection box Closes #56268 See merge request gitlab-org/gitlab-ce!24346
| * | | | | | Fix no avatar not showing in user selection boxStan Hu2019-01-131-4/+11
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After upgrading to Ruby 2.5.3, we switched `URI.join` in favor of `Gitlab::Utils.append_path`. However, ActionController::Base.helpers.image_path can return a full URL if a CDN host is present. Rails provides a way to generate the full URL using the asset path, but that doesn't appear to work because `request` is nil`. Revert to the previous behavior to handle CDNs and relative URLs. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56268
* | | | | | Resolve "Add "What's new" menu item in top navigation"Brandon Labuschagne2019-01-143-8/+88
| | | | | |