Commit graph

351 commits

Author SHA1 Message Date
Marcin Kuzminski
f1497f5afd caches: new cache context managers.
- deprecate beaker cache completly
- use new cache decorators from dogpile
- use a proper per cache key invalidation
2018-08-02 18:04:52 +02:00
Marcin Kuzminski
ecff3dbaed security: update lastactivity when on audit logs.
- The previous update on each call was to expensive and created lot of DB locks in high traffic env
2018-07-31 22:52:44 +02:00
Marcin Kuzminski
099f68a724 pull-requests: make the renderer stored and saved for each pull requests.
- gives backward compatability with previous versions which didn't set renderer
- allows versioning of renderer changes
2018-07-17 14:45:29 +02:00
Marcin Kuzminski
e837d13757 db-migration: added a helper to manage versions. 2018-07-17 12:38:42 +02:00
Marcin Kuzminski
c4e1783d4f notifications: use an explicit FK mark when creating notifications, previous way was prone to cache problems. 2018-07-16 19:07:27 +02:00
Marcin Kuzminski
84d673d387 caches: use dogpile for sql_cache_short region. 2018-07-12 17:20:03 +02:00
Marcin Kuzminski
91f5c6e707 review-rules: allow regex syntax for more flexiblity on writing rule patterns 2018-07-11 18:44:35 +02:00
Marcin Kuzminski
5c59ec640b db: don't use md5 for cache key calculation. Md5 is now fully deprecated. 2018-07-03 14:35:21 +02:00
Marcin Kuzminski
96f4dbe23b db: use base table args for all models defined. 2018-07-02 14:14:58 +02:00
Marcin Kuzminski
c10b510fb0 last-update: use smarter calculation that picks the newer dates first
instead of relying dumply on last commit date which in some cases might be very very old.
2018-06-21 18:14:30 +02:00
Marcin Kuzminski
42c80fe075 shadow-repos: use numeric repo id for creation of shadow repos.
- Fixes a problem after rename or move into repository group.
2018-06-21 14:04:06 +02:00
Marcin Kuzminski
5df4647bd0 shadow-repos: check if path to shadow repo existing before trying to call SCM object.
- sometimes cleanups of shadow repos can occur. We should fail only if shadow repo path
is there, and we can create a repo object from it.
2018-06-17 12:55:27 +02:00
Marcin Kuzminski
b59e2e9485 db: adjust beaker_cache column size. If this column is created via Beaker itself it uses
BLOB for mysql, this can cause some issues with cache sizes not fitting.

We move the creation into our script, then it uses proper size.
2018-04-18 16:32:20 +02:00
Marcin Kuzminski
aad1f972c6 diff-cache: show safe relative path where cached diffs are stored. 2018-04-18 17:19:40 +02:00
Marcin Kuzminski
ea287e0d07 diff-caches: show count and size in caches view per repository. 2018-04-18 16:52:40 +02:00
Marcin Kuzminski
3949688b3d api: enable setting sync flag for user groups on create/edit. 2018-03-28 13:27:21 +02:00
Marcin Kuzminski
718c2f6c44 reviewers: fixed logic with wildcard match for branches. 2018-02-15 23:52:31 +01:00
Marcin Kuzminski
c2c94c7f57 repositories: allow storing push url for automation. 2018-02-11 20:51:56 +01:00
Marcin Kuzminski
8e1c8a63ca models: drop unused is_valid method. 2018-02-01 17:58:57 +01:00
Marcin Kuzminski
9c22bde88e ui: allow selecting and specifing ssh clone url.
- fixes #5340
2018-01-25 14:20:08 +01:00
Marcin Kuzminski
ce187718c6 db-models: fix missing JsonRaw import. 2018-01-22 19:08:16 +01:00
Marcin Kuzminski
00b45c1fa7 release: update copyright year to 2018 2018-01-19 17:13:16 +01:00
Marcin Kuzminski
6f2703e4af default-reviewers: introduce new voting rule logic that allows
defining vote rules for user groups assigned to the default reviewers.

- allows to set per number votes on user groups
- group reviewers by groups
- store the rules and show them in the UI
- fixes #5409
2018-01-19 12:38:25 +01:00
Marcin Lulek
15fff6dafd repository: fixed a bug when scoped token was attached to repository, admins were unable to remove that repository. 2018-01-19 13:20:42 +01:00
Marcin Kuzminski
4eb2164498 default-reviewers: changes for source/target branch distinction and new rule name.
- since reasons is bigger now we'll hide those and toggle on view.
2017-12-05 00:09:44 +01:00
Marcin Kuzminski
5b740dd3fb tasks: added a periodic task for repo maintenance. Fixes #5202 2017-12-04 19:24:48 +01:00
Marcin Kuzminski
f9f80e3ff9 feed-token, user, performance: lazy load the feed_token. We only need it for
scope of web requests. For vcs operations, we don't need it.

- 20ms to load this can save up much time for SVN requests.
2017-12-04 12:14:01 +01:00
Marcin Kuzminski
cb8a7fccde scheduler: added DB models and db parsers for the RhodeCode scheduler.
- migration schema
- small fixes for form templates
- migrated celeryloader utils for the scheduler
2017-11-28 18:26:11 +01:00
Marcin Kuzminski
0899dabc8b db-models: fix usage of import *.
- usage of import * is discourage and should be limited.
2017-11-26 17:19:34 +01:00
Marcin Kuzminski
339cab81cd db: reduce size of fingerprint column for mysql compat.
- we can get into troubles by having long fingerprint under mysql
because we do an index on this column.
2017-11-07 11:07:51 +01:00
Marcin Kuzminski
686c51c8d7 quick-filter: make sure we always apply IN filter query. Otherwise we can
end up iwth empty query which disables the ACL filter.
2017-10-12 21:37:23 +02:00
Marcin Kuzminski
7781eabe94 auth: use cache_ttl from a plugin to also cache permissions.
- this gives a 30% speed increase in operations like svn commit
- generally uses the same mechanismy like auth cache to cache permissions for faster
access to vcs commands
2017-10-07 10:02:39 +02:00
Marcin Kuzminski
b505377197 users: ported controllers from pylons into pyramid views. 2017-09-20 22:29:34 +02:00
Marcin Kuzminski
30a23f9ca6 audit-logs: ensure nullable FK IDs for mysql 2017-09-21 13:19:38 +02:00
Marcin Kuzminski
b95e835ebb audit-logs: allow showing individual entries for audit log. 2017-09-21 16:47:10 +02:00
Marcin Lulek
f42a5ca66b db: use LONGTEXT for mysql in user_logs. Fixes #5385, problem with mysql rejecting
insert because of too long json data.

- simple case of lots of users in user group can cause mysql to fail on insert
2017-09-12 13:35:35 +02:00
Marcin Kuzminski
395cf5ac23 permissions: use same way of sorting of user_group permissions like user ones.
- makes the display of objects in permission summary nicer to look at
2017-08-24 22:28:28 +02:00
Marcin Kuzminski
a9f61590e0 user/user-groups: show if users or user groups are a part of review rules.
- cascade delete when deleting those so we still can remove the user or user group
- fixes #5377
2017-08-24 21:01:22 +02:00
Marcin Kuzminski
b7c17b192d ssh: added ssh key management into my account. 2017-08-19 17:47:01 +02:00
Marcin Kuzminski
aca661a15e goto-switcher: optimized performance and query capabilities.
- Previous implementation had on significant bug. The use of LIMIT 20
was limiting results BEFORE auth checks. In case of large ammount of similarly
named repositories user didn't had access too, the result goto search was empty.

This was becuase first 20 items fetched didn't pass permission checks and final
auth list was empty.

To fix this we now use proper filtering for auth using SQL. It means we first check
user allowed repositories, and add this as a filter so end result from database is already
to only the accessible repositories.
2017-08-16 22:46:34 +02:00
Marcin Kuzminski
ee0e7c21f8 users: make AuthUser propert a method, and allow override of params. 2017-08-03 20:17:46 +02:00
Marcin Kuzminski
35cefa9b2d users: added SSH key management for user admin pages 2017-08-03 16:35:13 +02:00
Marcin Kuzminski
384dcf30c0 db: use consistent order of auth-tokens and emails when fetching those from user. 2017-07-27 18:13:25 +02:00
Marcin Kuzminski
42d56172a4 user-groups: moved the display of user group into a pyramid view 2017-07-27 18:56:31 +02:00
Marcin Kuzminski
ae8340ad2a db: use a wrapper on pull requests _last_merge_status to ensure this is always INT.
- after upgrade of sqlalchemy this is casted to Long
- for backward compat we cast it as Int
2017-07-26 12:16:25 +02:00
Marcin Kuzminski
78e4f7d2f1 db: removed two redundant indexes found by never sqlalchemy 2017-07-26 07:45:42 +02:00
Marcin Kuzminski
4de255d013 core: no longer rely on webob exception inside get_or_404 function.
- relly on pyramid exc only
- helps reduce number of appenlight problems with 404 handling via webob
2017-07-25 15:26:38 +02:00
Marcin Kuzminski
3f26df9f37 user: deprecated usage of api_keys.
- additionally we don't load secrets as they are never used (and are expensive to fetch)
- simplify fetching of details improves performance
2017-07-25 16:27:08 +02:00
Marcin Kuzminski
4f16a9a411 repository-groups: introduce last change for repository groups. 2017-07-20 12:59:53 +02:00
Daniel Dourvaris
7add053ff8 users: add additional information why user with pending reviews shouldn't be deleted. 2017-07-13 22:40:12 +02:00