Skip to content

Tags: sogaoh/sourcegraph

Tags

v3.4.0-rc.7

Toggle v3.4.0-rc.7's commit message

v3.4.0-rc.6

Toggle v3.4.0-rc.6's commit message
schema: Remove exclude.pattern from gitolite

This was accidently copied from the Bitbucket Server schema.

Fixes sourcegraph#4109

v3.4.0-rc.5

Toggle v3.4.0-rc.5's commit message
Added trailing commas for root level items in external services (sour…

…cegraph#4099)

Fixes sourcegraph#4078 and sourcegraph#4087

v3.4.0-rc.2

Toggle v3.4.0-rc.2's commit message
repo-updater: Increase batch when fetching Bitbucket Server repos (so…

…urcegraph#4037)

A customer reported performance issues when saving their external
service configuration for Bitbucket Server (which contains 10s of
thousands of repos)

I successfully replicated the issue locally by generating 20k artificial
Bitbucket Server repos in my local Bitbucket server instance and could
narrow the problem down to the syncer, which took several minutes to
fully fetch all 20k repos.

We're already using batching when fetching BB Server repos, but the
batch size is 100. (see [0])

According to the docs (see [1]) the maximum batch size is set by the
site administrator of the BB Server instance and the the default value
for `page.max.repositories` is `1000` (see [2])

So in this commit we set the default batch size to 1000.

[0]: https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/repo-updater/repos/bitbucketserver.go#L269:29
[1]: https://docs.atlassian.com/bitbucket-server/rest/5.7.0/bitbucket-rest.html#paging-params
[2]: https://confluence.atlassian.com/bitbucketserver/bitbucket-server-config-properties-776640155.html#BitbucketServerconfigproperties-Paging

v3.4.0-rc.1

Toggle v3.4.0-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix issue where management console password would reset on user accou…

…nt creation (sourcegraph#4014)

* fix issue where management console password would reset on user account creation

This fixes a highly annoying (but NOT a security risk) issue where the management
console password would incorrectly be reset to a newly generated secure password
each time a user account was created.

This issue accurately describes the problem in detail: https://github.com/sourcegraph/sourcegraph/issues/3201

The fix here is the quick and easily verifiable one: we carry over the result from
the prior row, so that all rows in the table have the same mgmt console password
fields.

A separate issue (and higher risk to make, which is why I am not doing it now) is
to correct this code such that it does not create duplicate entries in the
`global_state` table. This is tricky to do because there is a high risk of
introducing performance regressions as every Sourcegraph action goes through this
initalization check. If memory serves me correctly, duplicate entries was a known
property of the implementation at the time this code was written in order to avoid
locking the table and harming perf but thought to not be a concern (clearly
incorrectly, as we the site_id field also changes regularly which harms our metrics
in small various ways according to Dan).

This is a safe, good, incremental change to make (famous last words).

Helps sourcegraph#3201

After merge, that issue will become:

- "Cleanup global_state DB code to remove duplicate entries and prevent site_id from changing"

* CHANGELOG

* globalstatedb: ORDER BY site_id in all cases so we are not relying on natural disk ordering

* Revert "globalstatedb: ORDER BY site_id in all cases so we are not relying on natural disk ordering"

This reverts commit 7dd3971.