Gosia Ksionek
976b8b5391
Fix plan stage query
...
Fix plan stage query and the way it is displayed
2019-06-17 13:17:18 +00:00
Andrew Newdigate
3288e1a874
Adds the Rubocop ReturnNil cop
...
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
gfyoung
7e6f6e1603
Enable even more frozen string in lib/gitlab
...
Enables frozens string for the following:
* lib/gitlab/conflict/**/*.rb
* lib/gitlab/cross_project_access/**/*.rb
* lib/gitlab/cycle_analytics/**/*.rb
* lib/gitlab/data_builder/**/*.rb
* lib/gitlab/database/**/*.rb
* lib/gitlab/dependency_linker/**/*.rb
* lib/gitlab/diff/**/*.rb
* lib/gitlab/downtime_check/**/*.rb
* lib/gitlab/email/**/*.rb
* lib/gitlab/etag_caching/**/*.rb
Partially addresses gitlab-org/gitlab-ce#47424 .
2018-11-06 22:47:32 -08:00
Kim Carlbäcker
1d50b6a4ad
Migrate CycleAnalytics::CommitCount to Gitaly
2018-06-11 12:59:11 +00:00
Jacob Vosmaer (GitLab)
edb9db37ed
Add "deny disk access" Gitaly feature (tripswitch)
2018-06-01 11:56:29 +00:00
Tiago Botelho
522f4b2c6a
Adapt cycle analytics spec helper and cycle analytics usage data spec
2018-03-01 16:43:26 +00:00
Tiago Botelho
335ee79a73
Refactors median code to work with both single and multiple projects
2018-02-28 10:46:20 +00:00
Tiago Botelho
3f31da9c69
Restrict cycle analytics usage data to instances that use postgres only
2018-02-28 10:46:20 +00:00
Tiago Botelho
41bb23ae1d
Restore memoization to base query and add a batch base query method
2018-02-28 10:46:20 +00:00
Tiago Botelho
4fcbcce364
Add BatchLoader as a way to refactor the base stage code
2018-02-28 10:46:20 +00:00
Tiago Botelho
7c109c5750
Refactor CycleAnalytics base stage class and model
2018-02-28 10:46:19 +00:00
Tiago Botelho
a7b3f11edd
Adds get all medians to Cycle Analytics model
2018-02-28 10:46:19 +00:00
Yorick Peterse
d0b8f536a1
Remove soft removals related code
...
This removes all usage of soft removals except for the "pending delete"
system implemented for projects. This in turn simplifies all the query
plans of the models that used soft removals. Since we don't really use
soft removals for anything useful there's no point in keeping it around.
This _does_ mean that hard removals of issues (which only admins can do
if I'm not mistaken) can influence the "iid" values, but that code is
broken to begin with. More on this (and how to fix it) can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/31114 .
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
2018-01-08 17:04:45 +01:00
Lin Jen-Shin
85be6d83be
Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
...
* upstream/master: (170 commits)
support ordering of project notes in notes api
Redirect to an already forked project if it exists
Reschedule the migration to populate fork networks
Create fork networks for forks for which the source was deleted.
Fix item name and namespace text overflow in Projects dropdown
Minor backport from EE
fix link that was linking to `html` instead of `md`
Backport epic tasklist
Add timeouts for Gitaly calls
SSHUploadPack over Gitaly is now OptOut
fix icon colors in commit list
Fix star icon color/stroke
Backport border inline edit
Add checkboxes to automatically run AutoDevops pipeline
BE for automatic pipeline when enabling Auto DevOps
I am certainly weary of debugging sidekiq but I don't think that's what was meant
Ensure MRs always use branch refs for comparison
Fix issue comment submit button disabled on GFM paste
Lock seed-fu at the correct version in Gemfile.lock
Improve indexes on merge_request_diffs
...
2017-11-30 15:20:00 +08:00
Sean McGivern
4ebbfe5d3e
Remove serialised diff and commit columns
...
The st_commits and st_diffs columns on merge_request_diffs historically held the
YAML-serialised data for a merge request diff, in a variety of formats.
Since 9.5, these have been migrated in the background to two new tables:
merge_request_diff_commits and merge_request_diff_files. That has the advantage
that we can actually query the data (for instance, to find out how many commits
we've stored), and that it can't be in a variety of formats, but must match the
new schema.
This is the final step of that journey, where we drop those columns and remove
all references to them. This is a breaking change to the importer, because we
can no longer import diffs created in the old format, and we cannot guarantee
the export will be in the new format unless it was generated after this commit.
2017-11-28 16:13:40 +00:00
Lin Jen-Shin
689658456f
Cache allowed_ids
2017-11-22 23:30:51 +08:00
Lin Jen-Shin
07d3d44775
Move ModuleWithInstanceVariables to Gitlab namespace
...
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
2017-11-22 17:06:57 +08:00
Lin Jen-Shin
0b6d01ed77
Just define allowed_ids and override it with empty value
...
if not needed for those sub-classes.
2017-11-22 17:06:57 +08:00
Lin Jen-Shin
9ac0c76b78
Use StrongMemoize and enable/disable cops properly
2017-11-18 01:01:53 +08:00
Lin Jen-Shin
6a4ee9aa71
Allow simple ivar ||= form. Update accordingly
2017-09-19 01:29:32 +08:00
Lin Jen-Shin
9ae92b8caa
Add cop to make sure we don't use ivar in a module
2017-09-18 21:23:45 +08:00
Alejandro Rodríguez
c21ae07e33
Refactor Gitlab::Git::Commit to include a repository
2017-08-07 22:34:34 -04:00
Sean McGivern
aff5c9f3e5
Add table for merge request commits
...
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.
Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
2017-07-06 17:36:10 +01:00
Grzegorz Bizon
0430b76441
Enable Style/DotPosition Rubocop 👮
2017-06-21 13:48:12 +00:00
Rémy Coutable
d40e1f547e
Enable the Style/TrailingCommaInLiteral cop
...
Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Ruben Davila
7f24b87b3b
Some small updates for Spanish translations.
2017-05-04 19:27:17 -05:00
Ruben Davila
7fd42698aa
Merge branch 'master' into 28433-internationalise-cycle-analytics-page
...
Conflicts:
lib/gitlab/cycle_analytics/review_stage.rb
lib/gitlab/cycle_analytics/staging_stage.rb
lib/gitlab/cycle_analytics/test_stage.rb
2017-05-04 18:51:18 -05:00
Douwe Maan
897f98cc9d
Fix wording of Cycle Analytics stage legends
2017-05-04 18:12:49 -05:00
Ruben Davila
dbd1bdaeed
More updates for translations plus some refactoring.
2017-05-03 21:08:43 -05:00
Ruben Davila
ee65de48d8
More translations updates.
2017-05-03 12:40:21 -05:00
Ruben Davila
e4526e061c
Add more translation for Spanish.
2017-04-26 20:04:33 -05:00
Jacob Schatz
12cd4c8360
Merge branch 'add-additional-checks-to-ca-data' into 'master'
...
Small improvements for Cycle Analytics
See merge request !9153
2017-02-18 18:52:43 +00:00
Alfredo Sumaran
d3ff2fa59b
Restore exposure of legend property for events
2017-02-10 16:17:44 -05:00
Alfredo Sumaran
7b20784715
Revert "Merge branch 'add-additional-checks-to-ca-data' into 'master'
"
...
This reverts commit b7c5ca499d
, reversing
changes made to 9745c98bb7
.
2017-02-10 15:21:45 -05:00
Alfredo Sumaran
ee698e9595
Restore exposure of legend property for events
2017-02-10 03:41:39 -05:00
James Lopez
1b7c186723
move query limit to base event fetcher
2017-02-06 16:23:55 +01:00
Grzegorz Bizon
6b3f52b46c
Fix cycle analytics code after improving serializers
2017-01-27 14:37:14 +01:00
James Lopez
1d775d9712
fix spec
2017-01-17 11:32:55 +01:00
James Lopez
150a448596
refactored a bunch of stuff based on feedback
2017-01-17 11:32:55 +01:00
James Lopez
1b220df56d
fix bug retrieving medians
2017-01-17 11:32:55 +01:00
James Lopez
30c6703f0a
fix specs
2017-01-17 11:32:55 +01:00
James Lopez
982d5a0506
refactored metrics fetcher - merged into stage and events
2017-01-17 11:32:55 +01:00
James Lopez
834bcacbae
fix refactor of production event fetcher
2017-01-17 11:32:55 +01:00
James Lopez
bbb9f84082
a few more fixes
2017-01-17 11:32:55 +01:00
James Lopez
056b0f1993
fix missing refactor in metrics fetcher
2017-01-17 11:32:55 +01:00
James Lopez
099aa124eb
fix plan stage issue and some spec failures
2017-01-17 11:32:55 +01:00
James Lopez
3f681f4cef
fix specs, refactor missing bits from events stuff
2017-01-17 11:32:55 +01:00
James Lopez
b214be493d
big refactor based on MR feedback
2017-01-17 11:32:55 +01:00
James Lopez
58dddcdfed
few fixes after merge
2017-01-17 11:32:55 +01:00
James Lopez
69ecd951a9
refactor fetcher and fixed specs
2017-01-17 11:32:55 +01:00
James Lopez
b805666984
refactor cycle analytics - updated based on MR feedback
2017-01-17 11:32:55 +01:00
James Lopez
a67311cb4c
Fix other spec failures
2017-01-17 11:32:55 +01:00
James Lopez
02e1e48192
more refactoring and fixing old specs
2017-01-17 11:32:54 +01:00
James Lopez
fc6f8f2056
added new summary serializers and refactor all of the summary stuff into separate logical classes
2017-01-17 11:32:54 +01:00
James Lopez
dc6ea14b0d
fixed stage entity and added missing stage specs
2017-01-17 11:32:54 +01:00
James Lopez
a998276223
added analytics stage serializer and moved some info to the stage classes from the controller
2017-01-17 11:32:54 +01:00
James Lopez
3268e37791
WIP - started refactoring cycle analytics median stuff into stages
2017-01-17 11:32:54 +01:00
James Lopez
b938aa5cc8
Fix and relevant spec for plan stage breaking with nil commits
2016-11-23 09:10:04 +01:00
James Lopez
9b69168858
refactored a couple of things based on feedback
2016-11-21 14:09:26 +01:00
James Lopez
0fd397bba1
Added permissions per stage to cycle analytics endpoint
2016-11-21 10:49:05 +01:00
James Lopez
f5b792e22e
refactored updater and updated specs
2016-11-18 13:00:38 +01:00
James Lopez
cb353d655b
added new build updater, specs and refactored allowed_ids
2016-11-18 12:05:29 +01:00
James Lopez
cd222357ad
refactor events
2016-11-18 10:13:42 +01:00
James Lopez
24c2aa39ad
fix blank state error
2016-11-17 20:54:02 +01:00
James Lopez
98773ef974
preload ids or objects for users, merge request and issues
2016-11-17 20:42:18 +01:00
James Lopez
d5b673da79
more refactoring and added some auth checks
2016-11-17 18:00:37 +01:00
James Lopez
9c995725ea
fix typo in error message
2016-11-17 15:05:13 +01:00
James Lopez
e22b5cca02
remove class no longer required
2016-11-17 15:00:56 +01:00
James Lopez
37a3505019
fix integration spec
2016-11-17 15:00:01 +01:00
James Lopez
af80fcb477
fix specs
2016-11-17 14:14:23 +01:00
James Lopez
ed39d61d74
refactor events facade so it uses separate classes and refactor query stuff
2016-11-17 13:22:27 +01:00
James Lopez
f9de157e70
fix date issue with mySQL only
2016-11-17 08:22:59 +01:00
James Lopez
9e0102e494
small refactor - removing includes no longer needed
2016-11-17 08:22:59 +01:00
James Lopez
cf2dcf043c
Refactor all query config stuff into separate classes and added specs
2016-11-17 08:22:59 +01:00
James Lopez
cbc9f0cd1a
fix issue with commits and also updated routes
2016-11-17 08:22:59 +01:00
James Lopez
ca6da6ea30
Renamed pipeline column and fixed permissions for builds in events controller
2016-11-17 08:22:58 +01:00
James Lopez
73e9ec6319
serialize all the things!
2016-11-17 08:22:58 +01:00
James Lopez
8743e59f78
get all stages to use serlalizers - apart from plan - WIP
2016-11-17 08:22:58 +01:00
James Lopez
f560099751
fix issue events and related spec - now using generic serializer for a hash
2016-11-17 08:22:58 +01:00
James Lopez
747e5c3b6f
use request to pass extra parameters
2016-11-17 08:22:58 +01:00
James Lopez
6a2737e6a8
WIP - refactor events to use a generic build entity for some of the hybrid events
2016-11-17 08:22:58 +01:00
James Lopez
3b179bc37b
WIP - refactored events to use build serializer, related spec passing
2016-11-17 08:22:58 +01:00
James Lopez
81d0146c4c
WIP - refactoring URL builder and events presenter into serializers
2016-11-17 08:22:58 +01:00
James Lopez
4dfcab6ec3
fix iid issue making spec to fail - MySQL only
2016-11-17 08:22:58 +01:00
James Lopez
848ea241db
fix MySQL problem with query
2016-11-17 08:22:58 +01:00
James Lopez
2e5c1c27eb
fix events presenter after refactoring
2016-11-17 08:22:58 +01:00
James Lopez
c6532ee370
refactored light url builder
2016-11-17 08:22:58 +01:00
James Lopez
7ac7cfeb75
refactored and added missing spec to light URL builder
2016-11-17 08:22:57 +01:00
James Lopez
83130ae877
Updated production events with new fields
2016-11-17 08:22:57 +01:00
James Lopez
beeb64610e
Refactored staging events, added missing fields and fixed specs
2016-11-17 08:22:57 +01:00
James Lopez
bd31f24c54
Added branch option to test events
...
Also fixed test events ordering issue
2016-11-17 08:22:57 +01:00
James Lopez
eccb6a5e92
Refactored test events
...
Now test events return the builds instead a list of pipelines to avoid calling pipeline.builds per each and get the info. Also, added missing fields/data, URLs, and fixed specs in events spec.
2016-11-17 08:22:57 +01:00
James Lopez
11bad33a42
added missing fields to code events and updated spec
2016-11-17 08:22:57 +01:00
James Lopez
1b5b2eac22
added missing fields to plan events and updated spec
2016-11-17 08:22:56 +01:00
James Lopez
8f7266cd4b
added missing fields to issue. Also, added a light url builder to add URLs easily from arel. Updated specs.
2016-11-17 08:22:56 +01:00
James Lopez
9ead268cfa
some more integration scenarios testing order. Also, fixed bug in the staging and test stages.
2016-11-17 08:22:56 +01:00
James Lopez
85c448d76f
fix specs
2016-11-17 08:22:56 +01:00
James Lopez
f9fd0ff1ca
Some refactoring - used class instead of hash for the query configuration
2016-11-17 08:22:56 +01:00
James Lopez
ca9ae8bf63
add email to user related queries so it can be used for displaying avatar in the UI
2016-11-17 08:22:56 +01:00
James Lopez
3cdc9af78e
added production events and related spec
2016-11-17 08:22:55 +01:00