Age | Commit message (Collapse) | Author |
|
Fix migration for removing orphaned issues.moved_to_id values in MySQL and PostgreSQL
Closes #41498
See merge request gitlab-org/gitlab-ce!16141
(cherry picked from commit ff3e9af6fdac37ae71ea526bbb9aaf4b7d2ce876)
5cacdc4e Fix migration for removing orphaned issues.moved_to_id values in MySQL
dfdf22c7 Fix PostgreSQL implementation of migration
e97671b8 Simplify implementation and allow for batch updates in MySQL
|
|
migration for C
|
|
Fix missing WHERE clause in 20171106135924_issues_milestone_id_foreign_key migration
Closes gitlab-com/infrastructure#3416
See merge request gitlab-org/gitlab-ce!15997
|
|
Fix migration that removes issues.branch_name
See merge request gitlab-org/gitlab-ce!15858
|
|
'41041-undefined-method-new_project_guidelines_html-unable-to-load-from-cache' into 'master'
Resolve "undefined method `new_project_guidelines_html', unable to load from cache"
Closes #41041
See merge request gitlab-org/gitlab-ce!15878
(cherry picked from commit 2750d7e6606e91f608b9e379980e24f3a632cc5a)
3b860069 Clears the current Appearance cache otherwise it breaks since…
|
|
Allow git pull/push on project redirects
Closes #35385
See merge request gitlab-org/gitlab-ce!15670
(cherry picked from commit 2a181d68c810e89ff5d2e49999775d8b58adb394)
37c99562 Allow git pull/push on project redirects
64811239 Allow group/username transfers:
4344bba4 Fixes wrong condition on git access
b6bac528 Wrap ProjectMoved behavior into a class
70676e3b Fixes permanent migration
3328950e Moves allowed_path_validation up to Namespace
54900c4a Addreses ME review comments
740ed1e0 Add several improvements
6a0d9261 Add fixes based on MR suggestions
8a1a257b Ensures validations are only executed if RedirectRoute#permanent column exists
448f1c54 Fixes broken specs and suggestions on MR
da789af6 Add fixes based on MR comments
2bd96f5f Bump GITLAB_SHELL_VERSION to 5.10.2
75981dc4 Ensure RedirectRoute column information is flushed
|
|
Moving the check out of the general requests, makes sure we don't have
any slowdown in the regular requests.
To keep the process performing this checks small, the check is still
performed inside a unicorn. But that is called from a process running
on the same server.
Because the checks are now done outside normal request, we can have a
simpler failure strategy:
The check is now performed in the background every
`circuitbreaker_check_interval`. Failures are logged in redis. The
failures are reset when the check succeeds. Per check we will try
`circuitbreaker_access_retries` times within
`circuitbreaker_storage_timeout` seconds.
When the number of failures exceeds
`circuitbreaker_failure_count_threshold`, we will block access to the
storage.
After `failure_reset_time` of no checks, we will clear the stored
failures. This could happen when the process that performs the checks
is not running.
|
|
Add old files to uploads table
See merge request gitlab-org/gitlab-ce!15270
|
|
Add custom brand text on new project pages
Closes #15265
See merge request gitlab-org/gitlab-ce!15541
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
This will prevent our other migration for adding old files to the uploads table from breaking.
|
|
Remove serialised diff and commit columns
Closes #39533
See merge request gitlab-org/gitlab-ce!15582
|
|
|
|
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.
|
|
This ensures that merge_requests.state and merge_requests.merge_status
both have a proper default value and NOT NULL constraint on database
level. We also make sure to update any bogus rows first, without blowing
up the database.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/40534
|
|
Use foreign key to get latest MR diff
Closes #37631
See merge request gitlab-org/gitlab-ce!15126
|
|
|
|
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.
|
|
|
|
This updates the composite index on ci_pipelines (project_id, ref,
status) to also include the "id" column at the end. Adding this column
to the index drastically improves the performance of queries used for
getting the latest pipeline for a particular branch. For example, on
project dashboards we'll run a query like the following:
SELECT ci_pipelines.*
FROM ci_pipelines
WHERE ci_pipelines.project_id = 13083
AND ci_pipelines.ref = 'master'
AND ci_pipelines.status = 'success'
ORDER BY ci_pipelines.id DESC
LIMIT 1;
Limit (cost=0.43..58.88 rows=1 width=224) (actual time=26.956..26.956 rows=1 loops=1)
Buffers: shared hit=6544 dirtied=16
-> Index Scan Backward using ci_pipelines_pkey on ci_pipelines (cost=0.43..830922.89 rows=14216 width=224) (actual time=26.954..26.954 rows=1 loops=1)
Filter: ((project_id = 13083) AND ((ref)::text = 'master'::text) AND ((status)::text = 'success'::text))
Rows Removed by Filter: 6476
Buffers: shared hit=6544 dirtied=16
Planning time: 1.484 ms
Execution time: 27.000 ms
Because of the lack of "id" in the index we end up scanning over the
primary key index, then applying a filter to filter out any remaining
rows. The more pipelines a GitLab instance has the slower this will get.
By adding "id" to the mentioned composite index we can change the above
plan into the following:
Limit (cost=0.56..2.01 rows=1 width=224) (actual time=0.034..0.034 rows=1 loops=1)
Buffers: shared hit=5
-> Index Scan Backward using yorick_test on ci_pipelines (cost=0.56..16326.37 rows=11243 width=224) (actual time=0.033..0.033 rows=1 loops=1)
Index Cond: ((project_id = 13083) AND ((ref)::text = 'master'::text) AND ((status)::text = 'success'::text))
Buffers: shared hit=5
Planning time: 0.695 ms
Execution time: 0.061 ms
This in turn leads to a best-case improvement of roughly 25
milliseconds, give or take a millisecond or two.
|
|
We need to make sure merge_requests.source_project_id allows NULL values
_before_ updating rows as otherwise this will lead to a NOT NULL
constraint failing.
|
|
This adds various foreign keys and indexes to the "merge_requests" table
as outlined in https://gitlab.com/gitlab-org/gitlab-ce/issues/31825.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/31825
|
|
Adds Rubocop rule for line break after guard clause
Closes #18040
See merge request gitlab-org/gitlab-ce!15188
|
|
Restrict update column in batches for large tables
See merge request gitlab-org/gitlab-ce!15458
|
|
add_column_with_default is implemented in terms of update_column_in_batches, but
update_column_in_batches can be used independently. Neither of these should be
used on the specified large tables, because they will cause issues on large
instances like GitLab.com.
This also ignores the cop for all existing migrations, renaming
AddColumnWithDefaultToLargeTable where appropriate.
|
|
|
|
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
|
|
This adds various foreign key constraints, indexes, missing NOT NULL
constraints, and changes some column types from timestamp to
timestamptz.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/31811
|
|
|
|
|
|
Support custom attributes on groups and projects
See merge request gitlab-org/gitlab-ce!14593
|
|
|
|
|
|
|
|
|
|
36629-35958-add-cluster-application-section
|
|
|
|
|
|
|
|
|