File tree 7 files changed +20
-2
lines changed
7 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
KBase Feeds Service
2
2
3
+ ### Version 1.0.3
4
+ * The MongoDB clients have been updated to the most recent version.
5
+ * Added the mongo-retrywrites configuration setting in deployment.cfg.templ, defaulting to false.
6
+ * Migrated from Travis CI to GitHub Actions (GHA) for CI/CD workflows.
7
+ * Updated Python version to 3.7.13.
8
+
3
9
### Version 1.0.2
4
10
- Add a cache for bad tokens so they aren't looked up over and over. Maxes out at 10000, then throws out the oldest bad token.
5
11
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ db-host = {{ default .Env.db_host "ci-mongo" }}
11
11
db-port = {{ default .Env .db_port " 27017" }}
12
12
db-user = {{ default .Env .db_user " feedsserv" }}
13
13
db-pw = {{ default .Env .db_pw " fake_password" }}
14
+ db-retrywrites={{ default .Env .db_retrywrites " false" }}
14
15
15
16
# admins are allowed to use their auth tokens to create global notifications.
16
17
# examples would be notices about KBase downtime or events.
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ db-port=6379
12
12
db-user=
13
13
db-pw=
14
14
15
+ # Whether to enable ('true') the MongoDB retryWrites parameter or not (anything other than 'true').
16
+ # See https://www.mongodb.com/docs/manual/core/retryable-writes/
17
+ db-retrywrites=false
18
+
15
19
# Service urls
16
20
auth-url=https://ci.kbase.us/services/auth
17
21
workspace-url=https://ci.kbase.us/services/ws
Original file line number Diff line number Diff line change 15
15
KEY_DB_PW = "db-pw"
16
16
KEY_DB_NAME = "db-name"
17
17
KEY_DB_ENGINE = "db-engine"
18
+ KEY_DB_RETRYWRITES = "db-retrywrites"
18
19
KEY_GLOBAL_FEED = "global-feed"
19
20
KEY_DEBUG = "debug"
20
21
KEY_LIFESPAN = "lifespan"
@@ -60,6 +61,7 @@ def __init__(self):
60
61
self .db_user = self ._get_line (cfg , KEY_DB_USER , required = False )
61
62
self .db_pw = self ._get_line (cfg , KEY_DB_PW , required = False )
62
63
self .db_name = self ._get_line (cfg , KEY_DB_NAME , required = False )
64
+ self .db_retrywrites = self ._get_line (cfg , KEY_DB_RETRYWRITES , required = False ) == "true"
63
65
self .global_feed = self ._get_line (cfg , KEY_GLOBAL_FEED )
64
66
self .global_feed_type = "user" # doesn't matter, need a valid Entity type...
65
67
try :
Original file line number Diff line number Diff line change 33
33
log_error
34
34
)
35
35
36
- VERSION = "1.0.2 "
36
+ VERSION = "1.0.3 "
37
37
38
38
try :
39
39
from feeds import gitcommit
Original file line number Diff line number Diff line change @@ -99,8 +99,9 @@ def __init__(self):
99
99
port = self .cfg .db_port ,
100
100
username = self .cfg .db_user ,
101
101
password = self .cfg .db_pw ,
102
+ retryWrites = self .cfg .db_retrywrites ,
102
103
authSource = self .cfg .db_name
103
- )
104
+ )
104
105
self .db = self .conn [self .cfg .db_name ]
105
106
self ._setup_indexes ()
106
107
self ._setup_schema ()
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ service-narrative=narrativeservice
20
20
service-jobs =jobsservice
21
21
service-kbase =kbase
22
22
23
+ # Whether to enable ('true') the MongoDB retryWrites parameter or not (anything other than 'true').
24
+ # See https://www.mongodb.com/docs/manual/core/retryable-writes/
25
+ db-retrywrites =false
26
+
23
27
[test]
24
28
mongo-exe =/usr/local/bin/mongod
25
29
test-temp-dir =./test-temp-dir
You can’t perform that action at this time.
0 commit comments