summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge branch..."revert-86900f00Kamil Trzciński2019-06-051-2/+2
| | | This reverts merge request !27503
* Merge branch 'ce-9578-adjust-opened-issues-count-and-completion-rate' into ↵Robert Speicher2019-06-042-80/+20
|\ | | | | | | | | | | | | 'master' Port: EE adjust burndown chart opened issues count See merge request gitlab-org/gitlab-ce!28777
| * Adjust burndown chart opened issues countce-9578-adjust-opened-issues-count-and-completion-rateAlexandru Croitor2019-06-042-80/+20
| | | | | | | | | | | | * Adjust opened issues count in the milestone burndown chart to match current opened issues in the milestone. * Fix completion rate calculation to include milestones only.
* | Merge branch 'bvl-design-diff-notes-ce' into 'master'Douwe Maan2019-06-041-0/+12
|\ \ | | | | | | | | | | | | Adjustments related to DiffNotes on diffs outside of a project's main repository See merge request gitlab-org/gitlab-ce!29023
| * | Make `resolvable_types` a class methodBob Van Landuyt2019-06-031-0/+12
| | | | | | | | | | | | | | | This turns Notable::RESOLVABLE_TYPES into a `Notable.resolvable_types`. That allows us to override it in EE.
* | | Merge branch ↵Grzegorz Bizon2019-06-042-76/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '58941-use-gitlab-serverless-with-existing-knative-installation' into 'master' Resolve "Use GitLab serverless with existing Knative installation" Closes #58941 See merge request gitlab-org/gitlab-ce!27173
| * | | Move file one folder level up to avoid namespace conflict58941-use-gitlab-serverless-with-existing-knative-installationJoão Cunha2019-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clusters::Cluster::KnativeServicesFinder becomes Clusters::KnativeServicesFinder This is to avoid loading race condition between: ``` module Clusters class Cluster < ApplicationRecord ``` and ``` module Clusters class Cluster ```
| * | | Adapt functions to work for external KnativeJoão Cunha2019-05-292-76/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Kn services cache from Clusters::Application::Knative Knative function can exist even if user did not installed Knative via GitLab managed apps. -> Move responsibility of finding services into the Cluster -> Responsability is inside Clusters::Cluster::KnativeServiceFinder -> Projects::Serverless::FunctionsFinder now calls depends solely on a cluster to find the Kn services. -> Detect Knative by resource presence instead of service presence -> Mock knative_installed response temporarily for frontend to develop Display loader while `installed === 'checking'` Added frontend work to determine if Knative is installed Memoize with_reactive_cache(*args, &block) to avoid race conditions When calling with_reactive_cache more than once, it's possible that the second call will already have the value populated. Therefore, in cases where we need the sequential calls to have consistent results, we'd fall under a race condition. Check knative installation via Knative resource presence Only load pods if Knative is discovered Always return a response in FunctionsController#index - Always indicate if Knative is installed, not installed or checking - Always indicate the partial response for functions. Final response is guaranteed when knative_installed is either true | false. Adds specs for Clusters::Cluster#knative_services_finder Fix method name when calling on specs Add an explicit check for functions Added an explicit check to see if there are any functions available Fix Serverless feature spec - we don't find knative installation via database anymore, rather via Knative resource Display error message for request timeouts Display an error message if the request times out Adds feature specs for when functions exist Remove a test purposed hardcoded flag Add ability to partially load functions Added the ability to partially load functions on the frontend Add frontend unit tests Added tests for the new frontend additions Generate new translations Generated new frontend translations Address review comments Cleaned up the frontend unit test. Added computed prop for `isInstalled`. Move string to constant Simplify nil to array conversion Put knative_installed states in a frozen hash for better read Pluralize list of Knative states Quey services and pods filtering name This way we don't need to filter the namespace in memory. Also, the data we get from the network is much smaller. Simplify cache_key and fix bug - Simplifies the cache_key by removing namespace duplicate - Fixes a bug with reactive_cache memoization
* | | | Merge branch 'introduce-auto-merge-process-worker' into 'master'Thong Kuah2019-06-041-0/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Introduce sidekiq worker for auto merge process See merge request gitlab-org/gitlab-ce!28780
| * | | | Introduce sidekiq worker for auto merge processintroduce-auto-merge-process-workerShinya Maeda2019-06-041-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | As we have a central domain for auto merge process today, we should use a single worker for any auto merge process.
* | | | | Merge branch ↵Kamil Trzciński2019-06-041-46/+99
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'set-real-next-run-at-for-preventing-duplciate-pipeline-creations' into 'master' Make pipeline schedule worker resilient Closes gitlab-com/gl-infra/production#805 and #61955 See merge request gitlab-org/gitlab-ce!28407
| * | | | Make pipeline schedule worker resilientset-real-next-run-at-for-preventing-duplciate-pipeline-creationsShinya Maeda2019-06-031-46/+99
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pipeline schedule worker is unstable because it's sometimes killed by excessive memory consumption. In order to improve the performance, we add the following fixes: 1. next_run_at is always real_next_run, which means the value always takes into account of worker's cron schedule 1. Remove exlusive lock. This is already covered by real_next_run change. 1. Use RunPipelineScheduleWorker for avoiding memory killer. Memory consumption is spread to the multiple sidekiq worker.
* | | | Merge branch 'osw-sync-merge-ref-upon-mergeability-check' into 'master'Douwe Maan2019-06-031-85/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically update MR merge-ref along merge status Closes #58495 See merge request gitlab-org/gitlab-ce!28513
| * | | | Automatically update MR merge-ref along merge statusOswaldo Ferreira2019-05-311-85/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This couples the code that transitions the `MergeRequest#merge_status` and refs/merge-requests/:iid/merge ref update. In general, instead of directly telling `MergeToRefService` to update the merge ref, we should rely on `MergeabilityCheckService` to keep both the merge status and merge ref synced. Now, if the merge_status is `can_be_merged` it means the merge-ref is also updated to the latest. We've also updated the logic to be more systematic and less user-based.
* | | | Cleans up UpdateProjectStatistics concernMayra Cabrera2019-06-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Renames attributes from stat to project_statistiscs_name and attribute to statistic_attribute - Reordes methods on UpdateProjectStatistics concern - Removes unused module from Ci::Build
* | | | Merge dev.gitlab.org master into GitLab.com masterYorick Peterse2019-06-039-27/+88
|\ \ \ \
| * \ \ \ Merge branch 'security-fix_milestones_search_api_leak' into 'master'GitLab Release Tools Bot2019-06-031-0/+17
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve: Milestones leaked via search API Closes #2822 See merge request gitlab/gitlabhq!2997
| | * | | | Resolve: Milestones leaked via search APIFelipe Artur2019-05-201-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix milestone titles being leaked using search API when users cannot read milestones
| * | | | | Merge branch 'security-60039' into 'master'GitLab Release Tools Bot2019-06-031-0/+36
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow invalid MR branch name See merge request gitlab/gitlabhq!3052
| | * | | | | Validate MR branch namesMark Chao2019-05-031-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents refspec as branch name, which would bypass branch protection when used in conjunction with rebase. HEAD seems to be a special case with lots of occurrence, so it is considered valid for now. Another special case is `refs/head/*`, which can be imported.
| * | | | | | Protect Gitlab::HTTP against DNS rebinding attackDouwe Maan2019-05-307-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gitlab::HTTP now resolves the hostname only once, verifies the IP is not blocked, and then uses the same IP to perform the actual request, while passing the original hostname in the `Host` header and SSL SNI field.
* | | | | | | Merge branch 'ac-graphql-stats' into 'master'Dmitriy Zaporozhets2019-06-031-0/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Namespace and ProjectStatistics to GraphQL API See merge request gitlab-org/gitlab-ce!28277
| * | | | | | | Add Namespace and ProjectStatistics to GraphQL APIAlessio Caiazza2019-06-031-0/+14
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can query namespaces, and nested projects. Projects now exposes statistics
* | | | | | | Abstract auto merge processesShinya Maeda2019-06-031-2/+16
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have one auto merge strategy today - Merge When Pipeline Succeeds. In order to add more strategies for Merge Train feature, we abstract the architecture to be more extensible. Removed arguments Fix spec
* | | | | | Merge branch 'dz-scope-project-routes-3' into 'master'Lin Jen-Shin2019-05-312-1/+17
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Move some project routes under - scope See merge request gitlab-org/gitlab-ce!28830
| * | | | | Add specs for Milestone reference methodsDmitriy Zaporozhets2019-05-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | | | Fix specs after routing changeDmitriy Zaporozhets2019-05-291-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | Merge branch 'remove-legacy-artifacts-related-code' into 'master'Kamil Trzciński2019-05-311-143/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove legacy artifact related code Closes #58595 See merge request gitlab-org/gitlab-ce!26475
| * | | | | Remove legacy artifact related coderemove-legacy-artifacts-related-codeShinya Maeda2019-05-311-143/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've already migrated all the legacy artifacts to the new realm, which is ci_job_artifacts table. It's time to remove the old code base that is no longer used.
* | | | | | Change query to work on mysql as well. Also set entire date because setting ↵Luke Picciau2019-05-311-16/+17
|/ / / / / | | | | | | | | | | | | | | | only the year can trip 'start_date_should_be_less_than_due_date'
* | | | | Merge branch '9121-sort-relative-position' into 'master'docs/create-table-driven-standardsSean McGivern2019-05-301-0/+15
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support sorting issues using `relative_position` Closes #62178 See merge request gitlab-org/gitlab-ce!28566
| * | | | | Allow issues to be sorted by relative_positionBrett Walker2019-05-281-0/+15
| | |/ / / | |/| | | | | | | | | | | | | | | | | | - adding a "Manual" option to the dropdown - show 100 issues list when manually sorting
* | | | | Add spec to verify statistics without repositoriesPeter Marko2019-05-291-0/+38
| | | | |
* | | | | Add wiki size to project statisticsPeter Marko2019-05-292-4/+32
| |/ / / |/| | |
* | | | Merge branch 'mc/feature/reports-download' into 'master'Grzegorz Bizon2019-05-292-0/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow downloading report artifacts Closes #49265 See merge request gitlab-org/gitlab-ce!27974
| * | | | Extract Ci::Build#report_artifacts into methodmc/feature/reports-downloadMatija Čupić2019-05-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Extracts combining the job_artifacts relation with the with_reports scope for getting report artifacts into a method.
| * | | | Rename with_all_reports to with_reportsMatija Čupić2019-05-281-2/+2
| | | | |
| * | | | Add all reports scope to Ci::JobArtifactMatija Čupić2019-05-281-0/+15
| |/ / /
* | | | Add notify_only_default_branch option to PipelinesEmailServicePeter Marko2019-05-281-17/+59
|/ / /
* | | Add changelog entryJacques Erasmus2019-05-271-24/+139
| | | | | | | | | | | | Added a changelog entry for the feature
* | | Remove un-used methodsThong Kuah2019-05-241-28/+0
| | | | | | | | | | | | | | | These two methods were used in emitting AUTO_DEVOPS_DOMAIN which has now been dropped.
* | | Stop emitting AUTO_DEVOPS_DOMAIN Ci variableThong Kuah2019-05-244-167/+6
| | | | | | | | | | | | Update documentation to reflect removal
* | | Merge branch 'sh-bump-shoulda-matcher' into 'master'Jan Provaznik2019-05-224-3/+7
|\ \ \ | | | | | | | | | | | | | | | | Bump shoulda-matchers to 4.0.1 See merge request gitlab-org/gitlab-ce!28443
| * | | Fix remaining failures in shoulda-matcherStan Hu2019-05-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with Rails 5, belongs_to now adds a presence validation to the association, and so as of shoulda-matchers 4.0.0 the belong_to matcher follows suit and tests that this validation is there by setting the association to nil and asserting that there are validation errors. This exposed an error with the `validate_branches` method: we need to check the source and target project exist.
| * | | Ensure subject passes validationsStan Hu2019-05-212-0/+4
| | | | | | | | | | | | | | | | | | | | Rails 5 requires that belongs_to associations have the associated record present. These tests were failing because they had nil values.
* | | | Remove legacy Kubernetes #actual_namespace61935-remove-code-left-over-from-when-clusters-were-always-project-specificTiger2019-05-214-25/+28
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Kubernetes clusters were originally built they could only exist at the project level, and so there was logic included that assumed there would only ever be a single Kubernetes namespace per cluster. We now support clusters at the group and instance level, which allows multiple namespaces. This change consolidates various project-specific fallbacks to generate namespaces, and hands all responsibility to the Clusters::KubernetesNamespace model. There is now no concept of a single namespace for a Clusters::Platforms::Kubernetes; to retrieve a namespace a project must now be supplied in all cases. This simplifies upcoming work to use a separate Kubernetes namespace per project environment (instead of a namespace per project).
* | | Use Environment#deployment_platform method insteadenvironment_terminal_methodsThong Kuah2019-05-201-3/+1
| | | | | | | | | | | | | | | | | | As this method does have `deployment_platform(environment: self.name)`, which is what the form EE needs. Allows us to remove two overrides in EE.
* | | Stop configuring group clusters on creation60379-remove-ci-preparing-state-feature-flagTiger2019-05-161-14/+6
| |/ |/| | | | | | | | | | | | | | | | | | | Immediate configuration is not ideal for group and instance level clusters as projects that may never be deployed would still have Kubernetes namespaces and service accounts created for them. As of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25586 we now create only the resources that are required for the project being deployed, at the time of deployment.
* | Merge branch 'jc-omit-count-diverging-commits-max' into 'master'Lin Jen-Shin2019-05-161-2/+35
|\ \ | | | | | | | | | | | | Omit max-count for diverging_commit_counts behind feature flag See merge request gitlab-org/gitlab-ce!28157
| * | Omit max-count for diverging_commit_counts behind feature flagjc-omit-count-diverging-commits-maxJohn Cai2019-05-141-2/+35
| | | | | | | | | | | | | | | | | | | | | We want to optimize the query for the CountDivergingCommits rpc by removing the --max-count argument now that we have commit graphs enabled for all repositories during housekeeping. However, we want to test this first behind a feature flag.