<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/concerns/protected_ref.rb, branch remove-commit-tree</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>Remove 'dependent: :destroy' from ProtectedRef has_many :"#{type}_access_levels"</title>
<updated>2017-08-25T16:36:42+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jamedjo@gmail.com</email>
</author>
<published>2017-08-25T16:36:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bd1be9bb43fa08f79843fb786b61487a256f7c2c'/>
<id>bd1be9bb43fa08f79843fb786b61487a256f7c2c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '30634-protected-pipeline' into 'master'</title>
<updated>2017-07-25T15:04:23+00:00</updated>
<author>
<name>Kamil Trzciński</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2017-07-25T15:04:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ac948684fc9f4ded80a028ad2136cfbff90a4b45'/>
<id>ac948684fc9f4ded80a028ad2136cfbff90a4b45</id>
<content type='text'>
Implement "Block pipelines on protected branches"

Closes #30634, #34616, and #33130

See merge request !11910</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement "Block pipelines on protected branches"

Closes #30634, #34616, and #33130

See merge request !11910</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly define inverse of acces_level relations</title>
<updated>2017-07-25T09:26:22+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2017-07-02T15:02:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e13d75c38a09fca98dfbb52ef94119770b7a445a'/>
<id>e13d75c38a09fca98dfbb52ef94119770b7a445a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Eliminate N+1 queries on checking different protected refs</title>
<updated>2017-07-19T11:12:11+00:00</updated>
<author>
<name>Lin Jen-Shin</name>
<email>godfat@godfat.org</email>
</author>
<published>2017-07-19T11:12:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a397a0eb1a4c34c27175e2c4e68e7ceb43a81f02'/>
<id>a397a0eb1a4c34c27175e2c4e68e7ceb43a81f02</id>
<content type='text'>
I realized where the N+1 queries were actually coming from
project.protected_branches, but how come we cannot preload this,
or cache this at all?

Then I found that this is somehow a Rails limitation. What we're
doing before, eventually come to:

    project.protected_branches.matching

But why it's not cached? (project.protected_branches.loaded? is always
false) It's because matching is a class method, which is called on
the proxy. In this case, Rails cannot cache the result. I don't know
if this is possible to implement or not, because clearly this would
require some tricks to implement class methods on associations.

So instead, we could just pass project.protected_branches to
ProtectedRef.matching, then it would work regularly.

With this change, there's no more N+1 queries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I realized where the N+1 queries were actually coming from
project.protected_branches, but how come we cannot preload this,
or cache this at all?

Then I found that this is somehow a Rails limitation. What we're
doing before, eventually come to:

    project.protected_branches.matching

But why it's not cached? (project.protected_branches.loaded? is always
false) It's because matching is a class method, which is called on
the proxy. In this case, Rails cannot cache the result. I don't know
if this is possible to implement or not, because clearly this would
require some tricks to implement class methods on associations.

So instead, we could just pass project.protected_branches to
ProtectedRef.matching, then it would work regularly.

With this change, there's no more N+1 queries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added Cop to blacklist the use of `dependent:`</title>
<updated>2017-07-06T10:01:36+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-06-08T15:16:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8fbbf41e29f5e0f56b7eb9d37aadba856b68bcce'/>
<id>8fbbf41e29f5e0f56b7eb9d37aadba856b68bcce</id>
<content type='text'>
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport EE refactorings for Protected Tag EE-only functionality</title>
<updated>2017-05-31T12:06:29+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-05-05T15:59:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0c1bf16d5f347da60bb84027db209ffc7b02f601'/>
<id>0c1bf16d5f347da60bb84027db209ffc7b02f601</id>
<content type='text'>
Improvements and refactorings were made while adding role based permissions for protected tags to EE. This doesn’t backport the feature, but should improve code quality and minimize divergence.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improvements and refactorings were made while adding role based permissions for protected tags to EE. This doesn’t backport the feature, but should improve code quality and minimize divergence.
</pre>
</div>
</content>
</entry>
<entry>
<title>Protected Tags backend review changes</title>
<updated>2017-04-06T09:56:21+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-04-05T17:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f16377e7dc762462817dd0b34e36811c55988b10'/>
<id>f16377e7dc762462817dd0b34e36811c55988b10</id>
<content type='text'>
Added changelog</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added changelog</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed UserAccess#can_create_tag? after create_access_levels rename</title>
<updated>2017-04-04T02:50:15+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-04-04T02:50:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d85471ac1a4574053b057dd7cc02858d591a8ffd'/>
<id>d85471ac1a4574053b057dd7cc02858d591a8ffd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup &amp; tests for UserAccess#can_create_tag?</title>
<updated>2017-04-04T01:05:42+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-04-04T01:05:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1e15444ae6dda02744db42d08c817252953c7b1f'/>
<id>1e15444ae6dda02744db42d08c817252953c7b1f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed developers_can_push in RepoBranch API entity</title>
<updated>2017-04-04T00:39:34+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-04-04T00:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=90c8bb8301b4bc3268a5fa4ea8bddafbc29d6871'/>
<id>90c8bb8301b4bc3268a5fa4ea8bddafbc29d6871</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
