- Fixes #2488 
- Adds a k8s api call to set `suspend=false` on Job when associated
CrawlJob is finished.
- bump version - released as 1.14.5
This commit is contained in:
Ilya Kreymer 2025-03-19 10:06:25 -07:00 committed by GitHub
parent d2601a037e
commit eb300815a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 20 additions and 6 deletions

View File

@ -280,6 +280,18 @@ class K8sAPI:
traceback.print_exc() traceback.print_exc()
return {"error": str(exc)} return {"error": str(exc)}
async def unsuspend_k8s_job(self, name) -> dict:
"""unsuspend k8s Job"""
try:
await self.batch_api.patch_namespaced_job(
name=name, namespace=self.namespace, body={"spec": {"suspend": False}}
)
return {"success": True}
# pylint: disable=broad-except
except Exception as exc:
traceback.print_exc()
return {"error": str(exc)}
async def print_pod_logs(self, pod_names, lines=100): async def print_pod_logs(self, pod_names, lines=100):
"""print pod logs""" """print pod logs"""
for pod in pod_names: for pod in pod_names:

View File

@ -42,6 +42,8 @@ class CronJobOperator(BaseOperator):
"completionTime": finished, "completionTime": finished,
} }
self.run_task(self.k8s.unsuspend_k8s_job(metadata.get("name")))
return MCDecoratorSyncResponse( return MCDecoratorSyncResponse(
attachments=[], attachments=[],
# set on job to match default behavior when job finishes # set on job to match default behavior when job finishes

View File

@ -1,3 +1,3 @@
"""current version""" """current version"""
__version__ = "1.14.4" __version__ = "1.14.5"

View File

@ -5,7 +5,7 @@ type: application
icon: https://webrecorder.net/assets/icon.png icon: https://webrecorder.net/assets/icon.png
# Browsertrix and Chart Version # Browsertrix and Chart Version
version: v1.14.4 version: v1.14.5
dependencies: dependencies:
- name: btrix-admin-logging - name: btrix-admin-logging

View File

@ -103,7 +103,7 @@ replica_deletion_delay_days: 0
# API Image # API Image
# ========================================= # =========================================
backend_image: "docker.io/webrecorder/browsertrix-backend:1.14.4" backend_image: "docker.io/webrecorder/browsertrix-backend:1.14.5"
backend_pull_policy: "Always" backend_pull_policy: "Always"
backend_password_secret: "PASSWORD!" backend_password_secret: "PASSWORD!"
@ -161,7 +161,7 @@ backend_avg_memory_threshold: 95
# Nginx Image # Nginx Image
# ========================================= # =========================================
frontend_image: "docker.io/webrecorder/browsertrix-frontend:1.14.4" frontend_image: "docker.io/webrecorder/browsertrix-frontend:1.14.5"
frontend_pull_policy: "Always" frontend_pull_policy: "Always"
frontend_cpu: "10m" frontend_cpu: "10m"

View File

@ -1,6 +1,6 @@
{ {
"name": "browsertrix-frontend", "name": "browsertrix-frontend",
"version": "1.14.4", "version": "1.14.5",
"main": "index.ts", "main": "index.ts",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {

View File

@ -1 +1 @@
1.14.4 1.14.5