Commit Graph

379 Commits

Author SHA1 Message Date
Stan Hu 1b7ab11f94 Omit issues links in merge request entity API response
The merge request widget has a section that includes which issues may be
closed or mentioned based on the merge request description. The problem
is that rendering and redacting Markdown can be expensive, especially
since the browser polls for the data every 10 seconds.

Since these links don't change much and are just nice to have, we only
load them on first page load. The frontend will use the existing data if
the data doesn't appear on subsequent requests.

This saves about 30% of the rendering time of this endpoint, which adds
up to significant savings considering that
`MergeRequestsController#show.json` is called over a million times a day
on GitLab.com.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63546
2019-06-20 15:59:41 -07:00
James Fargher 6b9157d5dc Make KubernetesService readonly
We are deprecating this service in favor of instance wide clusters.
Therefore we removed some code that is not anymore needed for a
readonly cluster and also we added some flags to allow for this
deprecation. These flags are to be removed in the next release when
we finally completelly remove KubernetesService.
2019-06-18 00:01:56 +00:00
charlieablett 27dd0b8e36 Use serialization for project boards
- Add serializers and Grape::Entity
- Replace to_json
- Add specs
2019-06-06 22:13:14 +12:00
Shinya Maeda d4b4693663 Abstract auto merge processes
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
2019-06-03 13:15:29 +07:00
Matija Čupić 1542b160f1
Extract Ci::Build#report_artifacts into method
Extracts combining the job_artifacts relation with the with_reports
scope for getting report artifacts into a method.
2019-05-28 17:06:29 +02:00
Matija Čupić 9e6f37744a
Move JobArtifactEntity to JobArtifactReportEntity 2019-05-28 17:06:29 +02:00
Matija Čupić 31bd09a392
Expose report download path in build details
Exposes report download paths in build details.
2019-05-28 17:06:29 +02:00
Stan Hu 029d68d395 Merge branch 'backstage/gb/improve-jobs-controller-performance' into 'master'
Improve performance of jobs controller show

Closes #60708

See merge request gitlab-org/gitlab-ce!28093
2019-05-28 04:57:55 +00:00
Małgorzata Ksionek 13f3726434 Rephrase specs description for cycle analytics 2019-05-27 12:44:02 +02:00
Grzegorz Bizon 087680d780 Fix deployment entity tests
Fixes style lint errors
2019-05-24 10:04:35 +01:00
Grzegorz Bizon 6ef27f7744 Expose build environment latest deployable name and path 2019-05-24 10:04:35 +01:00
Grzegorz Bizon cc4a0d9a47 Add specs checking serialization of a stage builds 2019-05-24 10:04:05 +01:00
Grzegorz Bizon de24df98a3 Do not serialize deployment details for build details page 2019-05-24 10:04:05 +01:00
Grzegorz Bizon 412a385702 Do not serialize a deployment commit showing a job 2019-05-24 10:04:05 +01:00
Grzegorz Bizon b9c19f6b0f Do not serialize a pipeline again when showing a build
This change makes it possible to avoid additional serialization of
entire pipeline when rendering a build details page. Instead we expose
more information from the build entity itself what is much cheaper than
serializing entire pipeline.

Additionally we do not need to serialize `latest?` flag, which involves
multiple Gitaly calls.
2019-05-24 10:04:04 +01:00
Małgorzata Ksionek ee92acccb4 Add specs for median serializing 2019-05-23 13:23:38 +02:00
Fabio Pitino 24a81b3dcc Display classname JUnit attribute in report modal 2019-05-20 13:27:08 +00:00
Shinya Maeda d4d2cf7327 Fix merge request pipeline exist method
Refactor
2019-05-06 13:20:47 +07:00
Mayra Cabrera 5432f5480f Adds a way to start multiple manual jobs in stage
- Adds an endpoint on PipelinesController
- Adds a service that iterates over every build in a stage and
plays it.
- Includes 'play_manual' details on EntitySerializer
- Builds a new Stage state: PlayManual. An stage can take this status if
it has manual builds or an skipped, scheduled or manual status
- Includes FE modifications and specs
2019-05-02 18:27:35 +00:00
Thong Kuah 44eec56834 Expose can_uninstall in cluster_status.json
Only prometheus can be uninstalled atm, the rest will be dealt with
later.

Presumption is that new application types will have uninstallation
implmemented at the same time.
2019-04-29 22:55:11 -07:00
Matija Čupić 60f0e3c993
Use different query count expectations in EE 2019-04-10 13:18:31 +02:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Grzegorz Bizon ff64887964 Merge branch '54506-show-error-when-namespace-svc-missing' into 'master'
Show error when namespace/svc account missing

Closes #54506

See merge request gitlab-org/gitlab-ce!26362
2019-04-05 07:05:32 +00:00
Oswaldo Ferreira e540c0d71e Fixed test specs
- added suggestions to mock data
- fixed props to be not required
2019-04-04 13:08:34 +00:00
Shinya Maeda a04e1d5e32 Backport EE change
This is for merge request pipelines
2019-04-02 15:55:06 +07:00
Tiger 02b9b5facf Expose build failure reason
We can use this to show more informative error messages with
links to documentation etc.
2019-04-02 11:07:06 +11:00
Oswaldo Ferreira 03e0604d5d Prepare suggestion implementation for multi-line
Adds the groundwork needed in order to persist multi-line suggestions,
while providing the parsing strategy which will be reused for the
**Preview** as well.
2019-03-27 12:26:53 -03:00
Luke Duncalfe 38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13:00
Shinya Maeda aee119c0cd Update pipeline detail view to accommodate post-merge pipelines
Commit changes

Add spec

Add changelog

fix

fix

Fix

Fix spec

Finish spec

ok

nice

ok

ok

ok

fix
2019-03-19 23:19:27 +07:00
Shinya Maeda 05c0377008 Add attached flag to pipeline entity
Add spec

Fix

Fix

Add changelog

Drop attached

Remove attached

Update changelog

ok
2019-03-13 21:36:27 +07:00
Shinya Maeda b913169d88 Make all_pipelines method compatible with pipelines for merge requests
Make it sane

Include merge ref head

Fix union

Improve a bit

Add spec

remove

add spec

Add changelog

fix coding offence

Apply suggestion to spec/models/merge_request_spec.rb

ok

ok

Fix

Fix spec

Fix spec

fix

Simplify the things

Memoize

OK

a
2019-03-13 19:26:38 +07:00
Shinya Maeda 50776d2d29 Expose merge request entity for pipelines
Add preload

Fix

ok

Write tests

test only postgresql

ok

add more test
;

Improve wording

Add changelog

Fix
2019-03-06 16:30:35 +07:00
Takuya Noguchi a565f3d88d Fix misspellings in app/spec executable lines
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-02-27 22:41:34 +09:00
Adam Mulvany 38bbc097fa
Properly implement API pagination headers and add specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-02-21 18:29:00 +01:00
Natalia Tepluhina bf8f32da7f Replaced part of diff file properties with diff viewer
- replaced file.too_large
- replaced file.text
- replaced file.collapsed
2019-02-15 17:56:50 +00:00
Luke Bennett 534a61179e
Improve the GitHub and Gitea import feature table interface
These are backend changes.
Use Vue for the import feature UI for "githubish"
providers (GitHub and Gitea).
Add "Go to project" button after a successful import.
Use CI-style status icons and improve spacing of the
table and its component.
Adds ETag polling to the github and gitea import
jobs endpoint.
2019-02-13 00:15:57 +00:00
Shinya Maeda 6b99848be3 Move permission check of manual actions of deployments 2019-02-08 12:53:35 +00:00
Thong Kuah f67fc23727 Upgrade cluster applications, starting with runner 2019-02-07 21:40:55 +00:00
Luke Duncalfe 2b7dd017af Allow custom squash commit messages 2019-02-06 12:33:11 +00:00
Kamil Trzciński d4c7214799
[master] Pipelines section is available to unauthorized users 2019-01-31 16:52:50 +01:00
Grzegorz Bizon cb76f79dbb Merge branch 'cluster_status_for_ugprading' into 'master'
Expose app version to frontend

See merge request gitlab-org/gitlab-ce!24791
2019-01-30 15:06:32 +00:00
Thong Kuah be386cb2cf Expose app version to frontend 2019-01-31 01:15:02 +13:00
Robert Speicher a245519641 Merge branch 'bw-enable-sourcepos' into 'master'
Enable CommonMark source line position information

See merge request gitlab-org/gitlab-ce!23971
2019-01-28 17:19:23 +00:00
Grzegorz Bizon dc6091876d Merge branch 'container-repository-cleanup-api' into 'master'
Container repository cleanup API

Closes #55978

See merge request gitlab-org/gitlab-ce!24303
2019-01-25 13:24:35 +00:00
Kamil Trzciński 045d07bab3 Add Container Registry API
This includes a set of APIs to manipulate container registry.
This includes also an ability to delete tags based on requested
criteria, like keep-last-n, matching-name, older-than.
2019-01-25 13:13:48 +01:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Brett Walker 7bc0fbe22f Fix review comments
including refactoring, disabling sourcepos for pipelines that
don't need it, and minimizing spec changes by disabling
sourcepos when not testing for it explicitly.
2019-01-21 15:07:40 -06:00