Make the build hooks worker idempotent
Prior to this change, the payload was computed in the sidekiq worker which may have different data due to replication lag. This change computes the payload when we _enqueue_ the job, and skips the use of the build-hooks worker, which is retained for backwards compatibility, but is otherwise redundant. Added: Adds execute_build_hooks_inline feature-flag This adds a feature flag around the inline execution of job hooks.
显示
- app/models/ci/build.rb 13 个添加, 3 个删除app/models/ci/build.rb
- app/models/project.rb 7 个添加, 1 个删除app/models/project.rb
- app/workers/build_hooks_worker.rb 3 个添加, 3 个删除app/workers/build_hooks_worker.rb
- app/workers/ci/build_finished_worker.rb 1 个添加, 2 个删除app/workers/ci/build_finished_worker.rb
- config/feature_flags/development/execute_build_hooks_inline.yml 8 个添加, 0 个删除.../feature_flags/development/execute_build_hooks_inline.yml
- ee/spec/workers/ee/ci/build_finished_worker_spec.rb 9 个添加, 16 个删除ee/spec/workers/ee/ci/build_finished_worker_spec.rb
- spec/models/ci/build_spec.rb 47 个添加, 9 个删除spec/models/ci/build_spec.rb
- spec/models/project_spec.rb 1 个添加, 1 个删除spec/models/project_spec.rb
- spec/workers/build_hooks_worker_spec.rb 2 个添加, 2 个删除spec/workers/build_hooks_worker_spec.rb
- spec/workers/ci/build_finished_worker_spec.rb 17 个添加, 4 个删除spec/workers/ci/build_finished_worker_spec.rb
加载中
想要评论请 注册 或 登录