deepfos 1.1.80__tar.gz → 1.1.82__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepfos-1.1.80 → deepfos-1.1.82}/CHANGELOG.md +14 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/PKG-INFO +1 -1
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/_version.py +3 -3
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/base.py +4 -1
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/edb.py +35 -3
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/constant.py +4 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/k8s.py +14 -10
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/serutils.py +39 -23
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/options.py +1 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/PKG-INFO +1 -1
- {deepfos-1.1.80 → deepfos-1.1.82}/.gitattributes +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/.gitee/ISSUE_GUIDELINES.md +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/.gitee/ISSUE_TEMPLATE.md +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/.gitignore +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/MANIFEST.in +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/README.md +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/algo/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/algo/graph.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/business_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/models/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/models/business_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_1/models/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_2/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_2/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_2/models/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/V1_2/models/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/account.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/accounting_engines.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/app.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/approval_process.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/business_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/consolidation.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/consolidation_process.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/datatable.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/deep_pipeline.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/deepconnector.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/deepfos_task.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/deepmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/financial_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/journal_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/journal_template.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/memory_financial_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/account.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/accounting_engines.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/app.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/approval_process.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/base.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/business_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/consolidation.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/consolidation_process.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/datatable_mysql.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/deep_pipeline.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/deepconnector.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/deepfos_task.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/deepmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/financial_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/journal_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/journal_template.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/memory_financial_model.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/platform.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/python.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/reconciliation_engine.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/reconciliation_report.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/role_strategy.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/smartlist.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/space.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/system.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/variable.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/models/workflow.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/platform.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/python.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/reconciliation_engine.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/reconciliation_report.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/role_strategy.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/smartlist.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/space.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/system.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/variable.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/api/workflow.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/jstream.c +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/jstream.pyx +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/pandas.c +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/pandas.pyx +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/py_jstream.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/boost/py_pandas.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/cache.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/config.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/_base.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/constants.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/cube.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/formula.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/syscube.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/typing.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/cube/utils.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/_base.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/dimcreator.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/dimexpr.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/dimmember.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/eledimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/filters.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/dimension/sysdimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/_cache.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/_operator.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/nodemixin.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/sqlcondition.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/core/logictable/tablemodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/cipher.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/clickhouse.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/connector.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/daclickhouse.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/dameng.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/damysql.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/dbkits.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/deepengine.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/deepmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/deepmodel_kingbase.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/gauss.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/kingbase.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/mysql.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/oracle.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/postgresql.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/sqlserver.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/db/utils.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/accounting.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/apvlprocess.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/base.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/bizmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/datatable.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/deep_pipeline.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/deepconnector.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/deepmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/dimension.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/fact_table.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/finmodel.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/journal.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/journal_template.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/pyscript.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/reconciliation.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/rolestrategy.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/smartlist.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/variable.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/element/workflow.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/exceptions/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/exceptions/hook.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lazy.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/__init__.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/_javaobj.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/asynchronous.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/concurrency.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/decorator.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/deepchart.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/deepux.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/discovery.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/edb_lexer.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/eureka.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/filterparser.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/httpcli.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/jsonstreamer.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/msg.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/nacos.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/patch.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/redis.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/stopwatch.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/subtask.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/sysutils.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/lib/utils.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/local.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos/translation.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/SOURCES.txt +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/dependency_links.txt +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/not-zip-safe +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/requires.txt +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/deepfos.egg-info/top_level.txt +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/requirements.txt +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/setup.cfg +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/setup.py +0 -0
- {deepfos-1.1.80 → deepfos-1.1.82}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2026-
|
|
11
|
+
"date": "2026-02-04T10:59:10+0000",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.1.
|
|
14
|
+
"full-revisionid": "9a552677df0371195b48da76355f96583fd534db",
|
|
15
|
+
"version": "1.1.82"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ from deepfos.lib.httpcli import AioHttpCli
|
|
|
23
23
|
from deepfos.lib.utils import concat_url, retry, to_version_tuple, repr_version, trim_text
|
|
24
24
|
from deepfos.lib.asynchronous import evloop
|
|
25
25
|
from deepfos.lib.discovery import ServiceDiscovery
|
|
26
|
-
from deepfos.lib.constant import UNSET, RE_SYS_SERVER_PARSER
|
|
26
|
+
from deepfos.lib.constant import UNSET, RE_SYS_SERVER_PARSER, INTERNAL_TOKEN_HEADER
|
|
27
27
|
from deepfos.options import OPTION
|
|
28
28
|
from deepfos.exceptions import APIResponseError, APIRequestError
|
|
29
29
|
|
|
@@ -376,6 +376,9 @@ class Route:
|
|
|
376
376
|
else:
|
|
377
377
|
header = CaseInsensitiveDict(ins.header, **ext_header)
|
|
378
378
|
|
|
379
|
+
if internal_token := OPTION.general.internal_token:
|
|
380
|
+
header[INTERNAL_TOKEN_HEADER] = internal_token
|
|
381
|
+
|
|
379
382
|
if use_cache:
|
|
380
383
|
if ((req_key := hash(req)), raw_result) in api_cache:
|
|
381
384
|
return api_cache[(req_key, raw_result)]
|
|
@@ -54,7 +54,7 @@ def normalize_kw(query: str, kw: Dict):
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
class _AsyncEdgeDBConnection(AsyncIOConnection):
|
|
57
|
-
async def raw_query(self, query_context, capabilities=enums.Capability.NONE):
|
|
57
|
+
async def raw_query(self, query_context, capabilities=enums.Capability.NONE, raw_type: bool = False):
|
|
58
58
|
if self.is_closed():
|
|
59
59
|
await self.connect()
|
|
60
60
|
|
|
@@ -99,13 +99,17 @@ class _AsyncEdgeDBConnection(AsyncIOConnection):
|
|
|
99
99
|
)
|
|
100
100
|
if codecs is not None:
|
|
101
101
|
out_dc = codecs[2]
|
|
102
|
-
|
|
102
|
+
type_desc = out_dc.make_type(
|
|
103
103
|
DescribeContext(
|
|
104
104
|
query='',
|
|
105
105
|
state=query_context.state,
|
|
106
106
|
inject_type_names=False
|
|
107
107
|
)
|
|
108
|
-
)
|
|
108
|
+
)
|
|
109
|
+
if raw_type:
|
|
110
|
+
frame_desc = type_desc
|
|
111
|
+
else:
|
|
112
|
+
frame_desc = collect_output_frame(type_desc)
|
|
109
113
|
else:
|
|
110
114
|
frame_desc = None
|
|
111
115
|
return frame_desc, result
|
|
@@ -148,6 +152,20 @@ class _AsyncIOIteration(AsyncIOIteration):
|
|
|
148
152
|
query_context, enums.Capability.MODIFICATIONS
|
|
149
153
|
)
|
|
150
154
|
|
|
155
|
+
async def query_with_raw_type(self, query: str, *args, **kwargs) -> list:
|
|
156
|
+
with self._exclusive():
|
|
157
|
+
await self._ensure_transaction()
|
|
158
|
+
return await self._connection.raw_query(
|
|
159
|
+
QueryContext(
|
|
160
|
+
query=QueryWithArgs(query, args, kwargs),
|
|
161
|
+
cache=self._get_query_cache(),
|
|
162
|
+
query_options=_query_opts,
|
|
163
|
+
retry_options=self._get_retry_options(),
|
|
164
|
+
state=self._get_state(),
|
|
165
|
+
),
|
|
166
|
+
raw_type=True,
|
|
167
|
+
)
|
|
168
|
+
|
|
151
169
|
async def execute(self, commands: str, *args, **kwargs):
|
|
152
170
|
return await self._execute(QueryContext(
|
|
153
171
|
query=QueryWithArgs(commands, args, kwargs),
|
|
@@ -176,6 +194,20 @@ class _AsyncIOClient(AsyncIOClient):
|
|
|
176
194
|
def transaction(self) -> _AsyncIORetry:
|
|
177
195
|
return _AsyncIORetry(self)
|
|
178
196
|
|
|
197
|
+
async def query_with_raw_type(self, query: str, *args, **kwargs) -> list:
|
|
198
|
+
con = await self._impl.acquire()
|
|
199
|
+
try:
|
|
200
|
+
query_context = QueryContext(
|
|
201
|
+
query=QueryWithArgs(query, args, kwargs),
|
|
202
|
+
cache=self._get_query_cache(),
|
|
203
|
+
query_options=_query_opts,
|
|
204
|
+
retry_options=self._get_retry_options(),
|
|
205
|
+
state=self._get_state(),
|
|
206
|
+
)
|
|
207
|
+
return await con.raw_query(query_context, raw_type=True)
|
|
208
|
+
finally:
|
|
209
|
+
await self._impl.release(con)
|
|
210
|
+
|
|
179
211
|
|
|
180
212
|
# All deprecated space in v3dev & v3test & alpha
|
|
181
213
|
deprecated_space = [
|
|
@@ -37,3 +37,7 @@ RE_SYS_SERVER_PARSER = re.compile('^(?:https?://)?([a-z-]+-server)$', re.IGNOREC
|
|
|
37
37
|
DECIMAL_COL = 'decimal_val'
|
|
38
38
|
STRING_COL = 'string_val'
|
|
39
39
|
INDEX_FIELD = 'index'
|
|
40
|
+
|
|
41
|
+
# -----------------------------------------------------------------------------
|
|
42
|
+
# Internal service token header
|
|
43
|
+
INTERNAL_TOKEN_HEADER = "X-deepfos-internal-key"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import contextlib
|
|
2
3
|
from collections import defaultdict
|
|
3
4
|
from functools import cached_property
|
|
4
5
|
from typing import TypedDict, Literal, Type, Dict, FrozenSet
|
|
@@ -11,6 +12,7 @@ from kubernetes_asyncio.client import (
|
|
|
11
12
|
V1EndpointSubset,
|
|
12
13
|
V1EndpointAddress,
|
|
13
14
|
CoreV1EndpointPort,
|
|
15
|
+
ApiClient,
|
|
14
16
|
)
|
|
15
17
|
from deepfos.lib.discovery import ServiceDiscovery
|
|
16
18
|
from deepfos import OPTION
|
|
@@ -31,13 +33,14 @@ class K8sCli(ServiceDiscovery):
|
|
|
31
33
|
|
|
32
34
|
async def on_startup(self):
|
|
33
35
|
config.load_incluster_config()
|
|
34
|
-
|
|
35
|
-
@cached_property
|
|
36
|
-
def _api(self):
|
|
37
36
|
c = client.Configuration.get_default_copy()
|
|
38
37
|
c.verify_ssl = False
|
|
39
38
|
client.Configuration.set_default(c)
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
@contextlib.asynccontextmanager
|
|
41
|
+
async def _acquire_api(self) -> client.CoreV1Api:
|
|
42
|
+
async with ApiClient() as cli:
|
|
43
|
+
yield client.CoreV1Api(cli)
|
|
41
44
|
|
|
42
45
|
async def on_interval(self):
|
|
43
46
|
await self._update_cache()
|
|
@@ -58,9 +61,9 @@ class K8sCli(ServiceDiscovery):
|
|
|
58
61
|
self._cares.add(server_name)
|
|
59
62
|
await self.update_instance_for_service(server_name)
|
|
60
63
|
|
|
61
|
-
|
|
62
64
|
async def _list_all_service_names(self) -> FrozenSet[str]:
|
|
63
|
-
|
|
65
|
+
async with self._acquire_api() as api:
|
|
66
|
+
svcs: V1ServiceList = await api.list_namespaced_service(self._ns)
|
|
64
67
|
return frozenset(svc.metadata.name for svc in svcs.items)
|
|
65
68
|
|
|
66
69
|
async def update_services(self):
|
|
@@ -79,10 +82,11 @@ class K8sCli(ServiceDiscovery):
|
|
|
79
82
|
logger.debug(f"Removed servieces: {removed}")
|
|
80
83
|
|
|
81
84
|
async def update_instance_for_service(self, server_name: str):
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
async with self._acquire_api() as api:
|
|
86
|
+
endpoints: V1Endpoints = await api.read_namespaced_endpoints(
|
|
87
|
+
server_name,
|
|
88
|
+
self._ns,
|
|
89
|
+
)
|
|
86
90
|
|
|
87
91
|
no_active_nodes = True
|
|
88
92
|
async with self._instance_lock[server_name]:
|
|
@@ -5,7 +5,7 @@ import decimal
|
|
|
5
5
|
import functools
|
|
6
6
|
import json
|
|
7
7
|
import uuid
|
|
8
|
-
from dataclasses import dataclass
|
|
8
|
+
from dataclasses import dataclass, replace
|
|
9
9
|
from typing import Any, Dict, Union, List
|
|
10
10
|
|
|
11
11
|
import edgedb
|
|
@@ -17,10 +17,15 @@ from edgedb.datatypes import datatypes
|
|
|
17
17
|
class Context:
|
|
18
18
|
frame_desc: Any = None
|
|
19
19
|
query_df: bool = False
|
|
20
|
+
uuid_as_str: bool = False
|
|
21
|
+
unnamedtuple_as_dict: bool = False
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
DEFAULT_CONTEXT = Context()
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
@functools.singledispatch
|
|
23
|
-
def serialize(o, ctx: Context =
|
|
28
|
+
def serialize(o, ctx: Context = DEFAULT_CONTEXT):
|
|
24
29
|
raise TypeError(f'无法序列化类型: {type(o)}')
|
|
25
30
|
|
|
26
31
|
|
|
@@ -93,32 +98,36 @@ def to_scalar(o, field_info: Union[Dict, List[str], str] = None):
|
|
|
93
98
|
|
|
94
99
|
|
|
95
100
|
@serialize.register
|
|
96
|
-
def _tuple(o: edgedb.Tuple, ctx: Context =
|
|
101
|
+
def _tuple(o: edgedb.Tuple, ctx: Context = DEFAULT_CONTEXT):
|
|
97
102
|
if ctx.frame_desc is None:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
tup = tuple(serialize(el, ctx) for el in o)
|
|
104
|
+
else:
|
|
105
|
+
tup = tuple(
|
|
106
|
+
serialize(el, replace(ctx, frame_desc=ctx.frame_desc[idx]))
|
|
107
|
+
for idx, el in enumerate(o)
|
|
108
|
+
)
|
|
109
|
+
if ctx.unnamedtuple_as_dict:
|
|
110
|
+
return dict(zip(map(str, range(len(tup))), tup))
|
|
111
|
+
else:
|
|
112
|
+
return tup
|
|
104
113
|
|
|
105
114
|
@serialize.register
|
|
106
|
-
def _namedtuple(o: edgedb.NamedTuple, ctx: Context =
|
|
115
|
+
def _namedtuple(o: edgedb.NamedTuple, ctx: Context = DEFAULT_CONTEXT):
|
|
107
116
|
if ctx.frame_desc is None:
|
|
108
|
-
return {attr: serialize(getattr(o, attr)) for attr in dir(o)}
|
|
117
|
+
return {attr: serialize(getattr(o, attr), ctx) for attr in dir(o)}
|
|
109
118
|
return {
|
|
110
|
-
attr: serialize(getattr(o, attr),
|
|
119
|
+
attr: serialize(getattr(o, attr), replace(ctx, frame_desc=ctx.frame_desc[attr]))
|
|
111
120
|
for attr in ctx.frame_desc
|
|
112
121
|
}
|
|
113
122
|
|
|
114
123
|
|
|
115
124
|
@serialize.register
|
|
116
|
-
def _linkset(o: edgedb.LinkSet, ctx: Context =
|
|
125
|
+
def _linkset(o: edgedb.LinkSet, ctx: Context = DEFAULT_CONTEXT):
|
|
117
126
|
return [serialize(el, ctx) for el in o]
|
|
118
127
|
|
|
119
128
|
|
|
120
129
|
@serialize.register
|
|
121
|
-
def _link(o: edgedb.Link, ctx: Context =
|
|
130
|
+
def _link(o: edgedb.Link, ctx: Context = DEFAULT_CONTEXT):
|
|
122
131
|
ret = {}
|
|
123
132
|
if ctx.frame_desc is None:
|
|
124
133
|
for lprop in dir(o):
|
|
@@ -131,7 +140,7 @@ def _link(o: edgedb.Link, ctx: Context = Context()):
|
|
|
131
140
|
|
|
132
141
|
lprops = list(map(lambda x: f'@{x}', (set(dir(o)) - {'source', 'target'})))
|
|
133
142
|
for field in ctx.frame_desc:
|
|
134
|
-
new_ctx =
|
|
143
|
+
new_ctx = replace(ctx, frame_desc=ctx.frame_desc[field])
|
|
135
144
|
if field in lprops:
|
|
136
145
|
ret[field] = serialize(getattr(o, field[1:]), new_ctx)
|
|
137
146
|
else:
|
|
@@ -144,7 +153,7 @@ def ignore_implicited_fields(o: edgedb.Object):
|
|
|
144
153
|
|
|
145
154
|
|
|
146
155
|
@serialize.register
|
|
147
|
-
def _object(o: edgedb.Object, ctx: Context =
|
|
156
|
+
def _object(o: edgedb.Object, ctx: Context = DEFAULT_CONTEXT):
|
|
148
157
|
ret = {}
|
|
149
158
|
|
|
150
159
|
if ctx.frame_desc is None:
|
|
@@ -156,7 +165,7 @@ def _object(o: edgedb.Object, ctx: Context = Context()):
|
|
|
156
165
|
try:
|
|
157
166
|
ret[attr] = serialize(o[attr])
|
|
158
167
|
except (KeyError, TypeError):
|
|
159
|
-
ret[attr] = serialize(getattr(o, attr))
|
|
168
|
+
ret[attr] = serialize(getattr(o, attr), ctx)
|
|
160
169
|
return ret
|
|
161
170
|
|
|
162
171
|
ensure_one_field = ctx.query_df and len(ctx.frame_desc) == 1
|
|
@@ -168,17 +177,18 @@ def _object(o: edgedb.Object, ctx: Context = Context()):
|
|
|
168
177
|
ctx.frame_desc[key[0]] = maybe_drop
|
|
169
178
|
|
|
170
179
|
for attr in ctx.frame_desc:
|
|
180
|
+
new_ctx = replace(ctx, frame_desc=ctx.frame_desc[attr])
|
|
171
181
|
try:
|
|
172
|
-
ret[attr] = serialize(o[attr],
|
|
182
|
+
ret[attr] = serialize(o[attr], new_ctx)
|
|
173
183
|
except (KeyError, TypeError):
|
|
174
|
-
ret[attr] = serialize(getattr(o, attr),
|
|
184
|
+
ret[attr] = serialize(getattr(o, attr), new_ctx)
|
|
175
185
|
|
|
176
186
|
return ret
|
|
177
187
|
|
|
178
188
|
|
|
179
189
|
@serialize.register(edgedb.Set)
|
|
180
190
|
@serialize.register(edgedb.Array)
|
|
181
|
-
def _set(o, ctx: Context =
|
|
191
|
+
def _set(o, ctx: Context = DEFAULT_CONTEXT):
|
|
182
192
|
return [serialize(el, ctx) for el in o]
|
|
183
193
|
|
|
184
194
|
|
|
@@ -193,14 +203,20 @@ def _set(o, ctx: Context = Context()):
|
|
|
193
203
|
@serialize.register(datetime.datetime)
|
|
194
204
|
@serialize.register(datetime.time)
|
|
195
205
|
@serialize.register(edgedb.RelativeDuration)
|
|
196
|
-
@serialize.register(uuid.UUID)
|
|
197
206
|
@serialize.register(decimal.Decimal)
|
|
198
|
-
def _scalar(o, ctx: Context =
|
|
207
|
+
def _scalar(o, ctx: Context = DEFAULT_CONTEXT):
|
|
199
208
|
if ctx.frame_desc == 'std::json' and isinstance(o, str):
|
|
200
209
|
return json.loads(o)
|
|
201
210
|
return o
|
|
202
211
|
|
|
203
212
|
|
|
213
|
+
@serialize.register(uuid.UUID)
|
|
214
|
+
def _scalar(o: uuid.UUID, ctx: Context = DEFAULT_CONTEXT):
|
|
215
|
+
if ctx.uuid_as_str:
|
|
216
|
+
return str(o)
|
|
217
|
+
return o
|
|
218
|
+
|
|
219
|
+
|
|
204
220
|
@serialize.register
|
|
205
|
-
def _enum(o: edgedb.EnumValue, ctx: Context =
|
|
221
|
+
def _enum(o: edgedb.EnumValue, ctx: Context = DEFAULT_CONTEXT):
|
|
206
222
|
return str(o)
|
|
@@ -432,6 +432,7 @@ class _General(_Category):
|
|
|
432
432
|
socket_name = _Option(None, val_type=str)
|
|
433
433
|
preserve_concurrency = _Option(1, val_type=int)
|
|
434
434
|
response_display_length_on_error = _Option(20000, val_type=int)
|
|
435
|
+
internal_token = _Option(None, val_type=str)
|
|
435
436
|
|
|
436
437
|
def __get__(self, instance, owner) -> '_General':
|
|
437
438
|
"""defined to help ide"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|