larrow / shelter

A private container registry server based on Docker Distribution
63 stars 14 forks source link

搜索镜像报错 #32

Closed linsheng9731 closed 7 years ago

linsheng9731 commented 7 years ago

搜索功能挂了: http://registry.xxxx.com/search?utf8=%E2%9C%93&q=redis


I, [2016-12-20T12:24:06.880473 #1]  INFO -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b] Started GET "/search?utf8=%E2%9C%93&q=redis" for 172.17.0.6 at 2016-12-20 12:24:06 +0000
I, [2016-12-20T12:24:06.881590 #1]  INFO -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b] Processing by SearchController#index as HTML
I, [2016-12-20T12:24:06.881659 #1]  INFO -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b]   Parameters: {"utf8"=>"✓", "q"=>"redis"}
D, [2016-12-20T12:24:06.883773 #1] DEBUG -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b]   User Load (0.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 2], ["LIMIT", 1]]
I, [2016-12-20T12:24:06.885873 #1]  INFO -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b] Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.4ms)
F, [2016-12-20T12:24:06.886805 #1] FATAL -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b]
F, [2016-12-20T12:24:06.886859 #1] FATAL -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b] ArgumentError (Relation passed to #or must be structurally compatible. Incompatible values: [:joins, :references]):
F, [2016-12-20T12:24:06.886936 #1] FATAL -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b]
F, [2016-12-20T12:24:06.887042 #1] FATAL -- : [e89e1587-67e3-4c83-bec9-31bd884d0a5b] app/controllers/search_controller.rb:4:in `index'
fsword commented 7 years ago

确认有问题,这块没有添加测试用例,导致没有得到充分回归

fsword commented 7 years ago

悬赏解决这个issue:

  1. 完成这个issue,报酬为0.1个比特币,支付时间为MR合入的24小时之后
  2. 修复请提交MR到hotfix/search_fail这个分支,同时写明自己的比特币收款地址
  3. 修复代码的质量最低标准要求通过 Integration test 的用例回归
    • integration_test 目录用于验收测试,其中06号feature是针对这个issue补充的测试用例
  4. 最终代码需要经过我review才能通过MR
  5. 如有多个MR提交,以通过我review的最早那个MR为准
    • 其它MR如果发现被抄袭,可以在这里提出异议,公开讨论
    • MR通过24小时后如无未处理的异议,我将会按照约定支付报酬
  6. 如果本周没有人参与这个悬赏,我将在周末自己完成这个issue


代码在开发环境下可以直接进行 integration test 的回归测试,方法如下(假定当前目录为 shelter 源码根目录):

```
# cd integration_test
# docker-compose down # 清理可能存在的旧容器
# docker-compose build # 使用新代码构建docker镜像
# docker-compose up -d # 启动所有服务节点
# docker-compose logs -f test # 查看测试节点的输出
```

然后观察最后一条命令的输出结果即可