diff --git a/app/services/git/base_hooks_service.rb b/app/services/git/base_hooks_service.rb index f9280be7ee220684f10027bcf098f43a681d8fd0..6a8e4d17859ecfad5e6043395d40ca3d3010728a 100644 --- a/app/services/git/base_hooks_service.rb +++ b/app/services/git/base_hooks_service.rb @@ -83,7 +83,6 @@ def enqueue_invalidate_cache def enqueue_notify_kas return unless Gitlab::Kas.enabled? - return unless Feature.enabled?(:notify_kas_on_git_push, project) Clusters::Agents::NotifyGitPushWorker.perform_async(project.id) end diff --git a/app/workers/clusters/agents/notify_git_push_worker.rb b/app/workers/clusters/agents/notify_git_push_worker.rb index d2994bb9144180df1466437c71f8ab3a0419bda1..db1de0b3518f4b5e28469b6ac55d57c919e31a34 100644 --- a/app/workers/clusters/agents/notify_git_push_worker.rb +++ b/app/workers/clusters/agents/notify_git_push_worker.rb @@ -14,7 +14,6 @@ class NotifyGitPushWorker def perform(project_id) return unless project = ::Project.find_by_id(project_id) - return unless Feature.enabled?(:notify_kas_on_git_push, project) Gitlab::Kas::Client.new.send_git_push_event(project: project) end diff --git a/config/feature_flags/development/notify_kas_on_git_push.yml b/config/feature_flags/development/notify_kas_on_git_push.yml deleted file mode 100644 index 32806418bce2d67616952569d2c332395fe07a0b..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/notify_kas_on_git_push.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: notify_kas_on_git_push -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119168 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/410429 -milestone: '16.0' -type: development -group: group::environments -default_enabled: true diff --git a/doc/user/clusters/agent/gitops.md b/doc/user/clusters/agent/gitops.md index aff78ed477b7923ec5e7214ed1f38489445f1ad4..4d33603f77008f9b9f43beed4e0eed2b7195faf1 100644 --- a/doc/user/clusters/agent/gitops.md +++ b/doc/user/clusters/agent/gitops.md @@ -78,6 +78,7 @@ For additional repository structure recommendations, see the [Flux documentation > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/392852) in GitLab 16.1 with a [flag](../../../administration/feature_flags.md) named `notify_kas_on_git_push`. Disabled by default. > - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126527) in GitLab 16.2. +> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/410429) in GitLab 16.3. Usually, the Flux source controller reconciles Git repositories at configured intervals. This can cause delays between a `git push` and the reconciliation of the cluster state, and results in diff --git a/spec/services/git/base_hooks_service_spec.rb b/spec/services/git/base_hooks_service_spec.rb index 60883db0cd5d0250fd1bd5f717a482653c0755ad..e083c8d7316d69587e63559f36abc3f56693e911 100644 --- a/spec/services/git/base_hooks_service_spec.rb +++ b/spec/services/git/base_hooks_service_spec.rb @@ -363,17 +363,5 @@ def commits_count subject.execute end end - - context 'when :notify_kas_on_git_push feature flag is disabled' do - before do - stub_feature_flags(notify_kas_on_git_push: false) - end - - it do - expect(Clusters::Agents::NotifyGitPushWorker).not_to receive(:perform_async) - - subject.execute - end - end end end diff --git a/spec/workers/clusters/agents/notify_git_push_worker_spec.rb b/spec/workers/clusters/agents/notify_git_push_worker_spec.rb index 561a66b86e9d7d3606eb5b77a2f0395085cd2037..c6ef8dc33383ccdbd645c0fe4cd8b3833c29f52a 100644 --- a/spec/workers/clusters/agents/notify_git_push_worker_spec.rb +++ b/spec/workers/clusters/agents/notify_git_push_worker_spec.rb @@ -25,17 +25,5 @@ expect { subject }.not_to raise_error end end - - context 'when the :notify_kas_on_git_push feature flag is disabled' do - before do - stub_feature_flags(notify_kas_on_git_push: false) - end - - it 'does not notify KAS' do - expect(Gitlab::Kas::Client).not_to receive(:new) - - subject - end - end end end