From 9d08af3a8860a530d029309935b2940ee354b189 Mon Sep 17 00:00:00 2001 From: Flowcept CI Bot Date: Fri, 10 Jul 2026 16:07:51 +0000 Subject: [PATCH 1/4] Flowcept CI Bot: bumping master version --- resources/sample_settings.yaml | 2 +- src/flowcept/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sample_settings.yaml b/resources/sample_settings.yaml index a479141e..291ad57c 100644 --- a/resources/sample_settings.yaml +++ b/resources/sample_settings.yaml @@ -1,4 +1,4 @@ -flowcept_version: 0.10.8 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. +flowcept_version: 1.0.1 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. project: debug: true # Toggle debug mode. This will add a property `debug: true` to all saved data, making it easier to retrieve/delete them later. diff --git a/src/flowcept/version.py b/src/flowcept/version.py index bbabfd06..75ad9f5c 100644 --- a/src/flowcept/version.py +++ b/src/flowcept/version.py @@ -10,4 +10,4 @@ # ❗❗❗ Once again: DO NOT CHANGE THIS FILE ❗❗❗ # ✋⚠️⛔❗❗❗ STOP! DANGER!!ONEONEELEVEN! Did you carefully read the warning above?! :) -__version__ = "1.0.0" +__version__ = "1.0.1" From ebe4f2a4f6255e891dd3bb5fbae1f646f1fda6fc Mon Sep 17 00:00:00 2001 From: Flowcept CI Bot Date: Mon, 13 Jul 2026 21:01:39 +0000 Subject: [PATCH 2/4] Flowcept CI Bot: bumping master version --- resources/sample_settings.yaml | 2 +- src/flowcept/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sample_settings.yaml b/resources/sample_settings.yaml index 291ad57c..26705841 100644 --- a/resources/sample_settings.yaml +++ b/resources/sample_settings.yaml @@ -1,4 +1,4 @@ -flowcept_version: 1.0.1 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. +flowcept_version: 1.0.2 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. project: debug: true # Toggle debug mode. This will add a property `debug: true` to all saved data, making it easier to retrieve/delete them later. diff --git a/src/flowcept/version.py b/src/flowcept/version.py index 75ad9f5c..4f345788 100644 --- a/src/flowcept/version.py +++ b/src/flowcept/version.py @@ -10,4 +10,4 @@ # ❗❗❗ Once again: DO NOT CHANGE THIS FILE ❗❗❗ # ✋⚠️⛔❗❗❗ STOP! DANGER!!ONEONEELEVEN! Did you carefully read the warning above?! :) -__version__ = "1.0.1" +__version__ = "1.0.2" From c000b10ea49659af6c5821b61918f3893bd46a92 Mon Sep 17 00:00:00 2001 From: Flowcept CI Bot Date: Mon, 20 Jul 2026 16:03:48 +0000 Subject: [PATCH 3/4] Flowcept CI Bot: bumping master version --- resources/sample_settings.yaml | 2 +- src/flowcept/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sample_settings.yaml b/resources/sample_settings.yaml index 26705841..497e08a4 100644 --- a/resources/sample_settings.yaml +++ b/resources/sample_settings.yaml @@ -1,4 +1,4 @@ -flowcept_version: 1.0.2 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. +flowcept_version: 1.0.3 # Version of the Flowcept package. Do not update this manually. The CI updates it. This setting file is compatible with this version. project: debug: true # Toggle debug mode. This will add a property `debug: true` to all saved data, making it easier to retrieve/delete them later. diff --git a/src/flowcept/version.py b/src/flowcept/version.py index 4f345788..43071010 100644 --- a/src/flowcept/version.py +++ b/src/flowcept/version.py @@ -10,4 +10,4 @@ # ❗❗❗ Once again: DO NOT CHANGE THIS FILE ❗❗❗ # ✋⚠️⛔❗❗❗ STOP! DANGER!!ONEONEELEVEN! Did you carefully read the warning above?! :) -__version__ = "1.0.2" +__version__ = "1.0.3" From bd0622bcc531a1bdf3bcbf76a47cd5333bfc6243 Mon Sep 17 00:00:00 2001 From: Jaime Cernuda Date: Tue, 8 Sep 2026 13:09:08 -0500 Subject: [PATCH 4/4] fix: escape dotted and dollar-prefixed keys in task upserts insert_and_update_many_tasks writes tasks through an aggregation-pipeline $set, which rejects '.' or a leading '$' in any nested key (server error 16412) and fails the whole bulk_write batch. Payload keys are now escaped with fullwidth lookalikes before building the update ops. --- .../commons/daos/docdb_dao/mongodb_dao.py | 24 ++++++++++++++++++- tests/doc_db_inserter/doc_db_inserter_test.py | 19 +++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/flowcept/commons/daos/docdb_dao/mongodb_dao.py b/src/flowcept/commons/daos/docdb_dao/mongodb_dao.py index ead79557..b8f0a3e1 100644 --- a/src/flowcept/commons/daos/docdb_dao/mongodb_dao.py +++ b/src/flowcept/commons/daos/docdb_dao/mongodb_dao.py @@ -34,6 +34,28 @@ from time import time, sleep +def _escape_key_dots(value): + """Escape '.' and leading '$' in nested dict keys. + + The task upsert uses an aggregation-pipeline ``$set``, which rejects such + keys anywhere in the document (server error 16412) and fails the whole + ``bulk_write`` batch. Escaped with the fullwidth lookalikes so the stored + document stays readable. + """ + if isinstance(value, dict): + out = {} + for k, v in value.items(): + if isinstance(k, str): + k = k.replace(".", ".") + if k.startswith("$"): + k = "$" + k[1:] + out[k] = _escape_key_dots(v) + return out + if isinstance(value, list): + return [_escape_key_dots(v) for v in value] + return value + + class MongoDBDAO(DocumentDBDAO): """ A data access object for MongoDB. @@ -303,7 +325,7 @@ def insert_and_update_many_tasks(self, doc_list: List[Dict], indexing_key=None) requests.append( UpdateOne( filter={indexing_key: indexing_key_value}, - update=[{"$set": indexed_buffer[indexing_key_value]}], + update=[{"$set": _escape_key_dots(indexed_buffer[indexing_key_value])}], upsert=True, ) ) diff --git a/tests/doc_db_inserter/doc_db_inserter_test.py b/tests/doc_db_inserter/doc_db_inserter_test.py index b66e9bf6..4b1407dd 100644 --- a/tests/doc_db_inserter/doc_db_inserter_test.py +++ b/tests/doc_db_inserter/doc_db_inserter_test.py @@ -98,6 +98,25 @@ def test_db_insert_and_update_many(self): c1 = self.doc_dao.count_tasks() assert c0 == c1 + def test_db_insert_with_dotted_keys(self): + """Tasks whose payload keys contain '.' or a leading '$' must still persist.""" + # Keys like a dataframe column named "yr.doy" inside a captured payload + # used to fail the whole bulk_write with server error 16412. + c0 = self.doc_dao.count_tasks() + uid = str(uuid4()) + docs = [ + { + "task_id": str(uuid4()), + "myid": uid, + "debug": True, + "status": "FINISHED", + "used": {"columns": {"yr.doy": 1, "$weird": "x"}}, + } + ] + assert self.doc_dao.insert_and_update_many_tasks(docs, "myid") is True + self.doc_dao.delete_task_keys("myid", [uid]) + assert self.doc_dao.count_tasks() == c0 + def test_status_updates(self): c0 = self.doc_dao.count_tasks() assert c0 >= 0