<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/db, branch docs/api-nil</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Merge branch 'remove-mr-diff-serialised-columns' into 'master'</title>
<updated>2017-11-29T13:33:06+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-11-29T13:33:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=124fa93a8a36f3835d2fae3ef50b1b5403df153d'/>
<id>124fa93a8a36f3835d2fae3ef50b1b5403df153d</id>
<content type='text'>
Remove serialised diff and commit columns

Closes #39533

See merge request gitlab-org/gitlab-ce!15582</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove serialised diff and commit columns

Closes #39533

See merge request gitlab-org/gitlab-ce!15582</pre>
</div>
</content>
</entry>
<entry>
<title>Reschedule the migration to populate fork networks</title>
<updated>2017-11-29T11:12:55+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2017-11-24T14:52:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e03d4a2096f2d32dbb51d427ae99dfb6d49e6a00'/>
<id>e03d4a2096f2d32dbb51d427ae99dfb6d49e6a00</id>
<content type='text'>
Rescheduling will make sure the fork networks with a deleted source
project are created.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rescheduling will make sure the fork networks with a deleted source
project are created.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add timeouts for Gitaly calls</title>
<updated>2017-11-29T09:12:12+00:00</updated>
<author>
<name>Andrew Newdigate</name>
<email>andrew@gitlab.com</email>
</author>
<published>2017-11-29T09:12:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=64e5f996fa01d2e9c8462cfbb647997531eaf6c7'/>
<id>64e5f996fa01d2e9c8462cfbb647997531eaf6c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve indexes on merge_request_diffs</title>
<updated>2017-11-28T16:13:57+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-11-24T10:11:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=484ae2ee2db58a641d3c3fff36f46b431ce450df'/>
<id>484ae2ee2db58a641d3c3fff36f46b431ce450df</id>
<content type='text'>
For getting the SHAs from an MR to find pipelines, we get the last 100 MR diffs
for the MR, and find commits from those. This was un-indexed before, because the
index was not a composite index on merge_request_diff_id, id. Changing that
means that this scope can exclusively use indexes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For getting the SHAs from an MR to find pipelines, we get the last 100 MR diffs
for the MR, and find commits from those. This was un-indexed before, because the
index was not a composite index on merge_request_diff_id, id. Changing that
means that this scope can exclusively use indexes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove serialised diff and commit columns</title>
<updated>2017-11-28T16:13:40+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-11-21T16:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4ebbfe5d3e0dbe06346ee0c64a8f62ec11f9b6e8'/>
<id>4ebbfe5d3e0dbe06346ee0c64a8f62ec11f9b6e8</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix defaults for MR states and merge statuses</title>
<updated>2017-11-24T13:28:41+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-11-24T13:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4beacdb2ca6ea884473cb63aee603951df7f2da1'/>
<id>4beacdb2ca6ea884473cb63aee603951df7f2da1</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'use-merge-requests-diff-id-column' into 'master'</title>
<updated>2017-11-23T15:01:30+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2017-11-23T15:01:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ad70fb7bdc7a95f99267e88335b2241d6c9feff0'/>
<id>ad70fb7bdc7a95f99267e88335b2241d6c9feff0</id>
<content type='text'>
Use foreign key to get latest MR diff

Closes #37631

See merge request gitlab-org/gitlab-ce!15126</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use foreign key to get latest MR diff

Closes #37631

See merge request gitlab-org/gitlab-ce!15126</pre>
</div>
</content>
</entry>
<entry>
<title>Allow password authentication to be disabled entirely</title>
<updated>2017-11-23T13:16:14+00:00</updated>
<author>
<name>Markus Koller</name>
<email>markus-koller@gmx.ch</email>
</author>
<published>2017-11-23T13:16:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=257fd5713485a05460a9170190100643199a7e48'/>
<id>257fd5713485a05460a9170190100643199a7e48</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use latest_merge_request_diff association</title>
<updated>2017-11-23T12:14:56+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-11-15T17:22:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=991bf24ec8890eca248a00deb4f33f309c9ffb83'/>
<id>991bf24ec8890eca248a00deb4f33f309c9ffb83</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove cluster_id from 20171013104327_migrate_gcp_clusters_to_new_clusters_architectures</title>
<updated>2017-11-23T11:42:20+00:00</updated>
<author>
<name>Shinya Maeda</name>
<email>shinya@gitlab.com</email>
</author>
<published>2017-11-23T10:01:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fd83bb033839a4305f6594a136f745b0389b9f1c'/>
<id>fd83bb033839a4305f6594a136f745b0389b9f1c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
