browsertrix/backend/btrixcloud
Tessa Walsh 38f32f11ea
Enforce quota and hard cap for monthly execution minutes (#1284)
Fixes #1261 Closes #1092

The quota for monthly execution minutes is treated as a hard cap. Once
it is exceeded, an alert indicating that an org has exceeded its monthly
execution minutes will display and the user will be unable to start new
crawls. Any running crawls will be stopped once the quota is exceeded.

An execution minutes meter bar is also added in the Org Dashboard and
displayed if a quota is set. More detail in #1305 which was
merged into this branch.

## Changes

- Enable setting 'maxExecMinutesPerMonth' in orgs list quotas by superadmin
- Enforce quota by stopping crawls in operator once quota is reached
- Show alert banner once execution time quota is hit:
- Once quota is hit, disable Run Crawl buttons in frontend, return 403
message with `exec_minutes_quota_reached` detail in backend from
crawl config `/run` endpoint, and don't run new workflows on creation
(similar to storage quota)
- Display execution time for crawls in the crawl details overview,
immediately below
- Show execution minutes meter on dashboard (from #1305)

---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Co-authored-by: sua yoo <sua@webrecorder.org>
2023-10-26 15:38:51 -07:00
..
migrations User refactor + remove fastapi_users dependency + update fastapi (#1290) 2023-10-18 10:49:23 -07:00
templates Track pod resource usage, detect OOM crashes, handle auto-scaling (#1235) 2023-10-05 20:41:18 -07:00
__init__.py
auth.py More stringent UUID types for user input / avoid 500 errors (#1309) 2023-10-25 15:15:53 -04:00
basecrawls.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
colls.py Storage Ops Refactor (#1257) 2023-10-10 15:04:23 -07:00
crawlconfigs.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
crawlmanager.py More stringent UUID types for user input / avoid 500 errors (#1309) 2023-10-25 15:15:53 -04:00
crawls.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
db.py User refactor + remove fastapi_users dependency + update fastapi (#1290) 2023-10-18 10:49:23 -07:00
emailsender.py Check for empty string for SMTP password (#1317) 2023-10-26 09:44:55 -07:00
invites.py User refactor + remove fastapi_users dependency + update fastapi (#1290) 2023-10-18 10:49:23 -07:00
k8sapi.py Track pod resource usage, detect OOM crashes, handle auto-scaling (#1235) 2023-10-05 20:41:18 -07:00
main_op.py Update user names in crawls and workflows after username update (#1299) 2023-10-19 23:34:49 -07:00
main.py Update user names in crawls and workflows after username update (#1299) 2023-10-19 23:34:49 -07:00
models.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
operator.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
orgs.py Enforce quota and hard cap for monthly execution minutes (#1284) 2023-10-26 15:38:51 -07:00
pagination.py
profiles.py More stringent UUID types for user input / avoid 500 errors (#1309) 2023-10-25 15:15:53 -04:00
storages.py Storage ops followup type checking (#1274) 2023-10-11 14:03:00 -07:00
uploads.py More stringent UUID types for user input / avoid 500 errors (#1309) 2023-10-25 15:15:53 -04:00
users.py More stringent UUID types for user input / avoid 500 errors (#1309) 2023-10-25 15:15:53 -04:00
utils.py Add slugs to org backend (#1250) 2023-10-10 18:30:09 -07:00
version.py version: update to 1.8.0-beta.0 2023-10-17 18:06:55 -07:00
webhooks.py Provide full resources in archived items finished webhooks (#1308) 2023-10-23 19:01:58 -07:00
zip.py Fix: Stream log downloading from WACZ (#1225) 2023-09-28 18:54:52 -07:00