summaryrefslogtreecommitdiff
path: root/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'sh-fix-issue-59985' into 'master'Michael Kozono2019-04-081-2/+2
|\ | | | | | | | | | | | | Fix stage index migration failing in PostgreSQL 10 Closes #59985 See merge request gitlab-org/gitlab-ce!26972
| * Fix stage index migration failing in PostgreSQL 10sh-fix-issue-59985Stan Hu2019-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://www.postgresql.org/message-id/9922.1353433645%40sss.pgh.pa.us, the PostgreSQL window function last_value may not consider the right rows: Note that first_value, last_value, and nth_value consider only the rows within the "window frame", which by default contains the rows from the start of the partition through the last peer of the current row. This is likely to give unhelpful results for last_value and sometimes also nth_value. You can redefine the frame by adding a suitable frame specification (RANGE or ROWS) to the OVER clause. See Section 4.2.8 for more information about frame specifications. This query could be fixed by adding `RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING`, but that's quite verbose. It's simpler just to use the first_value function. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59985
* | Improve performance of PR importfix-pull-request-importerKamil Trzciński2019-04-081-1/+1
| | | | | | | | | | | | This removes unneeded `.reload` call which makes AR to load ALL objects, and create its in-memory representation.
* | GitHub import: Run housekeeping after initial importsh-git-gc-after-initial-fetchStan Hu2019-04-071-0/+5
| | | | | | | | | | | | | | | | | | After an initial fetch, the repository will have many loose objects and refs. Running a `git gc` will compact refs into `packed-refs` and objects into `.pack` files, which should make importing pull requests faster. Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/59477
* | Restore original Security/DAST.gitlab-ci.ymlTiger Watson2019-04-063-62/+51
| | | | | | | | | | Reverts https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26520 for Security/DAST.gitlab-ci.yml.
* | Merge branch '58612-clean-up-notes-data' into 'master'Stan Hu2019-04-061-8/+11
|\ \ | | | | | | | | | | | | | | | | | | Clean up `noteable_id` for notes on commits Closes #58612 See merge request gitlab-org/gitlab-ce!26104
| * | Clean up `noteable_id` for notes on commits58612-clean-up-notes-dataHeinrich Lee Yu2019-04-061-8/+11
| | | | | | | | | | | | | | | | | | | | | This was incorrectly set by a bug in: https://gitlab.com/gitlab-org/gitlab-ce/issues/54924 Also adds a `batch_size` option to `update_column_in_batches`
* | | Add Knative metrics to PrometheusChris Baumbauer2019-04-061-0/+39
|/ /
* | Merge branch 'sh-fix-realtime-changes-with-reserved-words' into 'master'Douglas Barbosa Alexandre2019-04-051-11/+12
|\ \ | | | | | | | | | | | | | | | | | | Fix real-time updates for projects that contain a reserved word Closes #60113 See merge request gitlab-org/gitlab-ce!27060
| * | Fix real-time updates for projects that contain a reserved wordStan Hu2019-04-051-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Projects that included reserved words (e.g. test-create) would fail to generate a proper ETag key because of the name. To fix this, we add forward slashes to match the exact name so that /test-create doesn't get matched, but /create does. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60113
* | | Merge branch 'ce-10546-fix-epic-depth-validation' into 'master'Douglas Barbosa Alexandre2019-04-051-10/+52
|\ \ \ | | | | | | | | | | | | | | | | [CE-port] Fix Epic depth validation See merge request gitlab-org/gitlab-ce!26390
| * | | Prevent infinite loops in ObjectHierarchyce-10546-fix-epic-depth-validationHeinrich Lee Yu2019-04-051-4/+23
| | | |
| * | | Adds max_descendants_depth to ObjectHierarchyHeinrich Lee Yu2019-04-051-10/+33
| | | | | | | | | | | | | | | | CE-port of 10546-fix-epic-depth-validation
* | | | Revert "Merge branch 'bump_kubernetes_1_11_9' into 'master'"Mayra Cabrera2019-04-051-2/+2
| | | | | | | | | | | | | | | | This reverts merge request !26991
* | | | Add part of needed codeGosia Ksionek2019-04-051-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add columns to store project creation settings Add project creation level column in groups and default project creation column in application settings Remove obsolete line from schema Update migration with project_creation_level column existence check Rename migrations to avoid conflicts Update migration methods Update migration method
* | | | Merge branch 'feature/gb/serverless-switch-to-gitlabktl' into 'master'Kamil Trzciński2019-04-051-5/+8
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | Serverless backend now uses `gitlabktl` tool Closes #56252 and #58058 See merge request gitlab-org/gitlab-ce!26926
| * | | Build and deploy serverless functions with gitlabktlGrzegorz Bizon2019-04-031-5/+8
| | | |
* | | | Merge branch 'revert-3962b00b' into 'master'Andreas Brandl2019-04-057-326/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'" See merge request gitlab-org/gitlab-ce!27051
| * | | | Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-057-326/+0
| | | | | | | | | | | | | | | This reverts merge request !26823
* | | | | Revert "Merge branch 'require-all-templates-to-include-default-stages' into ↵Sean McGivern2019-04-0515-29/+13
|/ / / / | | | | | | | | | | | | | | | | 'master'" This reverts merge request !26954
* | | | Move Contribution Analytics related spec in ↵Imre Farkas2019-04-057-0/+326
| | | | | | | | | | | | | | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* | | | Fall back to project repository type by defaultBob Van Landuyt2019-04-052-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that we always have a repository type when trying to parse a repository from a path. This is needed because sometimes we want to perform access checks as if the project already existed, for example when creating a project on push. Before this we were only doing that when accessing git over http, this makes sure it also works correctly when accessing git over SSH
* | | | Merge branch 'require-all-templates-to-include-default-stages' into 'master'Sean McGivern2019-04-0515-13/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require all templates to use default stages Closes #59992 See merge request gitlab-org/gitlab-ce!26954
| * | | | Require all templates to use default stagesKamil Trzciński2019-04-0515-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our templates are free to override the 'stages:'. However, they should follow the convention to always include 'build', 'test', 'deploy' which are defaults when not defined.
* | | | | Merge branch 'bump_kubernetes_1_11_9' into 'master'Douwe Maan2019-04-051-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Bump Helm to 2.13.1 and kubectl to 1.11.9 See merge request gitlab-org/gitlab-ce!26991
| * | | | | Bump Helm to 2.13.1 and kubectl to 1.11.9bump_kubernetes_1_11_9Thong Kuah2019-04-051-2/+2
| | |_|_|/ | |/| | |
* | | | | Add a proxy method to PrometheusClientReuben Pereira2019-04-051-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Also refactor the get and json_api_get methods so that the get method can be reused by the new proxy method. - The new proxy method makes no changes to the request to the prometheus server and response from the prometheus server. This allows it to be used as a proxy to the Prometheus server, hence the name.
* | | | | Merge branch '54506-show-error-when-namespace-svc-missing' into 'master'Grzegorz Bizon2019-04-052-1/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show error when namespace/svc account missing Closes #54506 See merge request gitlab-org/gitlab-ce!26362
| * | | | | Display error for unmet prerequisitesjerasmus2019-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Added the ability to display an error for unmet prerequisites
| * | | | | Detailed status for builds that fail prerequisitesTiger2019-04-022-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create FailedUnmetPrerequisites status to allow custom messaging for builds that were unable to be queued due to failing to meet prerequisites (eg. failing to create Kubernetes namespace for deployment).
* | | | | | fix(gitlab-ci-config): allow strings in the 'include' keywordPaul 🐻2019-04-052-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is a followup to !24098 which introduced a validation of the `include:` keyword of a gitlab-ci configuration file when triggered from /ci/lint API calls. However, there was a test case missing: the case of a single string as value. I have added a test case for that which shows that the code was not validating it correctly. This commit fixes that to allow all `include:` valid inputs.
* | | | | | Merge branch ↵Douglas Barbosa Alexandre2019-04-052-1/+10
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | '9217-warn-on-git-fetch-over-ssh-if-the-secondary-is-lagging-the-primary' into 'master' Display console messages, if available See merge request gitlab-org/gitlab-ce!26692
| * | | | | Allow console messages be sent to gitlab-shell9217-warn-on-git-fetch-over-ssh-if-the-secondary-is-lagging-the-primaryAsh McKenzie2019-04-042-1/+10
| | |/ / / | |/| | | | | | | | | | | | | Currently a no-op for CE
* | | | | Merge branch 'drop-usage-of-leagcy-artifacts' into 'master'Kamil Trzciński2019-04-041-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | Drop legacy artifacts usage as there are no leftovers See merge request gitlab-org/gitlab-ce!24294
| * | | | Drop legacy artifacts usagedrop-usage-of-leagcy-artifactsShinya Maeda2019-04-041-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | Legacy artifacts have been correctly migrated to new place - ci_job_artifacts. Now it's time to remove the related code, but before that we should ensure it doesn't break anything by using feature flag.
* | | | Renamed terminal_specification to channel_specificationFrancisco Javier López2019-04-042-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | We're moving from using terminology related to terminals when we refer to Websockets connections in Workhorse. It's more appropiate a concept like channel.
* | | | Merge branch '57831-allow-graphql-scalar-fields-to-be-authorized' into 'master'Nick Thomas2019-04-041-10/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GraphQL Scalar-fields to be authorized Closes #57831 See merge request gitlab-org/gitlab-ce!26338
| * | | | Use parent object when authorizing scalar typesBrett Walker2019-04-041-10/+21
| | | | |
* | | | | Allow to sort wiki pages by date and titleIgor2019-04-042-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | - Add controls for sorting by title and date - Execute Gitaly call which now accepts sorting params for wikis
* | | | | Merge branch '58405-basic-limiting-complexity-of-graphql-queries' into 'master'Rémy Coutable2019-04-041-0/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basic limiting complexity of GraphQL queries Closes #58405 See merge request gitlab-org/gitlab-ce!26629
| * | | | | Initial field and query complexity limits58405-basic-limiting-complexity-of-graphql-queriesBrett Walker2019-04-041-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes all Types::BaseField default to a complexity of 1. Queries themselves now have limited complexity, scaled to the type of user: no user, authenticated user, or an admin user.
* | | | | | Automatically set Prometheus step intervalPeter Leitzen2019-04-041-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By computing the step interval passed to the query_range Prometheus API call we improve the performance on the Prometheus server and GitLab by reducing the amount of data points sent back and prevent Prometheus from sending errors when requesting longer intervals.
* | | | | | Allow to use untrusted Regexp via feature flagKamil Trzciński2019-04-044-14/+47
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings support for untrusted regexp for 'only:refs:' when enabled via feature flag: alllow_unsafe_ruby_regexp. This is by default disabled, and should not be used in production
* | | | | Monitor GraphQL with PrometheusJan Provaznik2019-04-041-0/+43
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extends graphql's platform tracing class to observe duration of graphql methods. In graphql 1.8.11 is added prometheus class but it's not very useful for us because it uses prometheus_exporter to export results.
* | | | Merge branch 'rs-release-automation-danger' into 'master'Yorick Peterse2019-04-041-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exempt release automation MRs from Danger rules Closes gitlab-org/release/framework#269 See merge request gitlab-org/gitlab-ce!26993
| * | | | Exempt release automation MRs from Danger rulesRobert Speicher2019-04-041-0/+5
| | | | |
* | | | | Merge branch 'dz-reserve-v2-root-path' into 'master'Grzegorz Bizon2019-04-041-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add v2 to reserved top level routes See merge request gitlab-org/gitlab-ce!26540
| * | | | | Add v2 to reserved top level routesdz-reserve-v2-root-pathDmitriy Zaporozhets2019-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | | Merge branch '54417-graphql-type-authorization' into 'master'Nick Thomas2019-04-043-39/+100
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | GraphQL Type authorization Closes #54417 See merge request gitlab-org/gitlab-ce!25724
| * | | | | GraphQL Type authorizationLuke Duncalfe2019-04-033-39/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables authorizations to be defined on GraphQL Types. module Types class ProjectType < BaseObject authorize :read_project end end If a field has authorizations defined on it, and the return type of the field also has authorizations defined on it. then all of the combined permissions in the authorizations will be checked and must pass. Connection fields are checked by "digging" to find the type class of the "node" field in the expected location of edges->node. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54417