Commit Graph

2769 Commits

Author SHA1 Message Date
Robert Speicher 539ed0a637 Merge branch 'gitaly-tree-entries-encoding' into 'master'
Correctly encode string params for Gitaly's TreeEntries RPC

Closes #36720

See merge request !13724
2017-08-21 22:22:37 +00:00
Robert Speicher 367d3d9704 Merge branch 'only-limit-fetch-when-requested' into 'master'
Only require sidekiq-limit_fetch when enabled in settings

Closes #36253

See merge request !13715
2017-08-21 19:26:12 +00:00
Alejandro Rodríguez b7ebb447d7 Correctly encode string params for Gitaly's TreeEntries RPC 2017-08-21 15:13:40 -03:00
Sean McGivern 0db5f576fe Only require sidekiq-limit_fetch when enabled in settings
This gem allows Sidekiq jobs to be throttled. Unfortunately, it has a
side-effect: when we haven't enabled job throttling, it will still hit Redis a
lot (and miss, because nothing is configured).

As this setting already required a restart, ensure that the library is only
required when it's enabled.
2017-08-21 12:56:22 +01:00
Kamil Trzciński e00e62c2c8 Merge branch 'backstage/gb/migrate-stages-statuses' into 'master'
Migrate CI/CD stages statuses

Closes #33453

See merge request !12584
2017-08-21 11:47:44 +00:00
Douwe Maan d6547ce0e7 Merge branch 'gitaly-annotations-update' into 'master'
Gitlab::Git deletions and simplifications

See merge request !13640
2017-08-21 11:45:35 +00:00
Robert Speicher 5b37f21bf2 Reduce duplication in GitAccess spec around error messages
- Adds a new `ProjectMovedError` class to encapsulate that error
  condition. Inherits from `NotFoundError` so existing rescues should
  continue to work.
- Separating that condition out of `NotFoundError` allowed us to
  simplify the `raise_not_found` helper and avoid repeating the literal
  string.
- Spec makes use of `ERROR_MESSAGES` hash to avoid repeating literal
  error message strings.
2017-08-18 15:16:54 -04:00
Robert Speicher bb40f4ab6e Greatly reduce test duration for git_access_spec
- Combine multiple `it` blocks into one where it made sense
- Use `set` for the top-level User record
- Refactor permission matrix tests
2017-08-18 15:16:54 -04:00
Jacob Vosmaer faaed0aa1f Delete unused Gitlab::Git methods 2017-08-18 14:12:17 +02:00
Sean McGivern 34a859ee2a Fix MR diffs background migration when file modes are missing
Guess the modes based on the following:

1. If the file didn't exist, it's zero.
2. If the diff contains 'Subproject commit', it might be a submodule, so 0600.
3. Otherwise, it's 0644.

This isn't perfect, but it doesn't have to be - it won't change file modes in
the repository.
2017-08-18 13:02:30 +01:00
Sean McGivern 133c72ae42 Merge branch 'gitaly_ref_exists' into 'master'
Client Implementation: RefService::RefExists

Closes gitaly#452

See merge request !13528
2017-08-18 10:20:50 +00:00
Douwe Maan cc543b6c85 Merge branch '36041-notification-title' into 'master'
Don't escape html entities in InlineDiffMarkdownMarker

Closes #36041

See merge request !13553
2017-08-18 08:50:59 +00:00
Andrew Newdigate aaa887feba Client Implementation: RefService::RefExists 2017-08-18 09:43:58 +01:00
Jarka Kadlecova c271fdc80f Don't escape html entities when rich == raw line 2017-08-17 19:55:07 +02:00
Alejandro Rodríguez c463a83405 Incorporate RepositoryService.ApplyGitattributes Gitaly RPC 2017-08-17 14:44:30 -03:00
Alejandro Rodríguez 0296700207 Add GitalyClient::RepositoryService specs 2017-08-17 14:40:43 -03:00
Sean McGivern c3e0f31dfb Merge branch 'backstage/gb/migrations-tests-schema-version' into 'master'
Improve migrations / background migrations testing strategy

Closes #36303

See merge request !13589
2017-08-17 11:54:54 +00:00
Grzegorz Bizon 3a1103fd91 Add specs for stage status background migration class 2017-08-17 12:56:09 +02:00
Felipe Artur 91035871d3 Fix project import to group when there are project milestones 2017-08-17 10:40:19 +00:00
Grzegorz Bizon d1cfa79dfc Merge branch 'backstage/gb/migrations-tests-schema-version' into backstage/gb/migrate-stages-statuses
* backstage/gb/migrations-tests-schema-version:
  Migrate down before each migration unit test
  Disable db_cleaner tables caching in migrations tests
  Extend migrations testing documentation
  Make it possible to provide schema version in tests
  Migrate db schema for context in :migration specs
2017-08-17 11:59:00 +02:00
Robert Speicher ec34b2d051 Merge branch 'dm-gpg-signature-performance' into 'master'
Only create commit GPG signature when necessary

See merge request !13561
2017-08-16 18:34:55 +00:00
Douwe Maan ba7251fefd Only create commit GPG signature when necessary 2017-08-16 18:57:50 +02:00
Rémy Coutable 4e0ee10a72 Merge branch 'bvl-circuitbreaker-settings-to-avoid-failures' into 'master'
Circuitbreaker settings to avoid spec-failures

Closes #36324

See merge request !13519
2017-08-16 13:38:00 +00:00
Bob Van Landuyt ee603a0089 Allow a `failure_wait_time` of 0 for storage access
This allows testing every storage attempt after a failure. Which could
be useful for tests
2017-08-16 14:15:50 +02:00
Grzegorz Bizon 1066d8ba77 Use usual method to retrieve CI/CD stage statuses 2017-08-16 13:30:49 +02:00
Grzegorz Bizon 32d0983a4e Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (1000 commits)
  Fix username autocomplete group name with no avatar alignment
  Fix 'Projected tags' typo in protected_tags_spec.rb
  Many Repo Fixes
  Repo Editor Fixes
  Docs: New index for permissions
  link article from CI index
  link tech articles from the landing page
  new articles come first
  fix relative link
  fix date format
  Fixed changed files dropdown not being shown
  Update publication date
  Remove deprecated field from workhorse API responses
  Fix API responses when dealing with txt files
  Make sure MySQL would not use CURRENT_TIMESTAMP
  Add two more project templates
  Allow usage of any_projects? with an Array
  Copyedit Artifactory and GitLab article
  Rename Artifactory and GitLab article file
  Display GPG status loading spinner only when Ajax request is made
  ...
2017-08-16 13:18:03 +02:00
Grzegorz Bizon c76f8f3e8f Make it possible to provide schema version in tests 2017-08-16 13:05:18 +02:00
Rémy Coutable 7b68bdce15 Merge branch 'rs-trailingwhitespace-cop' into 'master'
Enable Layout/TrailingWhitespace cop and auto-correct offenses

See merge request !13573
2017-08-16 10:27:46 +00:00
Rémy Coutable 1b46a8360e Merge branch '34643-fix-project-path-slugify' into 'master'
Fix CI_PROJECT_PATH_SLUG slugify

Closes #34643

See merge request !13350
2017-08-16 10:10:24 +00:00
Douwe Maan 765b183168 Merge branch 'rs-redis-config-paths' into 'master'
Don't depend on `Rails` for Redis configuration file paths

Closes #36514

See merge request !13575
2017-08-16 09:54:06 +00:00
Douwe Maan e254014d3d Merge branch '34533-speed-up-project-creation' into 'master'
Speed up project creation by inlining repository creation

Closes #34533

See merge request !13529
2017-08-16 09:45:25 +00:00
Robert Speicher f5cb3ac14d Don't depend on `Rails` for Redis configuration file paths
The `Rails` object was not always available in all tasks that require
Redis access, such as `mail_room`, so the constant pointing to the
configuration path was never defined, but we still attempted to access
it in `config_file_name`, resulting in a `NameError` exception.

Further, there was no benefit to defining these paths in a constant to
begin with -- they're only accessed in one place, and it was within the
class where they were being defined. We can just provide them at
run-time instead.

Further _still_, we were calling `File.expand_path` on the absolute path
returned by `Rails.root.join`, which was rather pointless.
2017-08-15 15:08:56 -04:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Nick Thomas 5fc871381a Speed up project creation by inlining repository creation 2017-08-15 18:33:07 +01:00
Douwe Maan 97b768508c Merge branch 'workhorse-deprecate-gitaly-address' into 'master'
Remove deprecated field from workhorse API responses

See merge request !13567
2017-08-15 15:56:02 +00:00
Jacob Vosmaer 4405c8e393 Remove deprecated field from workhorse API responses 2017-08-15 16:39:31 +02:00
Z.J. van de Weg 6391406774
Add two more project templates
Related to !13108. Mostly this is just running the rake task and
changing the task a bit to catch cases like the project already existing
or so. The rake task moves archives to the vendor/project_template
directory, which are checked in too.
2017-08-15 12:55:54 +02:00
Douwe Maan 0da644072f Merge branch 'malformed-submodule' into 'master'
Handle missing .gitmodules when getting submodule urls

See merge request !13509
2017-08-15 09:00:44 +00:00
vanadium23 e99444bb2d Fix CI_PROJECT_PATH_SLUG slugify 2017-08-15 08:22:56 +03:00
Douwe Maan a64760d6d0 Merge branch 'gitaly-404-commit-list-files' into 'master'
Migrate `Git::Repository.ls_files` to Gitaly

Closes gitaly#404

See merge request !13302
2017-08-14 15:44:36 +00:00
Dmitriy Zaporozhets 725b383718 Merge branch 'fix/thread-safe-gpgme-tmp-directory' into 'master'
Fix: Thread safe GPGME tmp directory

Closes #35986

See merge request !13481
2017-08-14 13:38:43 +00:00
Alexis Reigel edcc488b75 use mutex for keychain interaction
setting of the gpg home directory is not thread safe, as the directoy
gets stored on the class.

if multiple threads change the directory at the same time, one of the
threads will be working in the wrong directory.
2017-08-14 12:57:56 +02:00
Jacob Vosmaer d9b6fd4fba Handle missing .gitmodules when getting submodule urls 2017-08-14 10:53:02 +02:00
Douwe Maan 9419d10e86 Merge branch 'bvl-rollback-renamed-system-namespace' into 'master'
Don't rename system when migrating from 9.x -> 9.4

Closes #35525 and #36148

See merge request !13228
2017-08-14 07:39:52 +00:00
Robert Speicher f8fa7a050e Merge branch 'feature/migrate-force-push-check-to-gitaly' into 'master'
Migrate force push check to Gitaly

See merge request !13406
2017-08-11 20:43:25 +00:00
Ahmad Sherif daa0137b41 Migrate force push check to Gitaly 2017-08-11 19:42:17 +02:00
Robert Speicher 5896d1b1e6 Merge branch '32004-use-timecop-safe-mode' into 'master'
Enable Timecop safe mode

Closes #32004

See merge request !13498
2017-08-11 16:59:37 +00:00
Bob Van Landuyt 2ea8442ff3 Move the personal snippet uploads from `system` to `-/system`
Update the markdown unconditionally since the move might have been
done before, but the markdown not updated.
2017-08-11 18:17:45 +02:00
Sean McGivern 2a4304aea7 Merge branch 'rc/32308-rspec-retry-hack' into 'master'
Detect and keep track of flaky specs

See merge request !13021
2017-08-11 14:59:17 +00:00
Sean McGivern e80a893ff0 Merge branch 'split-events-into-push-events' into 'master'
Use a separate table for storing push events

See merge request !12463
2017-08-11 14:40:03 +00:00