Commit Graph

8326 Commits

Author SHA1 Message Date
Sean McGivern 19c5468a27 Merge branch '52300-pool-repositories' into 'master'
Start tracking pool repositories

Closes #38238 and #52300

See merge request gitlab-org/gitlab-ce!22482
2018-11-05 13:25:39 +00:00
Kamil Trzciński e083e28eac Merge branch '53450-wrong-value-for-kubernetes_version-variable' into 'master'
Bump KUBERNETES_VERSION to latest 1.10 series

Closes #53450

See merge request gitlab-org/gitlab-ce!22757
2018-11-05 09:49:04 +00:00
Grzegorz Bizon 9e2eb85e36 Merge branch 'frozen-string-enable-lib-gitlab-ci-remain' into 'master'
Enable frozen string for lib/gitlab/ci/**/*.rb

See merge request gitlab-org/gitlab-ce!22703
2018-11-05 08:46:15 +00:00
Nick Thomas 270155d655
Start tracking pool repositories 2018-11-05 01:40:29 +00:00
Philippe Lafoucrière ccb1ff9aca Update license_management job 2018-11-04 22:48:05 +00:00
Stan Hu 5c8ce94052 Fix statement timeouts in RemoveRestrictedTodos migration
On GitLab.com, the RemoveRestrictedTodos background migration
encountered about 700+ failures a day due to statement timeouts.

PostgreSQL might perform badly with a LIMIT 1 because the planner is
guessing that scanning the index in ID order will come across the
desired row in less time it will take the planner than using another
index. The order_hint does not affect the search results. For example,
`ORDER BY id ASC, updated_at ASC` means the same thing as `ORDER BY id
ASC`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52649
2018-11-04 06:01:17 -08:00
Chris Baumbauer c10452d285 Resolve issues raised by Kamil 2018-11-03 10:48:48 -07:00
Chris Baumbauer aa44393e8f Merge branch 'master' into triggermesh-phase1-knative 2018-11-03 10:13:35 -07:00
Thong Kuah 9f206e17f1 Bump KUBERNETES_VERSION to latest 1.10 series
This allows us to use a kubectl binary that should be able to
connect to Kubernetes clusters v1.9 and up.
2018-11-04 00:09:43 +13:00
Amit Rathi 8837519445 Pushing WIP state for backup 2018-11-03 09:08:21 +05:30
Dylan Griffith d86f76320c Use our own docker image for helm install pods
This will reduce dependencies and failure points during installation. It
will also reduce security risks from untrusted dependencies being able
to effect all our users
2018-11-02 17:46:33 +00:00
Thong Kuah 5ede567d71 Incorporates Kubernetes Namespace into Cluster's flow 2018-11-02 15:46:15 +00:00
Chris Baumbauer dc078c2417 Merge branch 'master' into triggermesh-phase1-knative 2018-11-02 08:39:25 -07:00
James Lopez 0846e8a6f5 Remove extra whitespace on markup_helper.rb 2018-11-02 15:10:41 +00:00
Matija Čupić a8da523847
Refactor Gitlab::Ci::Config::Normalizer 2018-11-02 15:48:25 +01:00
James Lopez ccb706d346 Refactor MarkupHelper to add INDEX plain filename 2018-11-02 14:32:05 +00:00
Matija Čupić 8a6a312db8
Make Rubocop and Danger happy 2018-11-02 14:20:27 +01:00
Achilleas Pipinellis be0af5e69f
Test type of README file without extension 2018-11-02 12:26:04 +01:00
Jakub Jirutka cb3f851098
Render index.* like README.* when it's present in a directory
Resolves #18933
2018-11-02 12:20:50 +01:00
Sean McGivern c0d30fad97 Merge branch 'sh-optimize-reload-diffs-service' into 'master'
Significantly cut memory and SQL queries when reloading diffs

See merge request gitlab-org/gitlab-ce!22725
2018-11-02 10:09:50 +00:00
Dmitriy Zaporozhets a0ca86e5a3 Merge branch 'kinolaev-master-patch-91872' into 'master'
Change HELM_HOST in Auto-DevOps to work behind proxy

See merge request gitlab-org/gitlab-ce!22596
2018-11-02 07:42:37 +00:00
Robert Speicher 392e3bfad3 Merge branch 'sh-bump-puma-memory-limits' into 'master'
Reserve more RAM for master process in Puma

See merge request gitlab-org/gitlab-ce!22741
2018-11-01 21:45:40 +00:00
Sergej 2d75626aad Change HELM_HOST in Auto-DevOps to work behind proxy 2018-11-01 22:29:35 +03:00
Matija Čupić 73e17446ef
Move parallelized node index to job options 2018-11-01 16:18:27 +01:00
Chris Baumbauer 28a9bbceb7 Remove comments from migration script and add usage data 2018-11-01 08:14:49 -07:00
Stan Hu de1db4972c Avoidp loading merge request diff files when not needed 2018-11-01 07:50:39 -07:00
Achilleas Pipinellis 7f47e13218 Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'
Fix typos in comments and specs

See merge request gitlab-org/gitlab-ce!22683
2018-11-01 10:34:23 +00:00
Sean McGivern 1c50200b9a Merge branch 'sh-optimize-merge-request-project-lookup' into 'master'
Reduce SQL queries needed to load open merge requests

See merge request gitlab-org/gitlab-ce!22709
2018-11-01 10:33:27 +00:00
Stan Hu d19ba4439b Reserve more RAM for master process in Puma
The Puma Worker Killer checks the total RAM used by both the master
and worker processes. Bump the limits to N+1 instead of N workers
to account for this.
2018-11-01 00:29:16 -07:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Matija Čupić 56a08d233f
Parallelize jobs in Gitlab::Ci::YamlProcessor 2018-11-01 01:05:42 +01:00
Douglas Barbosa Alexandre 01d8c1f6f0
Whitelist none method from ActiveRecord::Querying 2018-10-31 15:46:36 -03:00
Matija Čupić 3c8dd4ccbf
Move parallelization to Ci::Config::Normalizer 2018-10-31 19:11:45 +01:00
Matija Čupić 8f8a89f98e
Implement POC config based parallelization 2018-10-31 15:27:51 +01:00
Stan Hu d4ef4ad752 Reduce SQL queries needed to load open merge requests
The SQL queries and memory allocation in MergeRequests::RefreshService
is dominated by queries for Project and Route loads. On staging, the
absence of an inverse relationship caused Rails to make over 1100
extraneous SQL queries for the www-gitlab-com repository.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/49703
2018-10-30 22:29:57 -07:00
Douwe Maan 571e651b21 Merge branch 'add-language-param-to-highlight' into 'master'
Add language param to highlight

See merge request gitlab-org/gitlab-ce!21584
2018-10-30 20:44:03 +00:00
Douwe Maan 7bcd0dc19b Merge branch 'bvl-move-wrapped-gitaly-errors' into 'master'
Move Repository#wrapped_gitaly_errors into concern

See merge request gitlab-org/gitlab-ce!22691
2018-10-30 20:43:27 +00:00
gfyoung 5186d6faa1 Enable frozen string for lib/gitlab/ci/**/*.rb
Enables frozen string for all remaining files
in lib/gitlab/ci.

Partially addresses #47424.
2018-10-30 13:39:30 -07:00
Stan Hu bbe25533a7 Merge branch 'frozen-string-enable-lib-gitlab-ci' into 'master'
Enable some frozen string for lib/gitlab/ci

See merge request gitlab-org/gitlab-ce!22636
2018-10-30 18:11:10 +00:00
Bob Van Landuyt 81f5955eb6 Move Repository#wrapped_gitaly_errors into concern
Having this in a concern allows us to reuse it for different single
purpose classes that call out to git without going through the
repository every time.
2018-10-30 15:53:46 +01:00
Matija Čupić 94923328fd
Revert Seed based parallelization implementation
Revert "Add Build seed specs"

This reverts commit 03bc722ea1.

Revert "Add build specs"

This reverts commit c2d49565cf.

Revert "Refactor parallelization implementation"

This reverts commit 72430483de.

Revert "Implement POC for job parallelization"

This reverts commit 44b740f99d.
2018-10-30 15:06:00 +01:00
Mark Chao 0fa5260f1d Allow search results to accept project_id
This gives flexiblity to avoid duplicated query of Project.
2018-10-30 15:44:55 +08:00
Mark Chao a4ba973e24 Allow FoundBlob to access language from gitattributes
Extract language_from_git_attributes as a concern so it can
ben included in two blob classes.
2018-10-30 15:44:55 +08:00
Mark Chao bc14e4ed10 Move :plain option to Highlight class
This is to DRY the repeated file size check.

Move spec and constants to Highlight
2018-10-30 15:44:55 +08:00
Mark Chao 39ae9a59a5 Make Highlight accept language param
This replaces the repository param.
This allows more flexiblity as sometimes we have highlight content
not related to repository. Sometimes we know ahead of time the language
of the content. Lastly language determination seems better fit as a
logic in the Blob class.
`repository` param is only used to determine the language, which seems
to be the responsiblity of Blob.
2018-10-30 15:44:55 +08:00
Mark Chao 32f9cf8ce3 Add BlobPresenter for highlighting
Force FoundBlob to use BlobPresenter
2018-10-30 15:44:55 +08:00
Mark Chao 6580de78bb Add access to Blob's language from gitattributes
Ported from Highlight class since it as a concept is more related to
blob, and this allows more flexibility.
2018-10-30 15:44:55 +08:00
DJ Mountney 06b6daacb1 Merge remote-tracking branch 'origin/master' into dev-master 2018-10-29 14:37:19 -07:00
Robert Speicher 6c5154b5bc Merge branch 'rails5-deprecated-uniq' into 'master'
Replace deprecated uniq on a Relation with distinct

See merge request gitlab-org/gitlab-ce!22625
2018-10-29 18:35:05 +00:00
Chris Baumbauer 0ddff09385 Revert Helm version bump 2018-10-29 10:56:46 -07:00
Robert Speicher c847f172d2 Merge branch 'fix_pat_auth-11-4' into 'security-11-4'
[11.4] Fix Token lookup for Git over HTTP and registry authentication

See merge request gitlab/gitlabhq!2577
2018-10-29 17:20:53 +01:00
Jan Provaznik 5b0b73d922 Merge branch 'security-redact-links' into 'master'
[master] Redact unsubscribe links in issuable texts

See merge request gitlab/gitlabhq!2528
2018-10-29 16:10:32 +00:00
Jan Provaznik 58646c65d5 Merge branch 'security-master-junit-test-report-exposes-stacktrace' into 'master'
[master] JUnit test reports endpoint exposes full stack trace in production mode

See merge request gitlab/gitlabhq!2559
2018-10-29 16:07:14 +00:00
Imre Farkas b9652d8e4d [master] Persist only SHA digest of PersonalAccessToken#token 2018-10-29 16:06:45 +00:00
Kamil Trzciński 0acdd3d3dd
Rename 'sast_container' licensed feature 2018-10-29 10:32:59 -04:00
Andrew Newdigate 9a25cfc80b Fix open-ended params for api_json.log 2018-10-29 13:44:09 +00:00
Grzegorz Bizon 5a460397a1 Merge branch '52780-stale-pipeline-status-cache-for-_project-after-disabling-pipelines' into 'master'
Resolve "Stale pipeline status cache for `_project` after disabling pipelines"

Closes #52780

See merge request gitlab-org/gitlab-ce!22589
2018-10-29 10:02:11 +00:00
Shinya Maeda 4611a59968 Add failure reason for execution timeout 2018-10-28 18:31:08 +00:00
Matija Čupić 9ba72fe09a
Change minimum parallel value to 2 2018-10-27 19:06:46 +02:00
Matija Čupić 72430483de
Refactor parallelization implementation
* Move the variables to ::Ci::Build#predefined_variables
* Tweak pipeline build seed implementation
2018-10-27 03:41:14 +02:00
gfyoung 06892e88f5 Enable frozen string for lib/gitlab/ci
Enables frozen string for the following:

* lib/gitlab/ci/*.rb
* lib/gitlab/ci/build/**/*.rb
* lib/gitlab/ci/config/**/*.rb
* lib/gitlab/ci/pipeline/**/*.rb
* lib/gitlab/ci/reports/**/*.rb

Partially addresses #47424.
2018-10-26 16:36:42 -07:00
Matija Čupić 44b740f99d
Implement POC for job parallelization 2018-10-26 23:24:17 +02:00
Matija Čupić d9b56bc13b
Add parallel keyword to CI config 2018-10-26 22:02:18 +02:00
Douwe Maan e997b22df5 Merge branch '51335-fail-early-when-user-cannot-be-identified' into 'master'
User not defined in PostReceive#process_project_changes

Closes #51335

See merge request gitlab-org/gitlab-ce!22519
2018-10-26 18:06:25 +00:00
Douwe Maan f2e9148d18 Merge branch '42790-improve-feedback-for-internal-git-access-checks-timeouts' into 'master'
Adds trace of each access check when git push times out

Closes #42790

See merge request gitlab-org/gitlab-ce!22265
2018-10-26 18:03:40 +00:00
Jasper Maes db80db793f Replace deprecated uniq on a Relation with distinct 2018-10-26 18:19:28 +02:00
Matija Čupić 0079fa19ce
Remove cache_sha parameter 2018-10-26 14:53:04 +02:00
Lin Jen-Shin 84e441d808 Make it clear that we intent to use | over || 2018-10-26 18:43:33 +08:00
Tiago Botelho 41fe3fdfc3
Reverts commits_check message 2018-10-26 09:50:44 +01:00
Lin Jen-Shin d045df3da8 Allow CE do nothing if route doesn't exist 2018-10-26 14:27:05 +08:00
Lin Jen-Shin 52fa309e86 Extract EE only oauth routes and add tests 2018-10-26 14:27:05 +08:00
Lin Jen-Shin f1701c0fec Make it possible to add EE only route
And if it cannot find any routes, raise an error
2018-10-26 14:27:05 +08:00
Lin Jen-Shin 1581f75fb5 Put EE routes in EE files under EE directories 2018-10-26 14:27:05 +08:00
Robert Speicher 679c0048a8 Merge branch 'an-multithreading' into 'master'
Puma in GDK and rack server lifecycle event abstractions

Closes #52762

See merge request gitlab-org/gitlab-ce!22372
2018-10-25 22:29:00 +00:00
Matija Čupić dd2e91cc78
Cache pipeline status only for specific sha 2018-10-25 19:57:08 +02:00
Andrew Newdigate 1065f8ce7a Add experimental support for Puma
This allows us (and others) to test drive Puma without it affecting all
users. Puma can be enabled by setting the environment variable
"EXPERIMENTAL_PUMA" to a non empty value.
2018-10-25 17:50:15 +01:00
DJ Mountney fee6989fa0 Merge remote-tracking branch 'origin/master' into dev-master 2018-10-25 08:48:14 -07:00
Kamil Trzciński 9e6098a6db Merge branch 'refactor_gitlab_kube_client' into 'master'
Refactor Gitlab::KubeClient

Closes #52131

See merge request gitlab-org/gitlab-ce!22073
2018-10-25 12:02:11 +00:00
115100 2a8a4897ff
saml/auth_hash: Allow 2FA bypass for SAML 2.0 responses
Closes gitlab-org/gitlab-ce/#53102.
2018-10-25 12:08:07 +01:00
Grzegorz Bizon 5726e51aaa Merge branch 'jlenny-UpdateAndroidTemplate' into 'master'
Update Android.gitlab-ci.yml template to current Android SDK version

See merge request gitlab-org/gitlab-ce!22531
2018-10-25 10:46:49 +00:00
Tiago Botelho 679d9b21b7
Removes idenfitication by commit from Gitlab::Identifier
Before we would need to identify a user when pushing
through the GitLab UI. Since this is no longer the case
we can remove the identification by commit and instead,
use the identify_using_user
2018-10-25 11:36:26 +01:00
Tiago Botelho f8ee07d9ee
User not defined in PostReceive#process_project_changes
When Gitlab::GitPostReceive#changes_refs is empty
user would not get defined and nil would be passed
to PostReceive#after_project_changes_hooks which would
then throw an error.
2018-10-25 11:23:34 +01:00
Tiago Botelho e0225aea1b
Iterating through commit list times out
Validating each commit on ChangeAccess times out if
it already took too long to complete.

Improves the TimedLogger specs to not make use of a stubbed
class anymore
2018-10-25 10:52:03 +01:00
Tiago Botelho cb5f4d0cad
Refactors TimedLogger to be more OOP compliant
Adds a #full_message method so that external classes
do not have access to the state of the logger.

Adds a #append_message to always append to the array in-place
2018-10-25 10:10:46 +01:00
Tiago Botelho 084a8b6101
Adds tracing messages for slow git pushes
Whenever a git push takes more than 50 seconds the user
will receive a trace from each check performed along with
their timings
2018-10-25 10:10:45 +01:00
Chris Baumbauer b5155b90ee Knative support 2018-10-24 22:38:44 -07:00
Thiago Presa cc571e18d3 Merge branch 'sh-block-other-localhost' into 'master'
Block additional localhost addresses in UrlBlocker

See merge request gitlab/gitlabhq!2487
2018-10-25 01:05:44 +00:00
Chris Baumbauer 661fd213de Update helm version 1.7.2 -> 2.11.0 2018-10-24 15:13:33 -07:00
Jason Lenny f2fcaaf3e0 Update link to blog post since it didn't go out on 23rd 2018-10-24 09:08:48 +00:00
Jan Provaznik c1c1496405 Redact unsubscribe links in issuable texts
It's possible that user pastes accidentally also unsubscribe link
which is included in footer of notification emails. This unsubscribe
link contains personal token which attacker then use to act as the
original user (e.g. for sending comments under his/her identity).
2018-10-23 21:20:20 +02:00
Sean McGivern 11a57e4f29 Merge branch '53030-ee-compat-check-frozen-literal' into 'master'
Fix ee-compat-check by not modifying frozen strings

Closes #53030

See merge request gitlab-org/gitlab-ce!22527
2018-10-23 18:03:57 +00:00
Mario de la Ossa 7dc70e0d67
Fix ee-compat-check by not modifying frozen strings 2018-10-23 09:15:17 -06:00
Andreas Brandl a84469a345 Merge branch 'mysql-migration-trigger-permissions' into 'master'
Add dbname to MySQL migration GRANT command

See merge request gitlab-org/gitlab-ce!21719
2018-10-23 12:30:14 +00:00
Matija Čupić 6bf8032735
Remove full exception stack trace from error 2018-10-23 14:16:49 +02:00
Grzegorz Bizon 708875ae9e Merge branch 'support-license-management-and-performance' into 'master'
Support licenses and performance

See merge request gitlab-org/gitlab-ce!22175
2018-10-23 12:07:05 +00:00
Thong Kuah a5419138fd Store version within SUPPORTED_API_GROUPS hash
This removes the ability to pass in a different version. We can instead
create a new entry in the SUPPORTED_API_GROUPS hash for a different
version if need be.
2018-10-23 23:52:34 +13:00
Thong Kuah 170071e365 DRY up *_clients methods
Build using `define_method` directly from the constant, saves us writing
api_groups strings twice.
2018-10-23 23:38:44 +13:00
Thong Kuah 27979aac0a Split hashed_clients into one per api_group
Essentially make #build_kubeclient do less.

Should be much clearer now
2018-10-23 23:36:44 +13:00
Thong Kuah 983c4a50d0 Remove api_groups from KubeClient constructor
We should have access to #core_client, #rbac_client,
and #extensions_client without having to pass in an awkward array.

Also change api_version to default_api_version, which allows us to use a
different version for an individual client. Special case for
apis/extensions which only go up to v1beta1

Makes #hashed_client private

Removes the #clients and #discover! methods which are un-used
2018-10-23 23:36:43 +13:00
Kamil Trzciński f8f447b83e Merge branch 'add-role-binding-to-kubeclient' into 'master'
Add RoleBinding method and class

See merge request gitlab-org/gitlab-ce!22524
2018-10-23 10:36:28 +00:00
Jason Lenny ae13305e73 Update Android.gitlab-ci.yml with result of new blog post: https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/15746 2018-10-23 08:49:46 +00:00
Zeger-Jan van de Weg 08cdf65b9e
Remove broken git storage for testing
Broken storage used to be used to test situations where the Git storage
wasn't being reached. These days we can just mock the Gitaly response.

But given the broken storage is removed now, Gitaly can take over
control of the storage being reachable. If it's not, Gitaly won't boot.
That's nice for situations where a disk wasn't mounted for instance.

Gitaly MR: https://gitlab.com/gitlab-org/gitaly/merge_requests/675
2018-10-23 10:36:47 +02:00
Grzegorz Bizon 075bbd4cb6 Merge branch 'sh-pages-eof-error' into 'master'
Fix EOF detection with CI artifacts metadata

Closes #36954

See merge request gitlab-org/gitlab-ce!22479
2018-10-23 06:40:57 +00:00
Mayra Cabrera 1e4d615000 Add RoleBinding methods
Includes RoleBinding methods to Kubeclient and introduce a new lib class
to generate RoleBinding resources.

This MR is part of
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22011
2018-10-22 17:16:14 -05:00
Douwe Maan b887d106cc Merge branch 'feature/gb/improve-include-config-errors-reporting' into 'master'
Improve validation errors for external CI/CD configuration

Closes #51369

See merge request gitlab-org/gitlab-ce!22394
2018-10-22 20:11:08 +00:00
Andreas Brandl ec748a8f19 Merge branch '51716-add-kubernetes-namespace-model' into 'master'
Add Clusters::KubernetesNamespace model

See merge request gitlab-org/gitlab-ce!22404
2018-10-22 19:42:58 +00:00
Mayra Cabrera e3ca493876 Add Clusters::KubernetesNamespace model
This model will be used to persist into database Kubernetes properties,
such as namespace, service account name and service account token.
2018-10-22 09:54:00 -05:00
Grzegorz Bizon e26a30e5ce Improve error message when `include` is blocked 2018-10-22 11:57:55 +02:00
Grzegorz Bizon fdcdc36eec Merge branch 'drop-allow_overflow-option-duration_in_numbers' into 'master'
Drop allow overflow option duration in numbers

Closes #52284

See merge request gitlab-org/gitlab-ce!22246
2018-10-22 08:59:16 +00:00
Kamil Trzciński bc333f38d8 Support licenses and performance
This introduces a new syntax for all licenses and performance jobs:

```yaml
job:
  reports:
    performance: performance.json
    license_management: gl-license-management-report.json
```
2018-10-22 10:20:12 +02:00
Grzegorz Bizon 44a9231d19 Merge branch 'use-raw-file-format' into 'master'
Add RAW file format which is used to store security reports

Closes gitlab-ee#7996

See merge request gitlab-org/gitlab-ce!22365
2018-10-22 08:09:40 +00:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Robert Speicher ec0199b8fa Merge branch 'ce-5987-group-file-templates' into 'master'
CE backport of changes to suppport group file templates

See merge request gitlab-org/gitlab-ce!22310
2018-10-19 17:42:18 +00:00
Shinya Maeda 1f1b3923ec Rename "scheduled" label/badge of delayed jobs to "delayed" 2018-10-19 16:28:41 +00:00
Grzegorz Bizon 380f63bf8d Improve remote CI/CD config file extension validation 2018-10-19 16:38:09 +02:00
Grzegorz Bizon 7977a20bb4 Extend error message in case of HTTP errors in `include` 2018-10-19 16:16:30 +02:00
Stan Hu 4c4d1b7928 Fix EOF detection with CI artifacts metadata
There are some corner cases where a perfectly correct GZIP stream may
not hit the EOF until another read is attempted. We now skip the entry
if we don't see any valid data, which allows the EOF check to work
properly.

Closes https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22479
2018-10-18 23:15:24 -07:00
Heinrich Lee Yu 880792a04e Catch `RedirectionTooDeep` Exception in webhooks 2018-10-19 05:55:06 +00:00
Nick Thomas 34480bb850
Backport CE to changes to support group-level file templates
When the feature is available, this setting allows admins to choose a
project as a source of custom file templates. This is in addition to
any instance-wide templates, whether custom or vendored into the GitLab
codebase.
2018-10-19 01:39:59 +01:00
Stan Hu 143d0e2666 Add support for JSON logging for audit events
This will add audit_json.log that writes one line per audit event. For
example:

{
       "severity":"INFO",
       "time":"2018-10-17T17:38:22.523Z",
       "author_id":3,
       "entity_id":2,
       "entity_type":"Project",
       "change":"visibility",
       "from":"Private",
       "to":"Public",
       "author_name":"John Doe4",
       "target_id":2,
       "target_type":"Project",
       "target_details":"namespace2/project2"
}
2018-10-18 15:59:12 -07:00
Grzegorz Bizon 39dac14e9c Refactor `include` code and improve error reporting 2018-10-18 14:13:26 +02:00
Grzegorz Bizon e0830a748a Extract method that fetchesremote CI/CD included config 2018-10-18 11:17:42 +02:00
Grzegorz Bizon 2243f0e3de Add IncludeError exception and use it in CI config 2018-10-18 11:07:32 +02:00
William George 1b153d497b Make getting a user by the username case insensitive 2018-10-18 09:06:44 +00:00
Shinya Maeda 23526470dd Drop `allow_overflow` option in `TimeHelper.duration_in_numbers` 2018-10-18 15:11:12 +09:00
Alejandro Rodríguez c8ffd8b035 [ci skip] Fix documentation of Gitlab::Git::Diff#filter_diff_options flags 2018-10-17 17:39:16 -03:00
Rémy Coutable 1696a3e8c3 Merge branch '44361-remove-gitlab-grit' into 'master'
Remove gitlab-grit as a transitive dependency of GitLab

Closes #44361

See merge request gitlab-org/gitlab-ce!22373
2018-10-17 13:17:20 +00:00
Douwe Maan 4f475b8125 Merge branch '52650-webhook-image-urls-rewritten-incorrectly-in-issues' into 'master'
Resolve "Webhook Image URLs Rewritten Incorrectly in Issues"

Closes #52650

See merge request gitlab-org/gitlab-ce!22361
2018-10-16 19:11:31 +00:00
Grzegorz Bizon 5f502c3a82 Move external CI config class into proper namespace 2018-10-16 15:11:50 +02:00
Grzegorz Bizon 7acc6340c1 Move external CI config files into Ci class context 2018-10-16 15:04:32 +02:00
Nick Thomas c5bff77ea4
Remove a dependency on gitlab-gollum-lib
Inlining this code allows us to remove a dependency on gitlab_grit in
gitlab-ce. We can't stop maintaining gitlab_grit yet, since gitaly-ruby
still depends on this gem, but it moves us a step closer.
2018-10-16 12:53:30 +01:00
Nick Thomas c7be9f5cac
Remove a dependency on gitlab-gollum-lib
Removing this dependency also allows us to remove a transitive
dependency on gitlab_grit - which is the whole point of this exercise.

I don't think we can EOL gitlab_grit until it's removed as a dependency
from gitaly-ruby, but this at least gets it out of gitlab-ce.
2018-10-16 12:53:30 +01:00
Kamil Trzciński 15cd91c71a Make all legacy security reports to use raw format
- This introduces and uses `:raw` format for all legacy reports,
  the ones that do not have yet proper parsers on Backend
- Raw format is needed to make Frontend be able to parse reports,
  without the need of decompressing,
- This also extends fixtures to seed security reports with database,
  even though parser code is part of EE
2018-10-16 13:51:49 +02:00
Sean McGivern 0bcfd0adb3 Fix image webhook rewriting for uploads
This rewrote URLs to be absolute URLs. However, for uploads (the most
common case), we actually need them to point to not just the GitLab
instance, but the project they're from. Thankfully, we can normally get
that information from the object we're building the hook for.
2018-10-16 10:54:49 +01:00
Douwe Maan 0602fcb6bf Merge branch 'sh-remove-koding' into 'master'
Remove Koding integration and documentation

Closes #39697

See merge request gitlab-org/gitlab-ce!22334
2018-10-15 16:28:09 +00:00
Douwe Maan 3c15a20ba3 Merge branch 'bvl-merge-base-multiple-revisions' into 'master'
Allow getting the merge base of multiple revisions

Closes #52573

See merge request gitlab-org/gitlab-ce!22295
2018-10-15 16:18:21 +00:00
Robert Speicher f5d088eb11 Merge branch 'zj-remove-linguist' into 'master'
Remove dependencies on Linguist

Closes #35450

See merge request gitlab-org/gitlab-ce!21008
2018-10-15 15:27:15 +00:00
Rémy Coutable edb46ca644 Merge branch 'enable-frozen-string-lib-gitlab' into 'master'
Enable some frozen string in lib/gitlab

See merge request gitlab-org/gitlab-ce!22304
2018-10-15 08:22:16 +00:00
Kamil Trzciński 0a89c0b864 Merge branch 'patch-29' into 'master'
Update Android.gitlab-ci.yml for current stable SDK

See merge request gitlab-org/gitlab-ce!22336
2018-10-15 07:00:06 +00:00
gfyoung e166e5747c Enable some frozen string in lib/gitlab
Enable frozen string for the following files:

* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb

Partially addresses #47424.
2018-10-13 02:31:31 -07:00
Osama Bin Omar 6d7429e084 Update Android.gitlab-ci.yml for current stable SDK 2018-10-13 08:54:30 +00:00
Stan Hu 656831e173 Remove Koding integration and documentation
This integration no longer works and does not appear to be supported.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39697
2018-10-12 22:18:51 -07:00
Zeger-Jan van de Weg 399056ed78 Remove dependencies on Linguist
This saves about 128 MB of baseline RAM usage per Unicorn and
Sidekiq process (!).

Linguist wasn't detecting languages anymore from CE/EE since
9ae8b57467. However, Linguist::BlobHelper
was still being depended on by BlobLike and others.

This removes the Linguist gem, given it isn't required anymore.
EscapeUtils were pulled in as dependency, but given Banzai depends on
it, it is now added explicitly.

Previously, Linguist was used to detect the best ACE mode. Instead,
we rely on ACE to guess the best mode based on the file extension.
2018-10-12 17:17:30 -07:00
Bob Van Landuyt 71d71afb3a Allow getting the merge base of multiple revisions
As we now support getting the merge base for multiple revisions in
gitaly, we can provide this functionality in our API
2018-10-12 11:41:22 +02:00
Adam Lemanski 8f1a0ec340 fix duplicated key in license management job gitlab-org/gitlab-ce#52609 2018-10-12 13:13:12 +07:00
Rémy Coutable f60317f414 Merge branch 'frontend-feature-flags' into 'master'
Support pushing of feature flags to the frontend

Closes gitlab-org/release/framework#17

See merge request gitlab-org/gitlab-ce!22197
2018-10-11 15:47:49 +00:00
Yorick Peterse 21940d1edf
Support pushing of feature flags to the frontend
This adds a method to Gitlab::GonHelper called
`push_frontend_feature_flag`. This method can be used to easily expose
the state of a feature flag to Javascript code. For example, using this
method we may write the following controller code:

    before_action do
      push_frontend_feature_flag(:vim_bindings)
    end

    def index
      # ...
    end

    def edit
      # ...
    end

In Javascript we can then check the state of the flag as follows:

    if ( gon.features.vimBindings ) {
      // ...
    }

Fixes https://gitlab.com/gitlab-org/release/framework/issues/17
2018-10-11 17:06:19 +02:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Takuya Noguchi af013d34d9 Use the standard PIP_CACHE_DIR for Python dependency caching template
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-10-09 14:54:51 +09:00
Kamil Trzciński bdb7ebf81a Merge branch 'patch-29' into 'master'
Updates Laravel.gitlab-ci.yml template

See merge request gitlab-org/gitlab-ce!22167
2018-10-08 08:57:10 +00:00
Stan Hu bedd5769e9 Merge branch 'backport-ce-to-ee-merge' into 'master'
Backport of CE upstream - 2018-10-05 12:21 UTC

See merge request gitlab-org/gitlab-ce!22154
2018-10-06 11:53:08 +00:00
Paul Giberson 71ffca52bd Updates Laravel.gitlab-ci.yml template
Updates to add gnupgp (required for node setup)
Upgrades node install to version 8
2018-10-06 05:44:07 +00:00
Alessio Caiazza 94fc061936
Add timed incremental rollout to Auto DevOps
Auto DevOps deployment strategies now supports timed incremental
rollout. We are deprecating the usage of INCREMENTAL_ROLLOUT_ENABLED
environment variable in Auto DevOps template.

The new behavior will be driven by the INCREMENTAL_ROLLOUT_MODE variable
that can either be manual (same as INCREMENTAL_ROLLOUT_ENABLED) or
timed.

Rollout deployments will be executed using a 5 minute delay between each
job.
2018-10-05 21:14:59 +02:00
Sean McGivern 34646406f7 Merge branch '50359-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeout' into 'master'
Resolve "ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout"

Closes #50359

See merge request gitlab-org/gitlab-ce!21893
2018-10-05 17:46:24 +00:00
Robert Speicher b407061a28 Merge branch 'ce-5987-project-templates-api' into 'master'
Add a new project-specific templates API endpoint

See merge request gitlab-org/gitlab-ce!22118
2018-10-05 17:40:32 +00:00
Brett Walker f5abc2e8f9 Use a CTE to remove the query timeout 2018-10-05 11:42:40 -05:00
Kamil Trzciński 9f9cac67ab Fix CE to EE merge (backport) 2018-10-05 17:39:42 +02:00
Shinya Maeda 7542a5d102 Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-05 23:38:02 +09:00
Kamil Trzciński 7bdbacb489 Merge branch 'feature/gb/pipeline-only-except-with-modified-paths' into 'master'
Pipeline only/except for modified paths

See merge request gitlab-org/gitlab-ce!21981
2018-10-05 10:40:42 +00:00
Nick Thomas 25bd49e4f5
Backport project template API to CE 2018-10-05 11:34:43 +01:00
Dmitriy Zaporozhets 98649bef45 Merge branch '52143-use-tiller-directly' into 'master'
Use tiller directly for Auto DevOps

Closes #52143

See merge request gitlab-org/gitlab-ce!22076
2018-10-05 08:52:35 +00:00
James Lopez 278c9e9e53 Revert "Merge branch 'feature/git-v2-flag' into 'master'"
This reverts merge request !21520
2018-10-05 06:44:09 +00:00
Shinya Maeda af2c51d7ca Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-05 10:13:06 +09:00
Thong Kuah cab875eeb7 Redirect IO streams to prevent hanging
https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging

https://gitlab.com/gitlab-org/gitlab-runner/issues/2880
2018-10-05 11:45:11 +13:00
Thong Kuah 2062560ef9 Use tiller directly for Auto DevOps
This saves a external network call to fetch a helm plugin. The cost is a
few lines of shell script
2018-10-05 11:45:11 +13:00
Kamil Trzciński 84c4e920cd Merge branch 'master' into 'feature/gb/pipeline-only-except-with-modified-paths'
# Conflicts:
#   app/models/ci/pipeline.rb
2018-10-04 16:52:48 +00:00
Rémy Coutable 5d2b319de5 Merge branch 'fix-todo-cops' into 'master'
Fix todo cops

See merge request gitlab-org/gitlab-ce!21850
2018-10-04 10:17:43 +00:00
Shinya Maeda e84230ebb6 Add limitation for start_in keyword 2018-10-04 18:59:34 +09:00
Phil Hughes 14ed916cf2 Merge branch '51958-fix-mr-discussion-loading' into 'master'
Fix MR discussion not loaded issue

Closes #51958

See merge request gitlab-org/gitlab-ce!21982
2018-10-04 07:37:24 +00:00
Shinya Maeda 5381985bd0 Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-04 09:44:14 +09:00
Douwe Maan 8672eac592 Merge branch '45016-add-web-ide-commits-to-usage-ping' into 'master'
Adds Web IDE commits to usage ping

Closes #45016

See merge request gitlab-org/gitlab-ce!22007
2018-10-03 13:02:43 +00:00
Dmitriy Zaporozhets 9117e14484 Merge branch '48004-db-initialize-migrate' into 'master'
Support db migration and initialization for Auto DevOps

Closes #48004

See merge request gitlab-org/gitlab-ce!21955
2018-10-03 11:31:54 +00:00
Tiago Botelho 1e662293e8 Implements Web IDE commits counter in Redis
This makes a temporary implementation of the
Web IDE commits counter using Redis while
https://gitlab.com/gitlab-org/gitlab-ce/issues/52096
is being discussed further for a more generic
approach to counters
2018-10-03 11:34:48 +01:00
Douwe Maan a5cfacc281 Merge branch 'remove-rugged' into 'master'
Remove Gitlab::Git::Repository#rugged

See merge request gitlab-org/gitlab-ce!22039
2018-10-03 09:06:32 +00:00
Shinya Maeda 41fe9edcf7 Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-03 10:33:33 +09:00
Alejandro Rodríguez a99bf447a2 Remove Gitlab::Git::Repository#rugged and Gollum code
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
2018-10-02 16:34:28 -03:00
Kamil Trzciński 607f263c48 Merge branch '49952-port-upgrade-command-to-ce' into 'master'
Port UpgradeCommand to CE

See merge request gitlab-org/gitlab-ce!21949
2018-10-02 17:06:29 +00:00
Matija Čupić 48c911b75e CE Resolve "Refactor code quality similar to JUnit tests" 2018-10-02 17:01:26 +00:00
Shinya Maeda 8bc065e02d Rename failure reason to stale_schedule 2018-10-02 17:08:14 +02:00
Shinya Maeda 336affe911 Add scheduled status 2018-10-02 17:08:14 +02:00
Shinya Maeda bc5d649a4c Add unschedule action to status build 2018-10-02 17:08:14 +02:00
Shinya Maeda 54263dc1d9 Fix coding style offence 2018-10-02 17:08:13 +02:00
Winnie Hellmann 308d11f4bb Use correct icon for scheduled jobs in pipeline graph 2018-10-02 17:08:13 +02:00
Winnie Hellmann ea38e832f0 Allow remaining time of scheduled jobs to overflow one day 2018-10-02 17:08:13 +02:00
Winnie Hellmann f976418d12 Fix URL to empty state graphic of scheduled jobs 2018-10-02 17:08:13 +02:00
Shinya Maeda fcb77970b6 Fix Status::Build::Scheduled. Add spec for the class. 2018-10-02 17:08:12 +02:00
Shinya Maeda eee454e142 Fix validation methods in Config::Entry::Job. Added spec for that 2018-10-02 17:08:12 +02:00
Shinya Maeda 174fd391f0 Add schedule_expired to failed status 2018-10-02 17:08:12 +02:00
Shinya Maeda ddb313aebf Remove Scheduled Status class from pipeline 2018-10-02 17:08:12 +02:00
Shinya Maeda 4b0aa57349 Check the precense of scheduled_at in Status::Build 2018-10-02 17:08:11 +02:00
Shinya Maeda b1d24c0d14 Fix stuck job worker. Fix sidekiq queue namespace 2018-10-02 17:04:04 +02:00
Shinya Maeda 703a41f886 Introduce enqueue_scheduled event 2018-10-02 17:04:04 +02:00
Shinya Maeda 571a934f29 Fix spec. Create scheduled status entry for pipeline 2018-10-02 17:02:12 +02:00
Shinya Maeda f8e680b786 Fix rubocop offence 2018-10-02 17:02:12 +02:00
Shinya Maeda 1a4f497e60 Update pipelines and stages status as well 2018-10-02 17:02:11 +02:00
Shinya Maeda a7c767f164 Add a new status to ci_builds.status 2018-10-02 17:02:11 +02:00
Shinya Maeda e265fc3e28 Rename delayed to scheduled 2018-10-02 17:02:11 +02:00
Shinya Maeda c03631a996 Support new syntax 2018-10-02 17:02:11 +02:00
Shinya Maeda 3fc4c096a5 Squashed commit of the following:
commit 9d9594ba20097dc4598f7eb42a9f9d78d73eae54
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Sep 13 20:18:31 2018 +0900

    Cancel scheduled jobs

commit f31c7172e07a9eb03b58c1e62eaa18cda4064aa6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Sep 13 11:18:42 2018 +0900

    Add Ci::BuildSchedule

commit fb6b3ca638f40f9e1ee38b1fdd892bda4f6fede7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Sep 12 20:02:50 2018 +0900

    Scheduled jobs
2018-10-02 16:57:37 +02:00
Grzegorz Bizon 0972dbc799 Add frozen strong literal directive to policy changes class 2018-10-02 15:59:08 +02:00
Grzegorz Bizon 23512484ef Freeze mutable constant in CI entry policy class 2018-10-02 15:56:56 +02:00
Douwe Maan 57dc233325 Merge branch 'osw-configurable-single-diff-file-limit' into 'master'
Make single diff patch limit configurable

Closes #48027

See merge request gitlab-org/gitlab-ce!21886
2018-10-02 13:53:32 +00:00
Grzegorz Bizon b772e7f4c6 Match a dot in paths configured for only: changes 2018-10-02 15:04:32 +02:00
Grzegorz Bizon 0f78ceca1b Add only/except pipeline build policy for `changes` 2018-10-02 14:48:18 +02:00
Grzegorz Bizon 740ee583b3 Make it possible to specifiy only: changes keywords 2018-10-02 14:03:20 +02:00
Thong Kuah c95303567e Use tiller locally for Auto Devops 2018-10-02 11:25:22 +00:00
Grzegorz Bizon 1c4187e38e Treat nil git push revisons as a blank Git SHA value 2018-10-02 13:01:55 +02:00
Pierre Tardy 57a4ee88ae Add variables on pipeline webhook 2018-10-01 17:22:41 +00:00
Bob Van Landuyt 1cd0761066 Merge remote-tracking branch 'dev/master' 2018-10-01 18:49:43 +02:00
Bob Van Landuyt 7cb9957a33 Merge branch 'security-2697-code-highlight-timeout' into 'master'
[master] Fix syntax highlight taking too long

Closes #2697

See merge request gitlab/gitlabhq!2467
2018-10-01 16:48:00 +00:00
Francisco Javier López c40400ceae [master] Stored XSS in Gitlab Merge Request from imported repository 2018-10-01 16:44:30 +00:00
Tiago Botelho 9b2e17ac71 Adds WebIDE commits to UsagePing
Implements UsageCounters model to track feature usage counters
and makes easy to extend for future counters
2018-10-01 16:11:09 +01:00
Oswaldo Ferreira 4fbca2a346 Make single diff patch limit configurable
- Creates a new column to hold the single patch limit value on
application_settings
- Allows updating this value through the application_settings API
- Calculates single diff patch collapsing limit based on
diff_max_patch_bytes column
- Updates diff limit documentation
- Adds documentation (with warning) as of how one can update this limit
2018-10-01 11:58:21 -03:00
Mark Chao f09303b00a Fix MR discussion not loaded issue
Display `formatter` as the sole content of `position` object.
This means `diff_file` data is not referenced, which is the
caseu of "IOError: not opened for reading".
2018-10-01 22:37:43 +08:00
Nick Thomas 466371a06c
Migrate sensitive web hook data in the background 2018-10-01 15:34:16 +01:00
Nick Thomas fb48eaba46
Encrypt webhook tokens and URLs in the database 2018-10-01 15:33:36 +01:00
Nick Thomas df73116f75 Merge branch '37433-solve-n-1-in-refs-controller-logs-tree' into 'master'
Adds list_last_commits_for_tree as the method call for the Gitaly ListLastCommitsForTree RPC

Closes #37433

See merge request gitlab-org/gitlab-ce!21921
2018-10-01 13:13:40 +00:00
Tiago Botelho a583f137dd Removes N+1 gitaly rpc call to fetch the last commit for path
Implements list_last_commits_for_tree to communicate with the
ListLastCommitsForTree Gitaly RPC

Bumps the Gitaly server version

Bumps the Gitaly-Proto gem version
2018-10-01 13:29:47 +01:00
Dmitriy Zaporozhets 6c5015ef7c Merge branch '48399-skip-auto-devops-jobs-based-on-license' into 'master'
Skip creating auto devops jobs for sast, container_scanning, dast,…

See merge request gitlab-org/gitlab-ce!21959
2018-10-01 08:43:57 +00:00
Thong Kuah f6ff32d9bd Port Helm::Api EE extensions to CE
We will need these utility level code in the future to help upgrade all
helm applications.
2018-10-01 11:16:07 +13:00
Kamil Trzciński 2155ba8b40 Merge branch '51651-fill-pipeline-source-for-external-pipelines' into 'master'
Resolve "Fill pipeline source for external pipelines"

Closes #51651

See merge request gitlab-org/gitlab-ce!21814
2018-09-30 20:04:00 +00:00
Dmitriy Zaporozhets ab6b448803 Merge branch 'dz-migration-index-helper' into 'master'
Add mysql_compatible_index_length to migration helpers

Closes #50253

See merge request gitlab-org/gitlab-ce!21852
2018-09-28 14:09:31 +00:00
Grzegorz Bizon 419d8cc7a2 Calculate modified paths of a git push operation 2018-09-28 15:13:04 +02:00
Grzegorz Bizon 4abba28944 Add specs for extracted git push class 2018-09-28 14:46:22 +02:00
Grzegorz Bizon 76d9e29a65 Extract git push from merge request refresh service 2018-09-28 12:20:51 +02:00
Grzegorz Bizon 3c2d6b4870 Add a class that represents a git push operation 2018-09-28 11:09:55 +02:00
Stan Hu b0b5346d65 Merge branch 'mk/asymmetric-exists-cache' into 'master'
Resolve "Geo: Does not mark repositories as missing on primary due to stale cache"

Closes #50211 and #44044

See merge request gitlab-org/gitlab-ce!21789
2018-09-28 02:24:16 +00:00
Michael Kozono f2fa7c10c8 Remove send-in-send for safety and readability
I attempted to refactor so that the caller of `wrap_method` passes in a
block, rather than a method name, but I was unsuccessful.

I kept getting the following error:

NoMethodError:
        undefined method `cache_method_output' for Repository:Class

If you can figure this out, then feel free to dry up these class methods
again without doing a send-within-a-send.
2018-09-27 18:22:37 -07:00
Michael Kozono 87a1ba1488 Expire RequestStore cache properly 2018-09-27 18:22:37 -07:00
Michael Kozono 3640292bf2 Cache `Repository#exists?` false in RequestStore
* Only truthy values are cached in Redis.
* All values are cached in RequestStore and in an instance variable.
2018-09-27 18:22:37 -07:00
Matija Čupić 3e309ea70d
Refactor migration specs using ActiveRecord models 2018-09-28 01:40:40 +02:00
Michael Kozono d9c4ebc5a0 Extract `Repository.memoize_method` method
And reuse `Gitlab::Utils::StrongMemoize`.

There is a subtle behavior change required to reuse StrongMemoize in
this case. The early fallback check now occurs *before* reading the
memoized value instead of after.

I think this is fine since a memoized value should only exist if
`exists?` is also already memoized as `true`.
2018-09-27 15:16:09 -07:00
Olivier Gonzalez cfedc0a9f4 Extend reports to support security features 2018-09-27 21:15:08 +00:00
Matija Čupić 4de93b6a3e
Refactor external_pipelines query 2018-09-27 19:28:24 +02:00
Matija Čupić 6075a9323a
Update all pipelines in single query 2018-09-27 18:57:19 +02:00
Dylan Griffith 2c2556f9d9 Skip creating auto devops jobs for sast, container_scanning, dast, dependency_scanning when not licensed 2018-09-27 15:46:11 +03:00
Dylan Griffith df796a4212 Dont create license_management build when not included in license
This improves CI performance since we do not create a whole new job that
just exits quickly. This is important based on
https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/4907#note_104742212
2018-09-27 15:10:48 +03:00
Rémy Coutable 2b5aa3efb8 Merge branch '43832-adds-chdmod-to-commits-actions-api' into 'master'
Allows to work with execute permissions in GitLab API

Closes #43832

See merge request gitlab-org/gitlab-ce!21866
2018-09-27 10:28:27 +00:00
Jacopo 271776d4aa Adds chmod action to POST /projects/:id/repository/commits API
With this action the user can update the execute_filemode of a given file in the repository.
2018-09-27 11:51:15 +02:00
Thong Kuah 0cb0f3c125 Process $DB_INITIALIZE and $DB_MIGRATE variables
if $DB_INITIALIZE is present, deploy an initial release
where only $DB_INITIALIZE is run in a special job (and deployments are
not rendered/loaded). This is then followed by second release with
deployments as usual.

if $DB_MIGRATE, set this value which will trigger a pre-upgrade helm
hook.
2018-09-27 21:47:29 +12:00
Dylan Griffith 64f2e306d9 Update all gitlab ci templates from gitlab-org/gitlab-ci-yml
Since we no longer maintain this separate repo we just needed to do one
final copy from there. See
https://gitlab.com/gitlab-org/gitlab-ce/issues/50289
2018-09-27 11:07:11 +03:00
Thong Kuah e6fd3f1986 Port UpgradeCommand to CE
This is a utility class that we will need in the future to update and
upgrade our managed helm applications, which we do plan to do in CE.
2018-09-27 18:15:04 +12:00
Dylan Griffith f5f5d6ea1f Resolve "Un-vendor CI templates" 2018-09-26 15:39:27 +00:00
Douwe Maan ab760054ee Merge branch 'tc-fix-rails5-subquery-selfjoin' into 'master'
Work around a bug in Rails 5, where LIMIT causes trouble

Closes #51729

See merge request gitlab-org/gitlab-ce!21879
2018-09-26 08:19:28 +00:00
Matija Čupić c2fbd8677c
Add background migration to fill pipeline source 2018-09-25 21:09:14 +02:00
Douglas Barbosa Alexandre b55f8aebab Merge branch '51747-gitlab-com-unable-to-import-a-project-that-was-just-exported' into 'master'
Resolve "gitlab.com: Unable to import a project that was just exported"

Closes #43840, #43896, and #51747

See merge request gitlab-org/gitlab-ce!21875
2018-09-25 13:04:56 +00:00
Yorick Peterse a1ee365843 Merge branch 'mk/improve-usage-of-request-store' into 'master'
Resolve "Provide NullStore for RequestStore"

Closes #51718

See merge request gitlab-org/gitlab-ce!21848
2018-09-25 11:24:28 +00:00
Toon Claes 6823e7defb Work around a bug in Rails 5, where LIMIT causes trouble
The original code caused Rails to generate invalid SQL. The problem
lays in the `.arel` method in `ActiveRecord::Relation`. When there was
a `limit` on the relation, the `LIMIT` statement was taken over to
Arel, but the value wasn't.

```ruby
relation = Event.limit(2)
relation.to_sql
#=> "SELECT  `events`.* FROM `events` LIMIT 2"
relation.arel.to_sql
#=> "SELECT  `events`.* FROM `events` LIMIT ?"
```

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51729
2018-09-25 11:49:57 +02:00
Filipa Lacerda 32ccde8ccd Use Vue component for job artifacts, Commit and Trigger Variables 2018-09-25 08:07:47 +00:00
Michael Kozono a54a5d9f39 Use `Gitlab::SafeRequestStore` in more places
Even if it doesn’t save lines of code, since people will tend to use
code they’ve seen. And `SafeRequestStore` is safer since you
don’t have to remember to check `RequestStore.active?`.
2018-09-24 12:11:27 -07:00