open-falcon / falcon-plus

An open-source and enterprise-level monitoring system.
Apache License 2.0
7.26k stars 1.53k forks source link

PR#906 合并之后travis-ci构建失败问题 #914

Closed JimmyTinsley closed 3 years ago

JimmyTinsley commented 3 years ago

在我提交了 https://github.com/open-falcon/falcon-plus/pull/906 之后, 出现了travis-ci构建失败的情况 https://travis-ci.org/github/open-falcon/falcon-plus/builds/748452494.

经过核查, 问题原因有两点:

  1. govendor在处理 github.com/go-playground/validator包时出现问题, 该repo的v10现在是master分支, 而gin v1.6.3直接引用了github.com/go-playground/validator/v10, 所以govendor导致拉不到相关依赖代码, 编译报错. 对于govendor的解决办法是手动将github.com/go-playground/validator的项目文件复制到v10文件夹中, 实测可以解决该问题. 相关参考issue: https://github.com/go-playground/validator/issues/546 https://github.com/gin-gonic/gin/issues/2151gin https://github.com/go-playground/validator/issues/565
  2. 在本地修复完以上问题之后, 尝试使用go v1.8和go v1.11均编译失败 这是gin及相关依赖更新之后所导致的(https://github.com/gin-gonic/gin#installation), 更换为go v1.12+之后编译成功.

我会尽快再提交一个PR修复travis-ci构建失败的问题. @laiwei

JimmyTinsley commented 3 years ago

刚刚测试发现, 由于要求的go版本变高了, Dockerfile中编译项目的go版本1.10也过低, docker build失败, 同样也会导致travis-ci构建失败. 如果可以的话, 是否可以reset掉master分支我的 https://github.com/open-falcon/falcon-plus/pull/906 提交? 那个PR有些欠考虑了, 待相关问题都解决完之后再提交一个新的.

JimmyTinsley commented 3 years ago

由于gin v1.6.3+ 更新了github.com/go-playground/validator到v10版本 而v10版本的validator取消了binding:"exists"的用法, 如:

Tags    string  `json:"tags" binding:"exists"`

falcon-plus代码中很多这样的用法都将不可用. 鉴于还有可能有其他相关兼容性问题, 具体需要详细测试. 所以这个issue先关掉了

laiwei commented 3 years ago

ok,谢谢你的PR和跟进。travis-ci的构建队列比较慢,有些PR的构建没有被触发成功。

由于gin v1.6.3+ 更新了github.com/go-playground/validator到v10版本 而v10版本的validator取消了binding:"exists"的用法, 如:

Tags    string  `json:"tags" binding:"exists"`

falcon-plus代码中很多这样的用法都将不可用. 鉴于还有可能有其他相关兼容性问题, 具体需要详细测试. 所以这个issue先关掉了