Commit Graph

5938 Commits

Author SHA1 Message Date
Kamil Trzciński 076e16cb1c Ensure that template is used once
This adds additional test that make sure that each
template name is used exactly once across all folders
exposed
2019-06-06 12:18:50 +02:00
Kamil Trzciński 502cbda11b Merge branch 'ci-variable-expression-con-dis-junction' into 'master'
CI variable expression conjunction/disjunction

See merge request gitlab-org/gitlab-ce!27925
2019-06-06 08:34:57 +00:00
Grzegorz Bizon 8501edcd46 Merge branch 'revert-86900f00' into 'master'
Revert "Disable retrying cancelled jobs"

Closes #62350

See merge request gitlab-org/gitlab-ce!29201
2019-06-06 08:32:04 +00:00
Douwe Maan e7b6dace06 Merge branch '54140-non-ar-cache-commit-markdown' into 'master'
Use Redis for CacheMarkDownField on non AR models

Closes #54140

See merge request gitlab-org/gitlab-ce!29054
2019-06-05 16:30:51 +00:00
Nick Thomas 327c7d5a07 Merge branch 'graphql-file-entry-url' into 'master'
Add web_url to tree entry in GraphQL API

See merge request gitlab-org/gitlab-ce!28646
2019-06-05 15:44:53 +00:00
Stan Hu 422fa21d0a Merge branch '11126-fix-repository-size-check-ce' into 'master'
Add client code to call GetObjectDirectorySize RPC

See merge request gitlab-org/gitlab-ce!28918
2019-06-05 14:43:37 +00:00
Patrick Bajao 40fd0b9e40 Add client code to call GetObjectDirectorySize RPC
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13460
2019-06-05 20:58:46 +08:00
Patrick Bajao de21320db2 Remove requirement for id for #markdown_cache_key
It's not needed anymore as we require `#cache_key` instead.
2019-06-05 20:06:41 +08:00
Kamil Trzciński e58e24b4d4 Revert "Merge branch..."
This reverts merge request !27503
2019-06-05 11:09:51 +00:00
Douglas Barbosa Alexandre eebdfbc334 Merge branch '62713-fix-uninstalling-cluster-apps' into 'master'
Fix connection to Tiller error while uninstalling

Closes #62713

See merge request gitlab-org/gitlab-ce!29131
2019-06-05 09:42:20 +00:00
Wolphin 1f2244f16b Add multiple extends support 2019-06-05 08:25:55 +00:00
Phil Hughes 4644a2daf5
Add web_url to tree entry in GraphQL API 2019-06-05 08:46:32 +01:00
Patrick Bajao 56d52340da Use #cache_key of subject for generated redis key
This commit also includes some changes in specs to use
`Class.new` approach.
2019-06-05 14:36:54 +08:00
Patrick Bajao 2eecfd8f9d Use Redis for CacheMarkDownField on non AR models
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.

When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`<field>_html` attribute on the record. We also store the version
used for generating the markdown.

All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:<class>:<id>`. The class this included in must
therefore respond to `id`.
2019-06-05 13:19:59 +08:00
drew cimino cfaac75322 && and || operators for CI Pipeline expressions.
Refactored regex pattern matching to eagerly return tokens

Packaged behind a default-enabled feature flag and added operator documentation.
2019-06-04 19:03:24 -05:00
Bob Van Landuyt 327cae1da7 Merge branch '61964-unicorn-instrumentation' into 'master'
Adds ruby and unicorn instrumentation

Closes #61964

See merge request gitlab-org/gitlab-ce!28499
2019-06-04 17:59:04 +00:00
Thong Kuah c7d50ddf55 Fix connection to Tiller error while uninstalling
Both the `install-<app>` and `uninstall-<app>` pods loads the
`values-content-configuration-<app>` configmap into the pod
(see `#volume_specification`). This configmap contains the cert
necessary to connect to Tiller. The cert though is only valid for 30
minutes.

So this fixes the bug where the configmap when uninstalling should be
updated as well.
2019-06-05 00:07:47 +12:00
Jan Provaznik d4a83ce5a3 Ignore Puma empty worker stats
In some cases (during worker start) it's possible that
Puma.stats returns an empty hash for worker's last status. In
that case we just skip sampling of the worker until these
stats are available.
2019-06-04 09:11:55 +00:00
Robert Speicher a2c767b9f8
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2019-06-03 10:04:57 -07:00
Robert Speicher 2b13462ac4 Merge branch 'security-58856-persistent-xss-in-note-objects' into 'master'
Persistent XSS in note objects CE

See merge request gitlab/gitlabhq!3075
2019-06-03 17:01:10 +00:00
Yorick Peterse 6cb750a2bb
Merge dev.gitlab.org master into GitLab.com master 2019-06-03 14:56:33 +02:00
GitLab Release Tools Bot 38e4977dc7 Merge branch 'security-fix_milestones_search_api_leak' into 'master'
Resolve: Milestones leaked via search API

Closes #2822

See merge request gitlab/gitlabhq!2997
2019-06-03 12:34:07 +00:00
GitLab Release Tools Bot 5dc6c8f2d0 Merge branch 'security-60039' into 'master'
Disallow invalid MR branch name

See merge request gitlab/gitlabhq!3052
2019-06-03 12:34:04 +00:00
GitLab Release Tools Bot e5b88d88fb Merge branch 'security-id-leaked-password-in-import-url-frontend' into 'master'
Handling password on import by url page

See merge request gitlab/gitlabhq!3061
2019-06-03 12:34:01 +00:00
Dmitriy Zaporozhets 205f0d0cfe Merge branch 'ac-graphql-stats' into 'master'
Add Namespace and ProjectStatistics to GraphQL API

See merge request gitlab-org/gitlab-ce!28277
2019-06-03 11:52:37 +00:00
Alessio Caiazza 83a8b77961 Add Namespace and ProjectStatistics to GraphQL API
We can query namespaces, and nested projects.

Projects now exposes statistics
2019-06-03 12:01:32 +02:00
Francisco Javier López 7eafe90b90
Fix port validations in .gitlab-webide.yml 2019-06-01 12:37:29 +02:00
Douglas Barbosa Alexandre 3e4862ac6d Merge branch 'osw-reset-merge-status-from-mergeable-mrs' into 'master'
Reset merge status from mergeable MRs

See merge request gitlab-org/gitlab-ce!28843
2019-05-31 20:46:19 +00:00
Oswaldo Ferreira f3efec2029 Reset merge status from mergeable MRs
Adds migrations to reset the merge_status of opened,
mergeable MRs. That's required by
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28513
so we're able to sync the status update along merge-ref,
without leaving MRs with a stale merge-ref.
2019-05-31 15:21:20 -03:00
Lin Jen-Shin d7b277df46 Merge branch 'dz-scope-project-routes-3' into 'master'
Move some project routes under - scope

See merge request gitlab-org/gitlab-ce!28830
2019-05-31 15:53:04 +00:00
Bob Van Landuyt 9a8955d3c0 Merge branch 'gitaly-version-v1.43.0' into 'master'
Upgrade Gitaly to v1.43.0

See merge request gitlab-org/gitlab-ce!28867
2019-05-31 14:16:54 +00:00
Sean McGivern 4e888212a1 Merge branch '59587-add-graphql-logging' into 'master'
Add logging to GraphQL

Closes #59587

See merge request gitlab-org/gitlab-ce!27885
2019-05-31 11:59:21 +00:00
charlie ablett 699532232c Apply reviewer feedback
- Comply doc with guidelines
- Improve tests for readability and completeness
- Separate out phases visually with newlines
- Add `format_message` test
- test readability
- code and test structure/styling
- static query analyzers
- call `as_json` on `provided_variables`
- add exception handling
2019-05-31 19:57:02 +12:00
Bob Van Landuyt 589b2db06c Setup Phabricator import
This sets up all the basics for importing Phabricator tasks into
GitLab issues.

To import all tasks from a Phabricator instance into GitLab, we'll
import all of them into a new project that will have its repository
disabled.

The import is hooked into a regular ProjectImport setup, but similar
to the GitHub parallel importer takes care of all the imports itself.

In this iteration, we're importing each page of tasks in a separate
sidekiq job.

The first thing we do when requesting a new page of tasks is schedule
the next page to be imported. But to avoid deadlocks, we only allow a
single job per worker type to run at the same time.

For now we're only importing basic Issue information, this should be
extended to richer information.
2019-05-31 09:40:54 +02:00
Vladimir Shushlin 39e21fb266 Generate lets_encrypt_private_key on the fly
Remove migration generating lets encrypt key
Don't generate private_key if database is readonly

For reference:
This reverts commit 988a7f70489b99383b95e9f271a2caf6bb5b3a44.
This reverts commit 21acbe531592d55caf0e5b8716a3b551dafd6233.
2019-05-31 05:22:55 +00:00
Zeger-Jan van de Weg 951afba624
Remove hook directory requirement from Shell
It used to be the case that GitLab created symlinks for each repository
to one copy of the Git hooks, so these ran when required. This changed
to set the hooks dynamically on Gitaly when invoking Git.

The side effect is that we didn't need all these symlinks anymore, which
Gitaly doesn't create anymore either. Now that means that the tests in
GitLab-Rails should test for it either.

Related: https://gitlab.com/gitlab-org/gitaly/issues/1392#note_175619926
2019-05-30 20:04:08 +02:00
Oswaldo Ferreira a1a0f8e6b0 Add DNS rebinding protection settings 2019-05-30 10:47:57 -03:00
Douwe Maan a9bcddee4c Protect Gitlab::HTTP against DNS rebinding attack
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.
2019-05-30 10:47:31 -03:00
Lin Jen-Shin c90ba127bf Extract roulette to its own module
So it's more modular and extensible
2019-05-30 19:24:28 +08:00
charlieablett 5f0c230a18 Move complexity/depth to `final_value`
Tidy tests according to reviewer comments.
Move complexity and depth calls from `initial_value` to `final_value`
Log variables as json
2019-05-30 18:27:42 +12:00
charlieablett 184a5120dc Call analyzers from LoggerAnalyzer
- Add changelog file
- Fix failing tests
2019-05-30 18:27:28 +12:00
charlieablett b94a17e00e Add GraphQL logging feature flag 2019-05-30 18:27:28 +12:00
charlieablett 2a10064167 Restructure complexity analyzer
Remove instance variables for class re-use, test individual methods,
use `monotonic_time`
2019-05-30 18:27:28 +12:00
charlieablett 2c011cb5b4 Implement logger analyzer
- Modify GraphqlLogger to subclass JsonLogger
- Replace the single-line analyser with one that can log all the GraphQL
query related information in one place.
- Implement analyzer behavior with spec
2019-05-30 18:27:28 +12:00
charlieablett 1f37aed1c9 New logfile for graphql queries
Specify dedicated logfile and logger class for GraphQL queries. Move
complexity analyzer to a dedicated class.
2019-05-30 18:27:28 +12:00
Stan Hu 82f39315b1 Merge branch 'add-wiki-size-to-statistics' into 'master'
Add wiki size to project statistics

Closes #57822

See merge request gitlab-org/gitlab-ce!25321
2019-05-29 22:01:50 +00:00
Jan Provaznik 6d6bae66df Added rack-timeout for Puma
It assures that requests are aborted after 60 seconds, otherwise
an exception is raised. This exception is logged by Sentry, also
there is a Prometheus counter for measuring number of requests in each
state.
2019-05-29 18:53:44 +00:00
Ryan Cobb 0393c5059d Merge branch 'master' into 61964-unicorn-instrumentation 2019-05-29 10:56:38 -06:00
Peter Marko 40490cc492 Add wiki size to project statistics 2019-05-29 16:08:25 +02:00
Dmitriy Zaporozhets c1b142b867 Fix specs after routing change
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-29 16:31:04 +03:00