- Feb 09, 2018
-
-
Gregory Stark authored
-
Gregory Stark authored
-
Gregory Stark authored
-
Gregory Stark authored
-
- Feb 08, 2018
-
-
Gregory Stark authored
Artifacts are in the middle of being migrated from ci_builds to ci_job_artifacts. The expiration date is currently visible in both of these tables and the test for whether an expired artifact is present for a job is complex as it requires checking both the of the tables. Add two new indexes, one on ci_builds.artifacts_expire_at and one on ci_job_artifacts.expire_at to enable finding expired artifacts efficiently. And until the migration is finished, replace the SQL for finding expired and non-expired artifacts with a hand-crafted UNION ALL based query instead of using OR. This overcomes a database optimizer limitation that prevents it from using these indexes. When the migration is finished the next version should remove this query and replace it with a much simpler query on just ci_job_artifacts. See https://gitlab.com/gitlab-org/gitlab-ce/issues/42561 for followup.
-
- Feb 07, 2018
-
-
Dylan Griffith authored
-
- Feb 06, 2018
-
-
Shinya Maeda authored
-
- Jan 31, 2018
-
-
Takuya Noguchi authored
-
- Jan 26, 2018
-
-
Matija Čupić authored
-
- Jan 14, 2018
-
-
Stan Hu authored
This should reduce the number of SQL queries and lookups needed to look up a project of a build and pipeline and vice versa. Before: ``` [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse? => false [2] pry(main)> Project.reflect_on_association(:builds).has_inverse? => false [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse? => false [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse? => :project ``` After: ``` [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse? => :builds [2] pry(main)> Project.reflect_on_association(:builds).has_inverse? => :project [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse? => :pipelines [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse? => :project ```
-
- Jan 05, 2018
-
-
Grzegorz Bizon authored
-
- Jan 04, 2018
-
-
Matija Čupić authored
-
Matija Čupić authored
-
- Dec 22, 2017
-
-
Matija Čupić authored
-
- Dec 14, 2017
-
-
Shinya Maeda authored
-
- Dec 07, 2017
-
-
Shinya Maeda authored
-
- Dec 06, 2017
-
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
Use Class.new(StandardError) instead of custom extended error class. Bring back specified_dependencies?.
-
Shinya Maeda authored
-
- Dec 05, 2017
-
-
Kamil Trzcińśki authored
-
- Dec 03, 2017
-
-
Kamil Trzcińśki authored
-
Kamil Trzcińśki authored
-
Kamil Trzcińśki authored
-
Kamil Trzcińśki authored
-
Kamil Trzcińśki authored
This reverts commit 714082e65304ae2ec5c5400c59a68ab63e724aa9.
-
Kamil Trzcińśki authored
-
Kamil Trzcińśki authored
-
Zeger-Jan van de Weg authored
-
Kamil Trzcińśki authored
-
Zeger-Jan van de Weg authored
Two things at ones, as there was no clean way to seperate the commit and give me feedback from the tests. But the model Artifact is now JobArtifact, and the table does not have a type anymore, but the metadata is now its own model: Ci::JobArtifactMetadata.
-
Zeger-Jan van de Weg authored
To allow jobs/builds to have multiple artifacts, and to start seperating concerns from Ci::Build a new model is created: Ci::Artifact. Changes include the updating of the ArtifactUploader to adapt to a slightly different interface. The uploader expects to be initialized with a `Ci::Build`. Futher a migration with the minimal fields, the needed foreign keys and an index. Last, the way this works is by prepending a module to Ci::Build so we can basically override behaviour but if needed use `super` to get the original behaviour.
-
- Nov 27, 2017
-
-
Kamil Trzcińśki authored
-
- Nov 23, 2017
-
-
Sean McGivern authored
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.
-
- Nov 16, 2017
-
-
Jacopo authored
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
-
- Nov 06, 2017
-
-
Shinya Maeda authored
-
Shinya Maeda authored
-
- Oct 06, 2017
-
-
Alessio Caiazza authored
-