Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-19Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-03Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-20Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-18Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-13Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-06Process workhorse accelerated wiki uploadsAlessio Caiazza
Wiki attachments can be workhorse accelerated. This commit is backward compatible with older workhorse
2019-09-04Avoid calling freeze on already frozen strings in lib/gitlabdineshpanda
2019-07-10Add a rubocop for Rails.loggerMayra Cabrera
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-05-05Run rubocop -a on CE filesStan Hu
2019-04-18Migrate correlation and tracing code to LabKitAndrew Newdigate
This change is a fairly straightforward refactor to extract the tracing and correlation-id code from the gitlab rails codebase into the new LabKit-Ruby project. The corresponding import into LabKit-Ruby was in https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1 The code itself remains very similar for now. Extracting it allows us to reuse it in other projects, such as Gitaly-Ruby. This will give us the advantages of correlation-ids and distributed tracing in that project too.
2019-03-12Fix health checks not working behind load balancersStan Hu
The change in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24199 caused requests coming from a load balancer to arrive as 127.0.0.1 instead of the actual IP. `Rack::Request#ip` behaves slightly differently different than `ActionDispatch::Request#remote_ip`: the former will return the first X-Forwarded-For IP if all of the IPs are trusted proxies, while the second one filters out all proxies and falls back to REMOTE_ADDR, which is 127.0.0.1. For now, we can revert back to using `Rack::Request` because these middlewares don't manipulate parameters. The actual fix problem involves fixing Rails: https://github.com/rails/rails/issues/28436. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58573
2019-02-12Log queue duration in production_json.logStan Hu
`queue_duration` is a useful metric that is currently in api_json.log but not in production_json.log. We should add it because it tells us how long the request sat in Workhorse before Unicorn processed it. Having this field enables the support team to better troubleshoot when delays began to happen.
2019-01-24Enable the Layout/ExtraSpacing copRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-16Bang up predicate methods and use #internal_route?Ash McKenzie
Extract internal route logic check out into #internal_route? Add ? to #grack_route and #lfs_route predicate methods
2019-01-16Allow sidekiq admin requests, regardless of rootAsh McKenzie
2019-01-07Switch use of Rack::Request to ActionDispatch::RequestStan Hu
As mentioned in https://gitlab.com/gitlab-org/gitlab-ee/issues/9035#note_129093444, Rails 5 switched ActionDispatch::Request so that it no longer inherits Rack::Request directly. A middleware that uses Rack::Request to read the environment may see stale request parameters if another middleware modifies the environment via ActionDispatch::Request. To be safe, we should be using ActionDispatch::Request everywhere.
2019-01-05Fix multipart attachments not uploadingStan Hu
Mixing and matching the use of Rack::Request and ActionDispatch::Request in Rails 5 is bad, particularly if you have middleware that manipulates or accesses environment variables. `Gitlab::Middleware::Multipart` attempts to rewrite request parameters to the proper values (e.g. replacing `data_file` with `UploadedFile`). It does this by calling `Rack::Request#update_params`, which essentially updates `env['rack.request.form_hash']`. By changing to `ActionDispatch::Request`, the Go middleware was causing the request parameters to be stored inside `env['action_dispatch.request.request_parameters']`. Later calls to `Rack::Request#update_params` would not have any effect because it would attempt to update `env['rack.request.form_has']` instead of `env['action_dispatch.request.request_parameters']`. As a result, the controller still saw the old parameters. Since the Go middleware appears to be using `ActionDispatch::Request` for authorization methods, we can switch the multipart middleware to use it too. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9035
2019-01-03Remove authentication via warden and PRIVATE_TOKEN headermortyccp
2019-01-03Fix lint errormortyccp
2019-01-03Allow basic authentication on go get middlewaremortyccp
2018-12-16Remove rails4 specific codeJasper Maes
2018-12-07Add `::` to Gitlab::Middleware::CorrelationIdKamil Trzciński
2018-12-06Log and pass correlation-id between Unicorn, Sidekiq and GitalyKamil Trzciński
The Correlation ID is taken or generated from received X-Request-ID. Then it is being passed to all executed services (sidekiq workers or gitaly calls). The Correlation ID is logged in all structured logs as `correlation_id`.
2018-11-17Enable even more frozen string for lib/gitlabgfyoung
Enables frozen string for the following: * lib/gitlab/hook_data/**/*.rb * lib/gitlab/i18n/**/*.rb * lib/gitlab/import/**/*.rb * lib/gitlab/import_export/**/*.rb * lib/gitlab/kubernetes/**/*.rb * lib/gitlab/legacy_github_import/**/*.rb * lib/gitlab/manifest_import/**/*.rb * lib/gitlab/metrics/**/*.rb * lib/gitlab/middleware/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-10Make sure there's only one slash as path separatorStan Hu
In Ruby 2.4, `URI.join("http://test//", "a").to_s` will remove the double slash, however it's not the case in Ruby 2.5. Using chomp should work better for the intention, as we're not trying to allow things like ../ or / paths resolution. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53180
2018-09-05Fix multipart error on rails reloadAndrew Newdigate
2018-08-21Add public/uploads/tmp to allowed upload pathsJan Provaznik
When direct_upload is enabled and a for file is being uploaded, then workhorse uses `public/uploads/tmp` path. If `uploads.storage_path` i sset to a different directory, then upload fails because `public/uploads/tmp` is not in allowed paths.
2018-07-29Use /-/health instead of breaking /-/livenessStan Hu
2018-07-29Simplify /-/liveness check to avoid connecting to the databaseStan Hu
The previous implementation would hit the database each time and provide a dummy response. If the database goes down, this means all application workers would be taken out of service. Simplify this check by using a Rails middleware that intercepts this endpoint and returns a 200 response.
2018-07-08Add FileUploader.root to allowed upload pathsJan Provaznik
Currently we check if uploaded file is under `Gitlab.config.uploads.storage_path`, the problem is that uploads are placed in `uploads` subdirectory which is symlink. In allow_path? method we check real (expanded) paths, which causes that `Gitlab.config.uploads.storage_path` is expaned into symlink path and there is a mismatch with upload file path. By adding `Gitlab.config.uploads.storage_path/uploads` into allowed paths, this path is expaned during path check. `Gitlab.config.uploads.storage_path` is left there intentionally in case some uploader wouldn't use `uploads` subdir.
2018-07-07Refactor rspec matchers in read_only_spec.rbBrett Walker
2018-07-04Merge branch 'jprovazn-direct-upload' into 'master'Kamil Trzciński (OoO till 3th)
Add workhorse authorize method for project/group uploads Closes #44663 See merge request gitlab-org/gitlab-ce!19717
2018-07-02Better route matching for read-only detectionAsh McKenzie
2018-06-27Updated multipart to support workhorse direct uploadsJan Provaznik
2018-05-01move dev server middleware to new namespaceMike Greiling
2018-04-05Add `direct_upload` setting for artifactsKamil Trzciński
2018-03-22Fix "A copy of Gitlab::Middleware::Readonly has been removed from the module ↵Stan Hu
tree but is still active" Similar to #34047 and #29327
2018-03-08[CE] Add Naming/FileName rule checking expected class/module per filenameGabriel Mazetto
2018-03-02Move constants and update for feedbackLin Jen-Shin
2018-03-02Merge remote-tracking branch 'upstream/master' into 42572-release-controllerLin Jen-Shin
* upstream/master: (889 commits) SlackService - respect `notify_only_default_branch` for push events Clarify usage ping wording in admin area Update incoming emails documents Allow to include also descendant group labels Update docs on grouping CI jobs Support additional LabelsFinder parameters for group labels Extend Cluster Applications to install GitLab Runner to Kubernetes cluster Remove registry list webpack entry point Remove trailing newline that was causing an EE conflict Small fixes in Vuex docs Remove u2f webpack bundle Update documentation WRT to request parameters remove common_vue CommonsChunk config Fetch commit signatures from Gitaly in batches migrate stl_viewer to dynamic import migrate sketch_viewer to dynamic import migrate pdf_viewer to dynamic import migrate notebook_viewer to dynamic import migrate balsamiq_viewer to dynamic import Add some strings that were missing in gitlab.pot ...
2018-02-23Allow token authentication on go-get requestDouwe Maan
2018-02-12Honour workhorse provided file nameAlessio Caiazza
In the attempt to unify file uploading at workhorse level gitlab-org/gitlab-workhorse!230 we moved to a prefix-based tempfile creation in order to avoid upload collisions. Artifacts and LFS uploads already set original_filename to workhorse provided filename This commit add the same feature to `Gitlab::Middleware::Multipart`
2018-02-07Put controller in its separate fileLin Jen-Shin
2018-02-07Release the entire envLin Jen-Shin
2018-02-07Use a controller to hold request valuesLin Jen-Shin
So that we don't need to hold env after the request. This makes it much harder to test, especially Rails session is acting weirdly, so we need `dig('flash', 'flashes', 'alert')` to dig the actual flash value.
2018-02-07Try not to hold env and release the controllerLin Jen-Shin
after the request. This way, we could release the project referred from the controller, which potentially referred a repository which potentially allocated a lot of memories. Before this change, we could hold the last request data and cannot release the memory. After this change, the largest request data should be able to be collected from GC. This might not impact the instances having heavy load, as the last request should be changing all the time, and GC won't kick in for each request anyway. However it could still potentially allow us to free more memories for each GC runs, because now we could free one more request anyway.
2018-02-02use Gitlab::UserSettings directly as a singleton instead of ↵Mario de la Ossa
including/extending it
2018-01-31Enable RuboCop Style/RegexpLiteralTakuya Noguchi
2018-01-11Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉
2017-11-21Revert "check for `read_only?` first before seeing if request is disallowed"digitalMoksha
This reverts commit 91075c8237307e09c2be8a88ffb3711fd62417d1.