Skip to content

Commit d61a98e

Browse files
tw4likreymer
andauthored
Upgrade to mongo 6 and use sortArray for workflow crawls (#764)
* Upgrade to mongo 6 and use for workflow crawls * re-add readiness probe with timeouts doubled, and failure threshold increased for slower 'mongosh' readiness check * bump version to 1.4.1 for patch release --------- Co-authored-by: Ilya Kreymer <[email protected]>
1 parent 631c84e commit d61a98e

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

ansible/playbooks/do_setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
register: db_check
3232

3333
- name: d_ocean | db | create mongodb database
34-
ansible.builtin.command: doctl databases create {{ db_name }} --region {{ droplet_region }} --engine mongodb --version 5 --output json
34+
ansible.builtin.command: doctl databases create {{ db_name }} --region {{ droplet_region }} --engine mongodb --version 6 --output json
3535
async: 1800
3636
poll: 60
3737
register: db_create_result

backend/btrixcloud/crawlconfigs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,9 @@ async def get_crawl_configs(
528528
{
529529
"$set": {
530530
"sortedCrawls": {
531-
"$function": {
532-
# pylint: disable=line-too-long
533-
"body": "function(arr) {return arr.sort((a,b) => (a.finished > b.finished) ? -1 : ((b.finished > a.finished) ? 1 : 0));}",
534-
"args": ["$finishedCrawls"],
535-
"lang": "js",
531+
"$sortArray": {
532+
"input": "$finishedCrawls",
533+
"sortBy": {"finished": -1},
536534
}
537535
}
538536
}

backend/btrixcloud/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
""" current version """
2-
__version__ = "1.4.0"
2+
__version__ = "1.4.1"

chart/templates/mongo.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,19 @@ spec:
101101
cpu: {{ .Values.mongo_requests_cpu }}
102102
memory: {{ .Values.mongo_requests_memory }}
103103

104-
# reenable for now with mongo 5.0.x
104+
# should work with 6.0.x with longer timeout
105105
readinessProbe:
106-
timeoutSeconds: 10
106+
timeoutSeconds: 20
107+
periodSeconds: 40
108+
initialDelaySeconds: 5
107109
successThreshold: 1
108-
failureThreshold: 2
110+
failureThreshold: 5
109111
exec:
110112
command:
111-
- mongo
113+
- mongosh
112114
- --eval
113115
- db.adminCommand('ping')
116+
- --quiet
114117

115118
---
116119
apiVersion: v1

chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ mongo_local: true
9999

100100
mongo_host: "local-mongo.default"
101101

102-
mongo_image: "docker.io/library/mongo:5.0.11"
102+
mongo_image: "docker.io/library/mongo:6.0.5"
103103
mongo_pull_policy: "IfNotPresent"
104104

105105
mongo_requests_cpu: "12m"

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "browsertrix-frontend",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"main": "index.ts",
55
"license": "AGPL-3.0-or-later",
66
"dependencies": {

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0
1+
1.4.1

0 commit comments

Comments
 (0)