<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/workers, branch implement-feature-flags-plugin</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>CE port for pipelines for external pull requests</title>
<updated>2019-09-05T14:53:48+00:00</updated>
<author>
<name>Fabio Pitino</name>
<email>fpitino@gitlab.com</email>
</author>
<published>2019-08-09T09:40:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ca6a1f33f91a8cceadebfb9c4e9ac6afa340f71d'/>
<id>ca6a1f33f91a8cceadebfb9c4e9ac6afa340f71d</id>
<content type='text'>
Detect if pipeline runs for a GitHub pull request

When using a mirror for CI/CD only we register a pull_request
webhook. When a pull_request webhook is received, if the
source branch SHA matches the actual head of the branch in the
repository we create immediately a new pipeline for the
external pull request. Otherwise we store the
pull request info for when the push webhook is received.

When using "only/except: external_pull_requests" we can detect
if the pipeline has a open pull request on GitHub and create or
not the job based on that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detect if pipeline runs for a GitHub pull request

When using a mirror for CI/CD only we register a pull_request
webhook. When a pull_request webhook is received, if the
source branch SHA matches the actual head of the branch in the
repository we create immediately a new pipeline for the
external pull request. Otherwise we store the
pull request info for when the push webhook is received.

When using "only/except: external_pull_requests" we can detect
if the pipeline has a open pull request on GitHub and create or
not the job based on that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary freeze in app</title>
<updated>2019-09-04T18:10:43+00:00</updated>
<author>
<name>Dinesh Panda</name>
<email>dineshpanda92@gmail.com</email>
</author>
<published>2019-09-04T18:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=773eadbef650eccac77a1949163581f1312fefea'/>
<id>773eadbef650eccac77a1949163581f1312fefea</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 'master' into 'master'</title>
<updated>2019-08-23T12:39:44+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-08-23T12:39:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fcfd12e0fc51987c9f8c4eb95f080970d0fd64b7'/>
<id>fcfd12e0fc51987c9f8c4eb95f080970d0fd64b7</id>
<content type='text'>
Reduce dedup calls to gc only

See merge request gitlab-org/gitlab-ce!32083</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduce dedup calls to gc only

See merge request gitlab-org/gitlab-ce!32083</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce dedup calls to gc only</title>
<updated>2019-08-22T03:39:03+00:00</updated>
<author>
<name>Boris Krylov</name>
<email>krylovbv@mail.ru</email>
</author>
<published>2019-08-22T03:39:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b0231f48676c84b26fab26a5c43b996c66c1924d'/>
<id>b0231f48676c84b26fab26a5c43b996c66c1924d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid conflicts between ArchiveTraceWorkers</title>
<updated>2019-08-22T03:28:12+00:00</updated>
<author>
<name>Shinya Maeda</name>
<email>shinya@gitlab.com</email>
</author>
<published>2019-08-01T12:05:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d78f0724d9cc3dd7c1f22cef54ad59f8d2b579c4'/>
<id>d78f0724d9cc3dd7c1f22cef54ad59f8d2b579c4</id>
<content type='text'>
This commits avoiding conflicts between ArchiveTraceWorker
and ArchiveTracesCronWorker by changing the target of the
latter worker.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commits avoiding conflicts between ArchiveTraceWorker
and ArchiveTracesCronWorker by changing the target of the
latter worker.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'dm-process-commit-worker-n+1' into 'master'</title>
<updated>2019-08-16T20:26:38+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-08-16T20:26:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=971e040c00a14d7fbdfed5f45d6978a2c6b4f4f5'/>
<id>971e040c00a14d7fbdfed5f45d6978a2c6b4f4f5</id>
<content type='text'>
Look up upstream commits once before queuing ProcessCommitWorkers

Closes #65464

See merge request gitlab-org/gitlab-ce!31871</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Look up upstream commits once before queuing ProcessCommitWorkers

Closes #65464

See merge request gitlab-org/gitlab-ce!31871</pre>
</div>
</content>
</entry>
<entry>
<title>Expire project caches once per push instead of once per ref</title>
<updated>2019-08-16T19:53:56+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-08-16T19:53:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f14647fdae4a07c3c59665576b70f847ab866c58'/>
<id>f14647fdae4a07c3c59665576b70f847ab866c58</id>
<content type='text'>
Previously `ProjectCacheWorker` would be scheduled once per ref, which
would generate unnecessary I/O and load on Sidekiq, especially if many
tags or branches were pushed at once. `ProjectCacheWorker` would expire
three items:

1. Repository size: This only needs to be updated once per push.
2. Commit count: This only needs to be updated if the default branch
   is updated.
3. Project method caches: This only needs to be updated if the default
   branch changes, but only if certain files change (e.g. README,
   CHANGELOG, etc.).

Because the third item requires looking at the actual changes in the
commit deltas, we schedule one `ProjectCacheWorker` to handle the first
two cases, and schedule a separate `ProjectCacheWorker` for the third
case if it is needed. As a result, this brings down the number of
`ProjectCacheWorker` jobs from N to 2.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52046
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously `ProjectCacheWorker` would be scheduled once per ref, which
would generate unnecessary I/O and load on Sidekiq, especially if many
tags or branches were pushed at once. `ProjectCacheWorker` would expire
three items:

1. Repository size: This only needs to be updated once per push.
2. Commit count: This only needs to be updated if the default branch
   is updated.
3. Project method caches: This only needs to be updated if the default
   branch changes, but only if certain files change (e.g. README,
   CHANGELOG, etc.).

Because the third item requires looking at the actual changes in the
commit deltas, we schedule one `ProjectCacheWorker` to handle the first
two cases, and schedule a separate `ProjectCacheWorker` for the third
case if it is needed. As a result, this brings down the number of
`ProjectCacheWorker` jobs from N to 2.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52046
</pre>
</div>
</content>
</entry>
<entry>
<title>Look up upstream commits once before queuing ProcessCommitWorkers</title>
<updated>2019-08-16T18:31:48+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@selenight.nl</email>
</author>
<published>2019-08-16T18:26:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=97c2564ffac057f1830d008269f90afa9e12f815'/>
<id>97c2564ffac057f1830d008269f90afa9e12f815</id>
<content type='text'>
Instead of checking if a commit already exists in the upstream project
in its ProcessCommitWorker and bailing out if it does, we check the
existence of all commits in bulk in Git::BranchHooksService, so that we
can skip scheduling ProcessCommitWorker jobs for those commits
that already exist upstream entirely.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of checking if a commit already exists in the upstream project
in its ProcessCommitWorker and bailing out if it does, we check the
existence of all commits in bulk in Git::BranchHooksService, so that we
can skip scheduling ProcessCommitWorker jobs for those commits
that already exist upstream entirely.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add usage pings for source code pushes</title>
<updated>2019-08-13T22:33:16+00:00</updated>
<author>
<name>Igor</name>
<email>idrozdov@gitlab.com</email>
</author>
<published>2019-08-13T22:33:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=04598039a53c452df9b1a30404f2abbe46f8e229'/>
<id>04598039a53c452df9b1a30404f2abbe46f8e229</id>
<content type='text'>
Source Code Usage Ping for Create SMAU
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Source Code Usage Ping for Create SMAU
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework retry strategy for remote mirrors</title>
<updated>2019-08-13T20:52:01+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@gitlab.com</email>
</author>
<published>2019-08-13T20:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=452bc36d603ed89d3fa5e3409338dd905230bd2f'/>
<id>452bc36d603ed89d3fa5e3409338dd905230bd2f</id>
<content type='text'>
**Prevention of running 2 simultaneous updates**

Instead of using `RemoteMirror#update_status` and raise an error if
it's already running to prevent the same mirror being updated at the
same time we now use `Gitlab::ExclusiveLease` for that.

When we fail to obtain a lease in 3 tries, 30 seconds apart, we bail
and reschedule. We'll reschedule faster for the protected branches.

If the mirror already ran since it was scheduled, the job will be
skipped.

**Error handling: Remote side**

When an update fails because of a `Gitlab::Git::CommandError`, we
won't track this error in sentry, this could be on the remote side:
for example when branches have diverged.

In this case, we'll try 3 times scheduled 1 or 5 minutes apart.

In between, the mirror is marked as "to_retry", the error would be
visible to the user when they visit the settings page.

After 3 tries we'll mark the mirror as failed and notify the user.

We won't track this error in sentry, as it's not likely we can help
it.

The next event that would trigger a new refresh.

**Error handling: our side**

If an unexpected error occurs, we mark the mirror as failed, but we'd
still retry the job based on the regular sidekiq retries with
backoff. Same as we used to

The error would be reported in sentry, since its likely we need to do
something about it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Prevention of running 2 simultaneous updates**

Instead of using `RemoteMirror#update_status` and raise an error if
it's already running to prevent the same mirror being updated at the
same time we now use `Gitlab::ExclusiveLease` for that.

When we fail to obtain a lease in 3 tries, 30 seconds apart, we bail
and reschedule. We'll reschedule faster for the protected branches.

If the mirror already ran since it was scheduled, the job will be
skipped.

**Error handling: Remote side**

When an update fails because of a `Gitlab::Git::CommandError`, we
won't track this error in sentry, this could be on the remote side:
for example when branches have diverged.

In this case, we'll try 3 times scheduled 1 or 5 minutes apart.

In between, the mirror is marked as "to_retry", the error would be
visible to the user when they visit the settings page.

After 3 tries we'll mark the mirror as failed and notify the user.

We won't track this error in sentry, as it's not likely we can help
it.

The next event that would trigger a new refresh.

**Error handling: our side**

If an unexpected error occurs, we mark the mirror as failed, but we'd
still retry the job based on the regular sidekiq retries with
backoff. Same as we used to

The error would be reported in sentry, since its likely we need to do
something about it.
</pre>
</div>
</content>
</entry>
</feed>
