- 18 Sep, 2017 1 commit
-
-
Yorick Peterse authored
This removes the need for a default scope that adds a "WHERE project_id = X" clause. This commit also includes an additional index for Environment#last_deployment, ensuring this query uses just an index scan instead of also applying a Filter. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877
-
- 13 Sep, 2017 1 commit
-
-
Yorick Peterse authored
When querying the deployments of an environment the query Rails produces will be along the lines of the following: SELECT * FROM deployments WHERE environment_id = X For queries such as this (or queries that use this as their base and add more conditions) there is no meaningful index that can be used as long as deployments.project_id is not part of a WHERE clause. To work around this we change that "has_many :deployments" relation to always add a "WHERE project_id = X" condition. This means that queries filtering deployments can make better use of the existing indexes. For example, when filtering by deployments.iid this will result in the following query: SELECT * FROM deployments WHERE environment_id = X AND project_id = Y AND iid = Z This means PostgreSQL can use the existing index on (project_id, environment_id, iid) instead of having to use a different index (or none at all) and having to scan over a large amount of data. Query plan wise this means that instead of this query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..14465.75 rows=1 width=117) (actual time=6.394..38.048 rows=1 loops=1) Index Cond: (iid = 225) Filter: (environment_id = 5) Rows Removed by Filter: 839 Buffers: shared hit=4534 Planning time: 0.076 ms Execution time: 38.073 ms We produce the following query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225 AND deployments.project_id = 1292351; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..4.45 rows=1 width=117) (actual time=0.018..0.018 rows=1 loops=1) Index Cond: ((project_id = 1292351) AND (iid = 225)) Filter: (environment_id = 5) Buffers: shared hit=4 Planning time: 0.088 ms Execution time: 0.039 ms On GitLab.com these changes result in a (roughly) 11x improvement in SQL timings for the CI environment status endpoint. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877
-
- 08 Sep, 2017 1 commit
-
-
Kamil Trzciński authored
Do not use `location.pathname` when accessing environments folders See merge request !2147
-
- 25 Aug, 2017 1 commit
-
-
Lin Jen-Shin authored
So that whenever we want to reserve more, we're aware, and don't mess it up.
-
- 06 Jul, 2017 1 commit
-
-
Yorick Peterse authored
This is allowed for existing instances so we don't end up 76 offenses right away, but for new code one should _only_ use this if they _have_ to remove non database data. Even then it's usually better to do this in a service class as this gives you more control over how to remove the data (e.g. in bulk).
-
- 05 Jul, 2017 1 commit
-
-
Douwe Maan authored
-
- 27 Jun, 2017 1 commit
-
-
Z.J. van de Weg authored
As its hard to reliably check how many review apps there are on the clients machine, we start by checking where the type is `review`. This means the folder is called that way. This will lead to a seq scan on the table. However, this is done once a week, so the benefit of adding an index seems not to apply here.
-
- 21 Jun, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 16 Jun, 2017 1 commit
-
-
Pawel Chojnacki authored
-
- 12 Jun, 2017 1 commit
-
-
Z.J. van de Weg authored
Fixes gitlab-org/gitlab-ce#33106
-
- 07 Jun, 2017 1 commit
-
-
Pawel Chojnacki authored
-
- 06 Jun, 2017 1 commit
-
-
Pawel Chojnacki authored
-
- 31 May, 2017 1 commit
-
-
Z.J. van de Weg authored
-
- 25 May, 2017 2 commits
-
-
Pawel Chojnacki authored
-
Pawel Chojnacki authored
Additional metrics initial work, with working metrics listing, but without actoual metrics mesurements
-
- 22 May, 2017 1 commit
-
-
Z.J. van de Weg authored
For the index view, the environments can now be requested every 15 seconds. Any transition state of a projects environments will trigger a cache invalidation action. Fixes gitlab-org/gitlab-ce#31701
-
- 12 May, 2017 1 commit
-
-
Z.J. van de Weg authored
For the index view, the environments can now be requested every 15 seconds. Any transition state of a projects environments will trigger a cache invalidation action. Fixes gitlab-org/gitlab-ce#31701
-
- 11 May, 2017 1 commit
-
-
Pawel Chojnacki authored
- Tests for prometheus queries - fix rubocop warnings - Remove unused method. Add more queries to deployment queries. - Wrap BaseQuery in module hierarchy Renname Prometheus class to PrometheusClient
-
- 10 May, 2017 1 commit
-
-
Rémy Coutable authored
Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 12 Apr, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 06 Apr, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 07 Mar, 2017 1 commit
-
-
Kamil Trzciński authored
-
- 23 Feb, 2017 2 commits
-
-
Douwe Maan authored
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
-
Douwe Maan authored
-
- 13 Feb, 2017 1 commit
-
-
winniehell authored
-
- 07 Feb, 2017 1 commit
-
-
Douwe Maan authored
-
- 06 Feb, 2017 4 commits
-
-
Douwe Maan authored
-
Douwe Maan authored
-
Douwe Maan authored
-
Kamil Trzcinski authored
-
- 23 Jan, 2017 1 commit
-
-
Nick Thomas authored
-
- 09 Jan, 2017 1 commit
-
-
Toon Claes authored
For Cycle Analytics, the environment `production` is treated as a special case, and used to update the `first_deployed_to_production_at` metric. With the Review Apps changes, slash syntax is used to group related environments in the list. This is mostly used for `review/<branch>` environments, but it's possible for people to have multiple production environments, and someone might then want to group them like `production/eu`, `production/us`, or even just make it look prettier with `production/www.example.com`. In any of these cases, the first deploy to one of these `production/*` environments now is treated as a Production deploy.
-
- 19 Dec, 2016 1 commit
-
-
Nick Thomas authored
-
- 15 Dec, 2016 2 commits
-
-
Nick Thomas authored
-
Nick Thomas authored
-
- 06 Dec, 2016 1 commit
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 21 Nov, 2016 2 commits
-
-
Kamil Trzcinski authored
-
Kamil Trzcinski authored
-
- 16 Nov, 2016 2 commits
-
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-