bk-plugin-framework 2.3.5__tar.gz → 2.3.6__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.
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/PKG-INFO +3 -3
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/__version__.py +1 -1
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/management/commands/sync_apigateway_if_changed.py +12 -8
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/pyproject.toml +8 -3
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/constants.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/envs.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/hub/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/api.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/authentication.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/decorators.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/plugin.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/metrics.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/api.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/apps.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/celery/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/celery/queues.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/celery/tasks.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/migrations/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callbacker.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/executor.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/admin.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/apps.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/log.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/migrations/0001_initial.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/migrations/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/models.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/admin.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/apps.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/celery/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/celery/beat.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/celery/queues.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/celery/tasks.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/0001_initial.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/0002_schedule_finish_at.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/0003_auto_20210830_1945.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/0004_schedule_scheduling.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/0005_schedule_err.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/migrations/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/models.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/utils.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/serializers.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/admin.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/callback.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/detail.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/invoke.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/logs.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/meta.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/permissions.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/plugin_api_dispatch.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/schedule.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/api/serializers/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/apps.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/management/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/management/commands/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/management/commands/support-files/resources.yaml +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/middlewares.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/migrations/0001_initial.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/migrations/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/models.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/bpf_service/urls.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/debug_panel/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/debug_panel/management/commands/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/debug_panel/management/commands/rundebugserver.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/debug_panel/migrations/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/debug_panel/views.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/__init__.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/local.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/log.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/module_load.py +0 -0
- {bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/validations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bk-plugin-framework
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.6
|
|
4
4
|
Summary: bk plugin python framework
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Your Name
|
|
@@ -14,8 +14,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Requires-Dist: apigw-manager
|
|
18
|
-
Requires-Dist: bk-plugin-runtime (==2.1.
|
|
17
|
+
Requires-Dist: apigw-manager (>=4.2.3,<5) ; python_version >= "3.8" and python_version < "3.13"
|
|
18
|
+
Requires-Dist: bk-plugin-runtime (==2.1.5)
|
|
19
19
|
Requires-Dist: drf-spectacular (>=0.29.0,<0.30.0)
|
|
20
20
|
Requires-Dist: jsonschema (>=2.5.0,<5.0.0)
|
|
21
21
|
Requires-Dist: pydantic (>=1.0,<3)
|
|
@@ -41,7 +41,7 @@ class Command(BaseCommand):
|
|
|
41
41
|
step_start = time.time()
|
|
42
42
|
self.stdout.write("[Sync] generate definition.yaml")
|
|
43
43
|
try:
|
|
44
|
-
call_command("generate_definition_yaml")
|
|
44
|
+
call_command("generate_definition_yaml", "--render")
|
|
45
45
|
except Exception as e:
|
|
46
46
|
self.stderr.write(
|
|
47
47
|
self.style.ERROR(
|
|
@@ -66,10 +66,15 @@ class Command(BaseCommand):
|
|
|
66
66
|
self.stdout.write(f"[Sync] resources.yaml path: {resources_yaml_path}")
|
|
67
67
|
step_timings["1.1 复制 support-files/resources.yaml"] = (time.time() - step_start) * 1000
|
|
68
68
|
|
|
69
|
-
# 2.
|
|
69
|
+
# 2. 计算当前哈希值(计算 resources.yaml 和 definition.yaml)
|
|
70
70
|
step_start = time.time()
|
|
71
|
-
|
|
72
|
-
self.
|
|
71
|
+
resources_hash = self._calculate_yaml_hash(resources_yaml_path)
|
|
72
|
+
definition_hash = self._calculate_yaml_hash(definition_yaml_path)
|
|
73
|
+
self.stdout.write(f"[Sync] resources.yaml hash: {resources_hash[:16] if resources_hash else 'N/A'}...")
|
|
74
|
+
self.stdout.write(f"[Sync] definition.yaml hash: {definition_hash[:16] if definition_hash else 'N/A'}...")
|
|
75
|
+
# 组合两个哈希值生成最终哈希
|
|
76
|
+
current_hash = hashlib.sha256(f"{resources_hash}:{definition_hash}".encode()).hexdigest()
|
|
77
|
+
self.stdout.write(f"[Sync] Current combined hash: {current_hash[:16]}...")
|
|
73
78
|
step_timings["2. 计算当前哈希值"] = (time.time() - step_start) * 1000
|
|
74
79
|
|
|
75
80
|
# 3. 获取上次同步的哈希值
|
|
@@ -165,15 +170,14 @@ class Command(BaseCommand):
|
|
|
165
170
|
self.stderr.write(self.style.ERROR(f"[Sync] Failed to copy support-files/resources.yaml: {e}"))
|
|
166
171
|
raise SystemExit(1)
|
|
167
172
|
|
|
168
|
-
def
|
|
173
|
+
def _calculate_yaml_hash(self, filepath):
|
|
169
174
|
"""
|
|
170
|
-
|
|
175
|
+
计算单个 YAML 文件的哈希值
|
|
171
176
|
|
|
172
177
|
注意:为了避免 YAML 内容顺序变化导致的 hash 不一致问题,
|
|
173
178
|
这里先将 YAML 解析为字典,然后用 sort_keys=True 重新序列化,
|
|
174
179
|
确保相同内容的 YAML 文件总是产生相同的 hash 值。
|
|
175
180
|
"""
|
|
176
|
-
filepath = os.path.join(settings.BASE_DIR, "resources.yaml")
|
|
177
181
|
if os.path.exists(filepath):
|
|
178
182
|
try:
|
|
179
183
|
with open(filepath, encoding="utf-8") as f:
|
|
@@ -190,7 +194,7 @@ class Command(BaseCommand):
|
|
|
190
194
|
except Exception as e:
|
|
191
195
|
self.stdout.write(
|
|
192
196
|
self.style.WARNING(
|
|
193
|
-
f"[Sync] Failed to normalize
|
|
197
|
+
f"[Sync] Failed to normalize {filepath} for hash: {e}, fallback to raw content hash"
|
|
194
198
|
)
|
|
195
199
|
)
|
|
196
200
|
# 回退到原始方式
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "bk-plugin-framework"
|
|
3
|
-
version = "2.3.
|
|
3
|
+
version = "2.3.6"
|
|
4
4
|
description = "bk plugin python framework"
|
|
5
5
|
authors = ["Your Name <you@example.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -9,8 +9,8 @@ license = "MIT"
|
|
|
9
9
|
python = "^3.8.0,<4.0"
|
|
10
10
|
pydantic = ">=1.0,<3"
|
|
11
11
|
werkzeug = ">=2.0.0, <4.0"
|
|
12
|
-
apigw-manager = {version = ">=
|
|
13
|
-
bk-plugin-runtime = "2.1.
|
|
12
|
+
apigw-manager = {version = ">=4.2.3, <5", python = ">=3.8,<3.13"}
|
|
13
|
+
bk-plugin-runtime = "2.1.5"
|
|
14
14
|
jsonschema = ">=2.5.0,<5.0.0"
|
|
15
15
|
drf-spectacular = "^0.29.0"
|
|
16
16
|
|
|
@@ -40,3 +40,8 @@ exclude = '''
|
|
|
40
40
|
| dist
|
|
41
41
|
)/
|
|
42
42
|
'''
|
|
43
|
+
|
|
44
|
+
[[tool.poetry.source]]
|
|
45
|
+
name = "tencent"
|
|
46
|
+
url = "https://mirrors.tencent.com/repository/pypi/tencent_pypi/simple"
|
|
47
|
+
priority = "supplemental"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/authentication.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/kit/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/api.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callback/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/callbacker.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/executor.py
RENAMED
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/admin.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/apps.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/log.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/loghub/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/runtime/schedule/apps.py
RENAMED
|
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
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/services/__init__.py
RENAMED
|
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
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/module_load.py
RENAMED
|
File without changes
|
{bk_plugin_framework-2.3.5 → bk_plugin_framework-2.3.6}/bk_plugin_framework/utils/validations.py
RENAMED
|
File without changes
|