<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/merge_request_diff.rb, branch performance-bar-sql</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>Move `fetch_ref` from MergeRequestDiff#ensure_commit_shas to MergeRequest</title>
<updated>2017-10-05T08:48:25+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2017-09-22T15:46:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=67de21c15bd8bb24667a4d8bfa259406165a909e'/>
<id>67de21c15bd8bb24667a4d8bfa259406165a909e</id>
<content type='text'>
MergeRequest#create_merge_request_diff and MergeRequest#reload_diff are
the only places where we generate a new MR diff so that's where we
should fetch the ref.

This also ensures that the ref is not fetched when we call
merge_request.merge_request_diffs.create in
Github::Import#fetch_pull_requests.

Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MergeRequest#create_merge_request_diff and MergeRequest#reload_diff are
the only places where we generate a new MR diff so that's where we
should fetch the ref.

This also ensures that the ref is not fetched when we call
merge_request.merge_request_diffs.create in
Github::Import#fetch_pull_requests.

Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Keep only the changes that are known to work well</title>
<updated>2017-10-05T08:48:25+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2017-09-22T11:37:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=324f672eefcd3db1337d51f5137dd085c4697c8c'/>
<id>324f672eefcd3db1337d51f5137dd085c4697c8c</id>
<content type='text'>
Also, improved a bit the method names in
Github::Representation::PullRequest.

Last but not least, ensure temp branch names doesn't contain a `/` as
this would create the ref in a subfolder in `refs/heads` (e.g.
`refs/heads/gh-123/456/rymai/foo`), and would leave empty directories
upon branch deletion (e.g. `refs/heads/gh-123/456/rymai/`.

Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, improved a bit the method names in
Github::Representation::PullRequest.

Last but not least, ensure temp branch names doesn't contain a `/` as
this would create the ref in a subfolder in `refs/heads` (e.g.
`refs/heads/gh-123/456/rymai/foo`), and would leave empty directories
upon branch deletion (e.g. `refs/heads/gh-123/456/rymai/`.

Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fetch and map refs/pull to refs/merge-requests in the GH import</title>
<updated>2017-10-05T08:48:25+00:00</updated>
<author>
<name>James Lopez</name>
<email>james@jameslopez.es</email>
</author>
<published>2017-08-24T08:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=149adcd1206ba3bebd20401bf45ef7e67ec690fb'/>
<id>149adcd1206ba3bebd20401bf45ef7e67ec690fb</id>
<content type='text'>
update MR diff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
update MR diff
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor Gitlab::Git::Commit to include a repository</title>
<updated>2017-08-08T02:34:34+00:00</updated>
<author>
<name>Alejandro Rodríguez</name>
<email>alejorro70@gmail.com</email>
</author>
<published>2017-07-25T20:48:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c21ae07e331ca14605410555d0582f14cb661bb6'/>
<id>c21ae07e331ca14605410555d0582f14cb661bb6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate MR commits and diffs to new tables</title>
<updated>2017-08-03T12:20:26+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-07-03T14:48:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f2d50af917b878a98e06b994ac32c0718f3d0b78'/>
<id>f2d50af917b878a98e06b994ac32c0718f3d0b78</id>
<content type='text'>
Previously, we stored these as serialised fields - `st_{commits,diffs}` - on the
`merge_request_diffs` table. These now have their own tables -
`merge_request_diff_{commits,diffs}` - with a column for each attribute of the
serialised data.

Add a background migration to go through the existing MR diffs and migrate them
to the new format. Ignore any contents that cannot be displayed. Assuming that
we have 5 million rows to migrate, and each batch of 2,500 rows can be
completed in 5 minutes, this will take about 7 days to migrate everything.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we stored these as serialised fields - `st_{commits,diffs}` - on the
`merge_request_diffs` table. These now have their own tables -
`merge_request_diff_{commits,diffs}` - with a column for each attribute of the
serialised data.

Add a background migration to go through the existing MR diffs and migrate them
to the new format. Ignore any contents that cannot be displayed. Assuming that
we have 5 million rows to migrate, and each batch of 2,500 rows can be
completed in 5 minutes, this will take about 7 days to migrate everything.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix saving diffs that are not valid UTF-8</title>
<updated>2017-07-26T14:34:57+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-07-25T16:57:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=396b8f91ec47ffb5a02ebf6d713ef4cbf04f1f94'/>
<id>396b8f91ec47ffb5a02ebf6d713ef4cbf04f1f94</id>
<content type='text'>
Previously, we used Psych, which would:

1. Check if a string was encoded as binary, and not ASCII-compatible.
2. Add the !binary tag in that case.
3. Convert to base64.

We need to do the same thing, using a new column in place of the tag.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we used Psych, which would:

1. Check if a string was encoded as binary, and not ASCII-compatible.
2. Add the !binary tag in that case.
3. Convert to base64.

We need to do the same thing, using a new column in place of the tag.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add table for merge request commits</title>
<updated>2017-07-06T16:36:10+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-06-16T14:00:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=aff5c9f3e5ecdd9eee2b2b60ab6367da878582fc'/>
<id>aff5c9f3e5ecdd9eee2b2b60ab6367da878582fc</id>
<content type='text'>
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename ActiverecordSerialize cop</title>
<updated>2017-07-06T10:01:36+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-07-03T14:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e1a3bf30b6ea04f2c658729f65a0eb09847dd341'/>
<id>e1a3bf30b6ea04f2c658729f65a0eb09847dd341</id>
<content type='text'>
This cop has been renamed to ActiveRecordSerialize to match the way
"ActiveRecord" is usually written.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This cop has been renamed to ActiveRecordSerialize to match the way
"ActiveRecord" is usually written.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add table for files in merge request diffs</title>
<updated>2017-06-16T17:30:01+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2017-06-09T11:48:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=9a73b634ab4220f68a8296ccb582a68293874489'/>
<id>9a73b634ab4220f68a8296ccb582a68293874489</id>
<content type='text'>
This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.

It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:

* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.

It may have neither, if the diff is empty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.

It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:

* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.

It may have neither, if the diff is empty.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `Gitlab::Git::EncodingHelper` to `Gitlab::EncodingHelper`</title>
<updated>2017-06-01T21:21:14+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@gitlab.com</email>
</author>
<published>2017-06-01T21:21:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e564fe971f3dacb1a2a38ad984b865ae23e54400'/>
<id>e564fe971f3dacb1a2a38ad984b865ae23e54400</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
