summaryrefslogtreecommitdiff
path: root/spec/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Migrate correlation and tracing code to LabKitan-use-labkitAndrew Newdigate2019-04-181-1/+1
| | | | | | | | | | | | | | | 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.
* Add ability to do variable substitutionReuben Pereira2019-04-151-0/+33
| | | | | | - In prometheus proxy api, allow variables to be replaced. For example, if 'up{env="%{ci_environment_slug}"}' is passed to the endpoint, it becomes 'up{env="production"}' before being sent to prometheus.
* Merge branch 'sh-validate-ref-name-in-commit' into 'master'Rémy Coutable2019-04-151-0/+20
|\ | | | | | | | | | | | | Validate refs used in controllers don't have spaces Closes #58572 and gitaly#1425 See merge request gitlab-org/gitlab-ce!24037
| * Validate refs used in controllers don't have spacessh-validate-ref-name-in-commitStan Hu2019-04-141-0/+20
| | | | | | | | | | | | | | This avoids an unnecessary call to Gitaly and reduces gRPC errors. * Closes https://gitlab.com/gitlab-org/gitaly/issues/1425 * Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58572
* | Add some frozen string to spec/**/*.rbgfyoung2019-04-15149-4/+300
|/ | | | | | | | | | Adds frozen string to the following: * spec/bin/**/*.rb * spec/config/**/*.rb * spec/controllers/**/*.rb xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Align UrlValidator to validate_url gem implementation.Thong Kuah2019-04-111-1/+1
| | | | | | | Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement. Make use of the options attribute of the parent class ActiveModel::EachValidator. Add more options: allow_nil, allow_blank, message. Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-0922-21/+541
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Merge branch 'osw-multi-assignees-merge-requests' into 'master'Nick Thomas2019-04-091-3/+3
|\ | | | | | | | | [Backport] Support multiple assignees for merge requests See merge request gitlab-org/gitlab-ce!27089
| * [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-3/+3
| | | | | | | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* | Resolve Environments#additional_metrics TypeError, ensure unix formatSarah Yasonik2019-04-091-0/+11
| |
* | Set release name when adding release notes to an existing tagJason Goodman2019-04-091-8/+53
|/ | | | Also set the release sha and author
* Enable Gitaly FindCommit caching for TreeControllersh-add-gitaly-ref-name-caching-tree-controllerStan Hu2019-04-071-0/+2
| | | | | | Accessing /namespace/project/tree/master appears to query FindCommit 5 times with identical parameters. This reduces the number of FindCommit queries to 1.
* Expand FindCommit caching to blob and refssh-improve-find-commit-cachingStan Hu2019-04-062-0/+6
| | | | | | | | | | | This enables FindCommit caching to the following actions: * BlobController#show * RefsController#logs_tree It also improves caching in CommitsController since some duplicate requests were occuring inside the before_action definitions.
* Add Knative metrics to PrometheusChris Baumbauer2019-04-061-0/+9
|
* Add part of needed codeGosia Ksionek2019-04-053-0/+20
| | | | | | | | | | | | | | | | | 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 'revert-3962b00b' into 'master'Andreas Brandl2019-04-0522-541/+21
|\ | | | | | | | | 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-0522-541/+21
| | | | | | This reverts merge request !26823
* | Enable FindCommit caching for project and commits pagesStan Hu2019-04-052-0/+6
|/ | | | | This reduces a handful of duplicate FindCommit calls while viewing the projects and commits pages.
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-0522-21/+541
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Merge branch '58375-api-controller' into 'master'Sean McGivern2019-04-051-0/+152
|\ | | | | | | | | | | | | Add a prometheus proxy API per environment Closes #58375 See merge request gitlab-org/gitlab-ce!26841
| * Use environment_params when defining expected_params58375-api-controllerrpereira22019-04-051-10/+8
| |
| * Do not hardcode project and namespace name in urlrpereira22019-04-051-3/+3
| | | | | | | | The names can change in different runs of the spec.
| * Call permit! on paramsrpereira22019-04-051-1/+14
| |
| * Remove permitting of paramsrpereira22019-04-051-9/+0
| | | | | | | | - It is now being done in ProxyService class.
| * Add spec for invalid environment idrpereira22019-04-051-0/+10
| |
| * Make filter params specs more readablePeter Leitzen2019-04-051-5/+7
| |
| * Streamline controller specsPeter Leitzen2019-04-051-83/+74
| |
| * Add a Prometheus API per environmentrpereira22019-04-051-0/+147
| | | | | | | | | | | | The api will proxy requests to the environment's prometheus server. The Prometheus::ProxyService class can be reused when we add support for group prometheus servers.
* | Autocorrect with RSpec/ExampleWording copThong Kuah2019-04-0512-32/+32
| | | | | | | | | | | | | | - rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
* | Fix and expand Gitaly FindCommit cachingsh-fix-ref-name-cachingStan Hu2019-04-042-0/+4
|/ | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26248 added support for deduplicating FindCommit requests using Gitaly ref name caching. However, not all endpoints were covered, and in one case the Gitaly wrapper wasn't actually surrounding the serialization step. We can safely cache ref names between FindCommit calls for #index and #show endpoints for merge requests and pipelines. This can significantly reduce the number of FindCommit requests.
* Renamed terminal_specification to channel_specificationFrancisco Javier López2019-04-042-2/+2
| | | | | | 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 'xanf/gitlab-ce-transfer-disables-js' into 'master'Sean McGivern2019-04-041-1/+1
|\ | | | | | | | | | | | | Resolve "Failing group transfer disables expandable sections" Closes #45511 See merge request gitlab-org/gitlab-ce!26837
| * Redirect to edit page on group transfer failurexanf/gitlab-ce-transfer-disables-jsIllya Klymov2019-04-031-1/+1
| |
* | Consider array params on rendering MR list on dashboardIgor2019-04-042-2/+35
| | | | | | | | | | This fixes the bug, when approver filter is provided, but dashboard asks to enter any filter
* | Fixed test specsOswaldo Ferreira2019-04-041-0/+10
| | | | | | | | | | - added suggestions to mock data - fixed props to be not required
* | Specify time window for additional metrics apisupport-time-windows-apisyasonik2019-04-031-2/+32
|/ | | | | | | | | Adds support for start and end parameters in the #additional_metrics endpoint of the EnvironmentsController. start and end are meant to be unix timestamps, per the Prometheus API (as the consumer of this endpoint will eventually be transitioned to a prometheus endpoint). This functionality is behind the :metrics_time_window feature flag for development.
* Merge branch 'sh-cache-pipeline-find-commits' into 'master'Kamil Trzciński2019-04-021-0/+2
|\ | | | | | | | | Cache FindCommit results in pipelines view See merge request gitlab-org/gitlab-ce!26776
| * Cache FindCommit results in pipelines viewsh-cache-pipeline-find-commitsStan Hu2019-04-021-0/+2
| | | | | | | | | | | | | | | | For each pipeline, the controller will call `Pipeline#latest?` to determine if the pipeline's ref is the latest for that branch. Since it's likely that the same branches are being used in each pipeline, we can reduce Gitaly overhead by caching the results of the FindCommit call.
* | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ↵jarv/dev-to-gitlab-2019-04-02John Jarvis2019-04-022-0/+18
|\ \ | |/ |/| | | jarv/dev-to-gitlab-2019-04-02
| * Merge branch 'security-id-potential-denial-languages' into 'master'GitLab Release Tools Bot2019-04-021-0/+1
| |\ | | | | | | | | | | | | Return cached languages if they've been detected before See merge request gitlab/gitlabhq!2998
| | * Return cached languages if they've been detected beforeIgor Drozdov2019-03-201-0/+1
| | |
| * | Merge branch 'security-mass-assignment-on-project-update' into 'master'GitLab Release Tools Bot2019-04-021-0/+17
| |\ \ | | | | | | | | | | | | | | | | Disallow changing namespace of a project in update method See merge request gitlab/gitlabhq!3028
| | * | Refactor specs according to the code reviewMałgorzata Ksionek2019-03-261-1/+1
| | | |
| | * | Add cr remarksMałgorzata Ksionek2019-03-251-1/+1
| | | |
| | * | Disallow changing namespace of a project in update methodMałgorzata Ksionek2019-03-201-0/+17
| | |/
* | | Allow ref name caching CommitService#find_commitStan Hu2019-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a given merge request, it's quite common to see duplicate FindCommit Gitaly requests because the Gitaly CommitService caches the request by the commit SHA, not by the ref name. However, most of the duplicate requests use the ref name, so the cache is never actually used in practice. This leads to unnecessary requests that slow performance. This commit allows certain callers to bypass the ref name to OID conversion in the cache. We don't do this by default because it's possible the tip of the branch changes during the commit, which would cause the caller to get stale data. This commit also forces the Ci::Pipeline to use the full ref name so that caching can work for merge requests. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/57083
* | | Add API access check to GraphqlFelipe Artur2019-03-271-0/+45
|/ / | | | | | | Check if user can access API on GraphqlController
* | Merge remote-tracking branch 'dev/master'Alex Hanselka2019-03-201-0/+31
|\ \ | | | | | | | | | | | | | | | | | | * dev/master: Update CHANGELOG.md for 11.8.3 Update CHANGELOG.md for 11.7.7 Only return `commands_changes` used in frontend
| * \ Merge branch 'security-2826-fix-project-serialization-in-quick-actions' into ↵Alex Hanselka2019-03-201-0/+31
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | 'master' Fix project serialization in quick actions response Closes #2826 See merge request gitlab/gitlabhq!3001
| | * Only return `commands_changes` used in frontendHeinrich Lee Yu2019-03-181-0/+31
| | | | | | | | | | | | | | | When executing quick actions, this limits the `commands_changes` response to only those used by the frontend