Skip to content

Commit

Permalink
Merge pull request #1367 from benero/bugfix_api
Browse files Browse the repository at this point in the history
docs: 新增 2.6.26 发布文档
  • Loading branch information
benero authored Jul 22, 2024
2 parents c85dd59 + 6512ac7 commit 3804f9b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.25
2.6.26
2 changes: 1 addition & 1 deletion app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: 蓝鲸智云
category: 办公应用
introduction: 流程服务是蓝鲸推出的轻量级ITSM,通过可自定义设计的流程模块,覆盖IT服务中的不同管理活动或应用场景。帮助企业用户规范内部管理流程,提升沟通及管理效率。
introduction_en: bk_itsm is a lightweight ITSM created by Blueking. It covers different application scenarios in IT services through customizable workflows and help enterprise users to implement standardize IT workflow, improve communication and management efficiency.
version: 2.6.25
version: 2.6.26
language: python
is_use_celery: True
is_use_celery_with_gevent: False
Expand Down
2 changes: 1 addition & 1 deletion app_desc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spec_version: 2
app_version: "2.6.25"
app_version: "2.6.26"
app:
region: default
bk_app_code: bk_itsm
Expand Down
6 changes: 5 additions & 1 deletion docs/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
## [Version: 2.6.26] - 2024-07-22
【修复】修复接口数值为 0 导致流程异常的问题
【修复】修复apigw初始化异常的问题

## [Version: 2.6.25] - 2024-07-19
【修复】修复消息通知在部分环境接口请求地址不正确的问题
【修复】修复消息通知在部分环境接口请求地址不正确的问题
【修复】修复 API 节点手动重试取值异常的问题

## [Version: 2.6.24] - 2024-07-18
Expand Down
4 changes: 4 additions & 0 deletions docs/RELEASE_EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [Version: 2.6.26] - 2024-07-22
【Fixed】Fix the issue where an interface value of 0 causes process abnormalities.
【Fixed】Fix the initialization exception of apigw.

## [Version: 2.6.25] - 2024-07-19
【Fixed】Fixed the issue where the API request URL for message notifications was incorrect in certain environments.

Expand Down
23 changes: 18 additions & 5 deletions itsm/pipeline_plugins/components/collections/itsm_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ def poll_proceed(api_config, success_conditions):

def update_variables(self, rsp, ticket_id, variables, data=None):
for variable in variables:
value = rsp.get(variable["ref_path"])
# 兼容手动重试
if value is None:
value = jmespath.search(variable["ref_path"], rsp)
# 默认值
if value is None:
value = ""
TicketGlobalVariable.objects.filter(
ticket_id=ticket_id, key=variable["key"]
).update(value=jmespath.search(variable["ref_path"], rsp) or "")
).update(value=value)
return variables

@staticmethod
Expand Down Expand Up @@ -402,8 +409,9 @@ def schedule(self, data, parent_data, callback_data=None):
return True

logger.info(
"\n------- AutoStateService schedule times: %s latest_poll_time %s state_id %s ticket_id"
" %s----------\n" % (poll_time, latest_poll_time, state_id, ticket_id)
"[AutoStateService_schedule][%s][%s] poll_times: %s latest_poll_time %s" % (
ticket_id, state_id, poll_time, latest_poll_time
)
)

# 如果为轮询并且时间超过上一次的轮询时间
Expand All @@ -414,6 +422,11 @@ def schedule(self, data, parent_data, callback_data=None):
success_conditions,
operate_info,
)

logger.info(
"[AutoStateService_schedule][{}][{}]{}".format(ticket_id, state_id, p_rsp)
)

poll_time -= 1
if p_result:
# 返回为True的时候,直接结束
Expand All @@ -430,8 +443,8 @@ def schedule(self, data, parent_data, callback_data=None):
return True
if poll_time <= 0:
logger.error(
"[AutoStateService_schedule] api_request_error, response={}".format(
p_rsp
"[AutoStateService_schedule][{}][{}] api_request_error, response={}".format(
ticket_id, state_id, p_rsp
)
)
self.do_exit_plugins(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Jinja2==3.0.3
jmespath==0.10.0
requests_toolbelt==0.9.1

apigw-manager[cryptography]==1.0.7
apigw-manager[cryptography]==1.1.8
blueapps[opentelemetry,bkcrypto]==4.12.0

drf-yasg==1.20.0
Expand Down

0 comments on commit 3804f9b

Please sign in to comment.