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
2018-12-13Fix deprecation: Passing conditions to delete_all is deprecatedJasper Maes
2018-12-13Allow suggesting single line changes in diffsOswaldo Ferreira
2018-12-12Merge branch 'refactor-create-or-update-import-data' into 'master'Robert Speicher
Refactor Project#create_or_update_import_data See merge request gitlab-org/gitlab-ce!23701
2018-12-12Merge branch 'feature/gb/ci-pipeline-bridge' into 'master'Kamil Trzciński
Add basic implementation of CI/CD bridge job See merge request gitlab-org/gitlab-ce!23730
2018-12-12Fix creation query for pools repositoryZeger-Jan van de Weg
2018-12-12Merge branch ↵Nick Thomas
'54650-send-an-email-to-project-owners-when-a-mirror-update-fails' into 'master' Send a notification email on mirror update errors Closes #54650 See merge request gitlab-org/gitlab-ce!23595
2018-12-12Add basic implementation of CI/CD bridge jobGrzegorz Bizon
2018-12-12Send a notification email on mirror update errorsAlejandro Rodríguez
The email is sent to project maintainers containing the last mirror update error. This will allow maintainers to set alarms and react accordingly.
2018-12-11Refactor Project#create_or_update_import_dataYorick Peterse
In https://gitlab.com/gitlab-org/release/framework/issues/28 we found that this method was changed a lot over the years: 43 times if our calculations were correct. Looking at the method, it had quite a few branches going on: def create_or_update_import_data(data: nil, credentials: nil) return if data.nil? && credentials.nil? project_import_data = import_data || build_import_data if data project_import_data.data ||= {} project_import_data.data = project_import_data.data.merge(data) end if credentials project_import_data.credentials ||= {} project_import_data.credentials = project_import_data.credentials.merge(credentials) end project_import_data end If we turn the || and ||= operators into regular if statements, we can see a bit more clearly that this method has quite a lot of branches in it: def create_or_update_import_data(data: nil, credentials: nil) if data.nil? && credentials.nil? return else project_import_data = if import_data import_data else build_import_data end if data if project_import_data.data # nothing else project_import_data.data = {} end project_import_data.data = project_import_data.data.merge(data) end if credentials if project_import_data.credentials # nothing else project_import_data.credentials = {} end project_import_data.credentials = project_import_data.credentials.merge(credentials) end project_import_data end end The number of if statements and branches here makes it easy to make mistakes. To resolve this, we refactor this code in such a way that we can get rid of all but the first `if data.nil? && credentials.nil?` statement. We can do this by simply sending `to_h` to `nil` in the right places, which removes the need for statements such as `if data`. Since this data gets written to a database, in ProjectImportData we do make sure to not write empty Hash values. This requires an `unless` (which is really a `if !`), but the resulting code is still very easy to read.
2018-12-11Generalise test compare serviceGilbert Roulot
It adds a base class for CompareTestReportsService containing common code with CompareLicenseManagementReportsService which is present in GitLab Enterprise Edition.
2018-12-11Revert "Merge branch '28682-can-merge-branch-before-build-is-started' into ↵Stan Hu
'master'" This reverts commit 793be43b35bc8cd2a9effe38280417ee198647cb, reversing changes made to 8d0b4872ba3ff787c4067618f48b60bd24466c74. For projects not using any CI, enabling merge only when pipeline succeeds caused merge requests to be in unmergeable state, which caused significant confusion. See https://gitlab.com/gitlab-org/gitlab-ce/issues/55144 for more details.
2018-12-11Merge branch 'sh-json-serialize-broadcast-messages' into 'master'Robert Speicher
Avoid caching BroadcastMessage as an ActiveRecord object Closes #55034 See merge request gitlab-org/gitlab-ce!23662
2018-12-10Merge branch 'sh-remove-gitlab-shell-include' into 'master'Rémy Coutable
Remove unnecessary includes of ShellAdapter See merge request gitlab-org/gitlab-ce!23607
2018-12-10Merge branch ↵Grzegorz Bizon
'54626-able-to-download-a-single-archive-file-with-api-by-ref-name' into 'master' Add endpoint to download single artifact by ref Closes #54626 See merge request gitlab-org/gitlab-ce!23538
2018-12-09Avoid caching BroadcastMessage as an ActiveRecord objectStan Hu
When a Rails 4 host serializes a BroadcastMessage, it will serialize `ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer`, which does not exist in Rails 5. This will cause Error 500s on a Rails 5 reading from this cache. To make Rails 4 and 5 play well together, store the data as JSON and construct the ActiveRecord objects from JSON. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55034
2018-12-07Merge branch 'zj-pool-repository-creation' into 'master'Nick Thomas
Allow public forks to be deduplicated See merge request gitlab-org/gitlab-ce!23508
2018-12-07Allow public forks to be deduplicatedZeger-Jan van de Weg
When a project is forked, the new repository used to be a deep copy of everything stored on disk by leveraging `git clone`. This works well, and makes isolation between repository easy. However, the clone is at the start 100% the same as the origin repository. And in the case of the objects in the object directory, this is almost always going to be a lot of duplication. Object Pools are a way to create a third repository that essentially only exists for its 'objects' subdirectory. This third repository's object directory will be set as alternate location for objects. This means that in the case an object is missing in the local repository, git will look in another location. This other location is the object pool repository. When Git performs garbage collection, it's smart enough to check the alternate location. When objects are duplicated, it will allow git to throw one copy away. This copy is on the local repository, where to pool remains as is. These pools have an origin location, which for now will always be a repository that itself is not a fork. When the root of a fork network is forked by a user, the fork still clones the full repository. Async, the pool repository will be created. Either one of these processes can be done earlier than the other. To handle this race condition, the Join ObjectPool operation is idempotent. Given its idempotent, we can schedule it twice, with the same effect. To accommodate the holding of state two migrations have been added. 1. Added a state column to the pool_repositories column. This column is managed by the state machine, allowing for hooks on transitions. 2. pool_repositories now has a source_project_id. This column in convenient to have for multiple reasons: it has a unique index allowing the database to handle race conditions when creating a new record. Also, it's nice to know who the host is. As that's a short link to the fork networks root. Object pools are only available for public project, which use hashed storage and when forking from the root of the fork network. (That is, the project being forked from itself isn't a fork) In this commit message I use both ObjectPool and Pool repositories, which are alike, but different from each other. ObjectPool refers to whatever is on the disk stored and managed by Gitaly. PoolRepository is the record in the database.
2018-12-07Merge branch 'ce-4326-one-notification-per-code-review' into 'master'Douwe Maan
Backports changes made to One notification per code review See merge request gitlab-org/gitlab-ce!23656
2018-12-07Merge branch 'store-correlation-logs' into 'master'Stan Hu
Log and pass correlation-id between Unicorn, Sidekiq and Gitaly See merge request gitlab-org/gitlab-ce!22844
2018-12-07Add endpoint to download single artifact by refSteve Azzopardi
Add a new endpoint `projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name` which is the close the web URL for consistency sake. This endpoint can be used to download a single file from artifacts for the specified ref and job. closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54626
2018-12-07Backports changes made to One notification per code reviewTiago Botelho
The EE merge request can be found here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8442
2018-12-07Merge branch 'jprovazn-fast-upload-delete' into 'master'Grzegorz Bizon
Use FastDestroy for deleting uploads Closes #46069 See merge request gitlab-org/gitlab-ce!20977
2018-12-07Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'Kamil Trzciński
Add CI/CD build encrypted tokens (after revert) Closes #52342 See merge request gitlab-org/gitlab-ce!23649
2018-12-07Update gitlab runner helm chart to 0.1.39Tomasz Maczukin
2018-12-07Encrypt CI/CD builds tokensKamil Trzciński
Brings back 1e8f1de0 reverted in !23644 Closes #52342 See merge request gitlab-org/gitlab-ce!23436
2018-12-07Truncate merge request titles with periods instead of ellipsisStan Hu
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54862
2018-12-07Revert "Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'"Robert Speicher
This reverts commit 1e8f1de034aa9b6a60b640b2b091f60c4d3ba365, reversing changes made to 62d971129da99936a3cdc04f3740d26f16a0c7a6.
2018-12-07Use FastDestroy for deleting uploadsJan Provaznik
It gathers list of file paths to delete before destroying the parent object. Then after the parent_object is destroyed these paths are scheduled for deletion asynchronously. Carrierwave needed associated model for deleting upload file. To avoid this requirement, simple Fog/File layer is used directly for file deletion, this allows us to use just a simple list of paths.
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-12-06Introduce Knative Serverless TabDylan Griffith
2018-12-06Merge branch 'expose-mr-pipeline-variables' into 'master'Kamil Trzciński
Expose merge request pipeline variables See merge request gitlab-org/gitlab-ce!23398
2018-12-06Resolve "Can add an existing group member into a group project with new ↵James Lopez
permissions but permissions are not overridden"
2018-12-06Expose merge request pipeline variablesShinya Maeda
Introduce the following variables - CI_MERGE_REQUEST_ID - CI_MERGE_REQUEST_IID - CI_MERGE_REQUEST_REF_PATH - CI_MERGE_REQUEST_PROJECT_ID - CI_MERGE_REQUEST_PROJECT_PATH - CI_MERGE_REQUEST_PROJECT_URL - CI_MERGE_REQUEST_TARGET_BRANCH_NAME - CI_MERGE_REQUEST_SOURCE_PROJECT_ID - CI_MERGE_REQUEST_SOURCE_PROJECT_PATH - CI_MERGE_REQUEST_SOURCE_PROJECT_URL - CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
2018-12-06Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'Kamil Trzciński
Encrypt CI/CD builds tokens Closes #52342 See merge request gitlab-org/gitlab-ce!23436
2018-12-06Remove unnecessary includes of ShellAdapterStan Hu
Determined by running the script: ``` included = `git grep --name-only ShellAdapter`.chomp.split("\n") used = `git grep --name-only gitlab_shell`.chomp.split("\n") included - used ```
2018-12-05Merge branch '34758-deployment-cluster' into 'master'Kamil Trzciński
Use group clusters when deploying (DeploymentPlatform) See merge request gitlab-org/gitlab-ce!22308
2018-12-05Rename project's pipelines relationFrancisco Javier López
2018-12-05Merge branch 'fix/gb/improve-timeout-inputs-help-sections' into 'master'Kamil Trzciński
Improve help and validation sections of maximum build timeout inputs Closes #49434 See merge request gitlab-org/gitlab-ce!23586
2018-12-05Add custom validation message for chronic duration attributeGrzegorz Bizon
2018-12-05Fix build class tests for authentication tokenGrzegorz Bizon
2018-12-05Merge branch 'mr-pipelines-2' into 'master'Kamil Trzciński
Merge request pipelines See merge request gitlab-org/gitlab-ce!23217
2018-12-05Add specs for encrypted build authentication tokensGrzegorz Bizon
2018-12-05Merge request pipelinesShinya Maeda
2018-12-05Add Project#lfs_http_url_to_repo from EEAsh McKenzie
For CE, #lfs_http_url_to_repo calls #http_url_to_repo where as for EE we examine for a Geo setup so we can support push to secondary for LFS.
2018-12-05Eager load clusters to prevent N+1Thong Kuah
This also means we need to apply the `current_scope` otherwise this method will return all clusters associated with the groups regardless of any scopes applied to this method
2018-12-05Unify into :group_clusters feature flagThong Kuah
With this MR, group clusters is now functional, so default to enabled. Have a single setting on the root ancestor group to enabled or disable group clusters feature as a whole
2018-12-05Various improvements to hierarchy sortingThong Kuah
- Rename ordered_group_clusters_for_project -> ancestor_clusters_for_clusterable - Improve name of order option. It makes much more sense to have `hierarchy_order: :asc` and `hierarchy_order: :desc` - Allow ancestor_clusters_for_clusterable for group - Re-use code already present in Project
2018-12-05Create k8s namespace for project in group clustersThong Kuah
AFAIK the only relevant place is Projects::CreateService, this gets called when user creates a new project, forks a new project and does those things via the api. Also create k8s namespace for new group hierarchy when transferring project between groups Uses new Refresh service to create k8s namespaces - Ensure we use Cluster#cluster_project If a project has multiple clusters (EE), using Project#cluster_project is not guaranteed to return the cluster_project for this cluster. So switch to using Cluster#cluster_project - at this stage a cluster can only have 1 cluster_project. Also, remove rescue so that sidekiq can retry
2018-12-05Teach Cluster about #all_projectsThong Kuah
For project level, it's the project directly associated. For group level, it's the projects under that group.
2018-12-05Teach Project about #all_clustersThong Kuah
This returns a union of the project level clusters and group level clusters associated with this project.