Log check result status in mergeability logger
Prior to this change, mergeability logger only logged the output of the `#success?` method. This is not granular enough: 1. The status can be `:inactive`, which is _neither_ successful nor unsuccessful. So can be false negatives in there. 2. The combined actually calls `#unsuccessful?` and succeeds if _no check is unsuccessful_. The `#unsuccessful?` method is implemented as `failed? || checking?`. So if the check fails, we don't know if it's intended to be temporary (`#checking?`) a real failure (`#failed?`). We recently ran into this debugging a failed auto merge, where it the approval check appears to have failed, but we can't pin down whether it was due to value from the PostgreSQL or Redis. With this change, we also log the actual status, so that we can differentiate between different types of successes and failures. Changelog: changed
显示
- .rubocop_todo/gitlab/strong_memoize_attr.yml 0 个添加, 2 个删除.rubocop_todo/gitlab/strong_memoize_attr.yml
- app/services/merge_requests/mergeability/logger.rb 4 个添加, 6 个删除app/services/merge_requests/mergeability/logger.rb
- app/services/merge_requests/mergeability/run_checks_service.rb 8 个添加, 8 个删除...ervices/merge_requests/mergeability/run_checks_service.rb
- spec/services/merge_requests/mergeability/logger_spec.rb 20 个添加, 0 个删除spec/services/merge_requests/mergeability/logger_spec.rb
加载中
想要评论请 注册 或 登录