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: openapi Element 的动态子类加载不全 #6387

Closed
irwinsun opened this issue Mar 22, 2022 · 1 comment · Fixed by #6389
Closed

fix: openapi Element 的动态子类加载不全 #6387

irwinsun opened this issue Mar 22, 2022 · 1 comment · Fixed by #6389
Labels
area/ci/api CI OpenAPI issue doing 开发中 done Production environment in tencent has been deploy for gray UAT environment in tencent has been deploy for test Test environment in tencent has been deploy kind/bug 程序故障Bug,漏洞 kind/version/sample 所属开源版本特性 priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sample/passed 开源验证通过 streams/done stream 生产部署成功 streams/for gray stream 灰度环境部署成功

Comments

@irwinsun
Copy link
Member

irwinsun commented Mar 22, 2022

What happened:
流水线中带有构件类插件时,通过openAPI接口查询会失败。

curl -XGET http://bk-ci.service.consul/ms/openapi/api/apigw/v3/projects/demo/pipelines/p-9f51d27d06804fc8a8abc9ce761d6bc8/builds/b-f879b107639b47ddbb9c63d6ac17ef41/detail -H "Content-Type: application/json" -H "X-DEVOPS-UID: admin"
{
"status" : 500,
"message" : "Could not resolve type id 'singleArchive' as a subtype of com.tencent.devops.common.pipeline.pojo.element.Element: known type ids = [CODE_GIT, CODE_GITLAB, CODE_SVN, GITHUB, codeGitGenericWebHookTrigger, codeGitWebHookTrigger, codeGithubWebHookTrigger, codeGitlabWebHookTrigger, codeP4WebHookTrigger, codeSVNWebHookTrigger, codeTGitWebHookTrigger, linuxCodeCCScript, linuxPaasCodeCCScript, linuxScript, manualReviewUserTask, manualTrigger, marketBuild, marketBuildLess, marketCheckImage, matrixStatus, qualityGateInTask, qualityGateOutTask, remoteTrigger, subPipelineCall, timerTrigger, windowsScript] (for POJO property 'elements')\n at [Source: (BufferedReader); line: 99, column: 23] (through reference chain: com.tencent.devops.common.api.pojo.Result["data"]->com.tencent.devops.process.pojo.pipeline.ModelDetail["model"]->com.tencent.devops.common.pipeline.Model["stages"]->java.util.ArrayList[1]->com.tencent.devops.common.pipeline.container.Stage["containers"]->java.util.ArrayList[0]->com.tencent.devops.common.pipeline.container.VMBuildContainer["elements"]->java.util.ArrayList[1]) reading GET

Environment:

  • bk-ci version (use cat VERSION in installed dir): all
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@irwinsun irwinsun added kind/bug 程序故障Bug,漏洞 area/ci/api CI OpenAPI issue priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. kind/version/sample 所属开源版本特性 labels Mar 22, 2022
@irwinsun
Copy link
Member Author

不升级版本的临时解决办法 :将 /data/bkce/ci/jar-private/common-archive-*.jar 放到/data/bkce/ci/openapi/lib 目录。
重启systemctl restart bk-ci-openapi

irwinsun added a commit that referenced this issue Mar 22, 2022
fix: openapi Element 的动态子类加载不全 #6387
irwinsun added a commit that referenced this issue Mar 22, 2022
将依赖放到api-process,保证可以被依赖加载到
irwinsun added a commit that referenced this issue Mar 22, 2022
将依赖放到api-process,保证可以被依赖加载到
@irwinsun irwinsun added the sample/passed 开源验证通过 label Mar 22, 2022
@bkci-bot bkci-bot added for gray UAT environment in tencent has been deploy streams/for gray stream 灰度环境部署成功 streams/done stream 生产部署成功 labels Mar 22, 2022
@bkci-bot bkci-bot added the done Production environment in tencent has been deploy label Mar 31, 2022
@bkci-bot bkci-bot added doing 开发中 for test Test environment in tencent has been deploy labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci/api CI OpenAPI issue doing 开发中 done Production environment in tencent has been deploy for gray UAT environment in tencent has been deploy for test Test environment in tencent has been deploy kind/bug 程序故障Bug,漏洞 kind/version/sample 所属开源版本特性 priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sample/passed 开源验证通过 streams/done stream 生产部署成功 streams/for gray stream 灰度环境部署成功
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants