Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update_app_resource 函数添加 metadata 校验 #1544

Merged

Conversation

SheepSheepChen
Copy link
Collaborator

No description provided.

@SheepSheepChen SheepSheepChen merged commit 682154b into TencentBlueKing:main Aug 22, 2024
7 checks passed
SheepSheepChen added a commit to SheepSheepChen/blueking-paas that referenced this pull request Aug 22, 2024
try:
# force replace metadata.name with app_code to avoid user modify
payload["metadata"]["name"] = generate_bkapp_name(module)
except KeyError as e:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

准确来说上面的 payload["metadata"]["name"] 除了 KeyError 之外也可能跑出 TypeError,当 metadata 存在但是类型不是字典时。可以考虑拆分校验和赋值。

songzxc789 pushed a commit to songzxc789/blueking-paas that referenced this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants