LoginSignup
0
0

More than 1 year has passed since last update.

renovateはテストが一つもないと動かないので、そういうときは extends に skipStatusChecks を入れよう(ただし場合による)

Last updated at Posted at 2021-09-29

備忘録

  • 本番のリポジトリにはちゃんとしたテストがある
  • クローンリポジトリにはテストがない
    • オートマージの挙動を確かめたいだけなので不要という判断をした

という状況で、書き方には何も問題がなさそうだったのにオートマージが進行しないという問題が起きていた。

renovateの挙動として、テストが一つもない状態をテストの成功と判断することはしていないとのこと。

Currently, automerge treats lack of status checks on a branch as not ready for automerge, but some repositories without tests may still want dependencies renovated.

We can't simply treat "no status checks === success" because there may be a race condition where we create a branch and no status checks exist yet. And if GitHub have some latency or a CI service is slow to set its status check then we don't want to blindly automerge.

https://github.com/renovatebot/renovate/issues/351

というわけで、ただ単にオートマージの挙動を確かめたいだけの時は、:skipStatusChecks をextendsに入れよう。

renovate.json
{
  extends: [
    "config:base",
    ":automergePatch",
    ":automergeMinor",
    ":skipStatusChecks"  // これ
  ]
}

当然ながら、本番のリポジトリでこれを行うのは非常に危険な行為です。renovateのような依存性更新botを導入する際は、それらのバグが検知できるようなテストを用意してから行いましょう。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0