- 23 11月, 2017 1 次提交
-
-
由 Sean McGivern 提交于
Compared to the merge_request_diff association: 1. It's simpler to query. The query uses a foreign key to the merge_request_diffs table, so no ordering is necessary. 2. It's faster for preloading. The merge_request_diff association has to load every diff for the MRs in the set, then discard all but the most recent for each. This association means that Rails can just query for N diffs from N MRs. 3. It's more complicated to update. This is a bidirectional foreign key, so we need to update two tables when adding a diff record. This also means we need to handle this as a special case when importing a GitLab project. There is some juggling with this association in the merge request model: * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff. * `MergeRequest#merge_request_diff` reuses `MergeRequest#latest_merge_request_diff` unless: * Arguments are passed. These are typically to force-reload the association. * It doesn't exist. That means we might be trying to implicitly create a diff. This only seems to happen in specs. * The association is already loaded. This is important for the reasons explained in the comment, which I'll reiterate here: if we a) load a non-latest diff, then b) get its `merge_request`, then c) get that MR's `merge_request_diff`, we should get the diff we loaded in c), even though that's not the latest diff. Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases, but not quite all.
-
- 22 11月, 2017 1 次提交
-
-
由 Yorick Peterse 提交于
This changes Ci::Pipeline#latest_builds_with_artifacts so it returns an Array instead of a relation. Whenever we use this data we do so in two steps: 1. Count the number of rows 2. If this number is greater than 0, iterate over the rows By returning an Array instead we only execute 1 query of which the total time/work is less than running either just a COUNT(*) or both queries (in the worst case). On GitLab.com this change should save us a few milliseconds per request to ProjectsController#show.
-
- 17 11月, 2017 1 次提交
-
-
由 Jacopo 提交于
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
-
- 16 11月, 2017 1 次提交
-
-
由 Yorick Peterse 提交于
This adds an optimised way of getting the latest pipeline status for a list of Commit objects (or just a single one).
-
- 09 11月, 2017 1 次提交
-
-
由 Lin Jen-Shin 提交于
Without this fix, pipeline could go from skipped to running directly, bypassing the transition for: [:created, :pending] => :running And this is responsible for setting up started_at. Without this fix, started_at would never be set. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/39884
-
- 08 11月, 2017 1 次提交
-
-
由 Douwe Maan 提交于
Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us
-
- 07 11月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 06 11月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 27 10月, 2017 1 次提交
-
-
由 Zeger-Jan van de Weg 提交于
Now, when requesting a commit from the Repository model, the results are not cached. This means we're fetching the same commit by oid multiple times during the same request. To prevent us from doing this, we now cache results. Caching is done only based on object id (aka SHA). Given we cache on the Repository model, results are scoped to the associated project, eventhough the change of two repositories having the same oids for different commits is small.
-
- 22 10月, 2017 1 次提交
-
-
由 Nick Thomas 提交于
-
- 21 10月, 2017 1 次提交
-
-
由 Nick Thomas 提交于
-
- 06 10月, 2017 1 次提交
-
-
由 Alessio Caiazza 提交于
-
- 05 10月, 2017 7 次提交
-
-
由 Alessio Caiazza 提交于
-
由 Zeger-Jan van de Weg 提交于
-
由 Grzegorz Bizon 提交于
-
由 Grzegorz Bizon 提交于
Conflicts: app/models/ci/pipeline.rb
-
由 Grzegorz Bizon 提交于
-
由 Grzegorz Bizon 提交于
-
由 Grzegorz Bizon 提交于
-
- 04 10月, 2017 1 次提交
-
-
由 Eric Eastwood 提交于
-
- 03 10月, 2017 2 次提交
-
-
由 Zeger-Jan van de Weg 提交于
-
由 Alessio Caiazza 提交于
-
- 02 10月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 01 10月, 2017 2 次提交
-
-
由 Shinya Maeda 提交于
-
由 Shinya Maeda 提交于
-
- 30 9月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 28 9月, 2017 2 次提交
-
-
由 Shinya Maeda 提交于
-
由 Shinya Maeda 提交于
-
- 27 9月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 26 9月, 2017 1 次提交
-
-
由 Shinya Maeda 提交于
-
- 25 9月, 2017 3 次提交
-
-
由 Tomasz Maczukin 提交于
-
由 Grzegorz Bizon 提交于
-
由 Shinya Maeda 提交于
-
- 18 9月, 2017 2 次提交
-
-
由 Grzegorz Bizon 提交于
-
由 Grzegorz Bizon 提交于
Use project full path that can be received from a pipeline object
-
- 14 9月, 2017 1 次提交
-
-
由 Yorick Peterse 提交于
This ensures that if a pipeline is present for the last commit on a project's homepage we only run 1 query to get the builds, instead of running 2 queries. See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878#note_40073339 for more information.
-
- 13 9月, 2017 3 次提交
-
-
由 Maxim Rydkin 提交于
-
由 Maxim Rydkin 提交于
-
由 Maxim Rydkin 提交于
-
- 07 9月, 2017 1 次提交
-
-
由 Kamil Trzcinski 提交于
-