diff --git a/app/workers/personal_access_tokens/expiring_worker.rb b/app/workers/personal_access_tokens/expiring_worker.rb index cfbc81700d46cf9ed520d2ce7f91df25500d1ab1..62152e1d53d522db3599e32d4cbf445f36470dbd 100644 --- a/app/workers/personal_access_tokens/expiring_worker.rb +++ b/app/workers/personal_access_tokens/expiring_worker.rb @@ -44,11 +44,7 @@ def perform(*args) delegate :over_time?, to: :runtime_limiter def notification_intervals - if Feature.enabled?(:expiring_pats_30d_60d_notifications, :instance) - PersonalAccessToken::NOTIFICATION_INTERVALS.keys - else - [:seven_days] - end + PersonalAccessToken::NOTIFICATION_INTERVALS.keys end def process_user_tokens(interval = :seven_days) diff --git a/config/feature_flags/gitlab_com_derisk/expiring_pats_30d_60d_notifications.yml b/config/feature_flags/gitlab_com_derisk/expiring_pats_30d_60d_notifications.yml deleted file mode 100644 index d392480d0b4f24b6ce7c66fdb1ba143525fc048c..0000000000000000000000000000000000000000 --- a/config/feature_flags/gitlab_com_derisk/expiring_pats_30d_60d_notifications.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: expiring_pats_30d_60d_notifications -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/464040 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166683 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/480556 -milestone: '17.6' -group: group::authentication -type: gitlab_com_derisk -default_enabled: false diff --git a/doc/user/group/settings/group_access_tokens.md b/doc/user/group/settings/group_access_tokens.md index cb004add130e591a7c0364aceb76edf4c2f3dbc8..09c300f52e5bd222dde138b5690cfbd61dd23dbb 100644 --- a/doc/user/group/settings/group_access_tokens.md +++ b/doc/user/group/settings/group_access_tokens.md @@ -215,9 +215,7 @@ automatically applied: ### Group access token expiry emails > - Sixty and thirty day expiry notification emails [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/464040) in GitLab 17.6 [with a flag](../../../administration/feature_flags.md) named `expiring_pats_30d_60d_notifications`. Disabled by default. - -FLAG: -The availability of the sixty and thirty day expiry notification emails is controlled by a feature flag. For more information, see the history. +> - Sixty and thirty day notification emails [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173792) in GitLab 17.7. Feature flag `expiring_pats_30d_60d_notifications` removed. GitLab runs a check every day at 1:00 AM UTC to identify group access tokens that are expiring in the near future. Direct members of the group with the Owner role are notified by email when these tokens expire in a certain number of days. The number of days differs depending on the version of GitLab: diff --git a/doc/user/profile/personal_access_tokens.md b/doc/user/profile/personal_access_tokens.md index cbac1379f598d3b9c508964868c5c0dbc41f1bff..8312271067e52952cba8f8418f2ad68fab355437 100644 --- a/doc/user/profile/personal_access_tokens.md +++ b/doc/user/profile/personal_access_tokens.md @@ -259,9 +259,7 @@ automatically applied: ### Personal access token expiry emails > - Sixty and thirty day expiry notification emails [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/464040) in GitLab 17.6 [with a flag](../../administration/feature_flags.md) named `expiring_pats_30d_60d_notifications`. Disabled by default. - -FLAG: -The availability of the sixty and thirty day expiry notification emails is controlled by a feature flag. For more information, see the history. +> - Sixty and thirty day notification emails [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173792) in GitLab 17.7. Feature flag `expiring_pats_30d_60d_notifications` removed. GitLab runs a check every day at 1:00 AM UTC to identify personal access tokens that are expiring in the near future. The owners of these tokens are notified by email when these tokens expire in a certain number of days. The number of days differs depending on the version of GitLab: diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md index 4e12b16a65842048864e4a95307764091feb4c03..80b5e75aa17db1a9b325644692f79e98d350a2d0 100644 --- a/doc/user/project/settings/project_access_tokens.md +++ b/doc/user/project/settings/project_access_tokens.md @@ -169,9 +169,7 @@ automatically applied: ### Project access token expiry emails > - Sixty and thirty day expiry notification emails [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/464040) in GitLab 17.6 [with a flag](../../../administration/feature_flags.md) named `expiring_pats_30d_60d_notifications`. Disabled by default. - -FLAG: -The availability of the sixty and thirty day expiry notification emails is controlled by a feature flag. For more information, see the history. +> - Sixty and thirty day notification emails [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173792) in GitLab 17.7. Feature flag `expiring_pats_30d_60d_notifications` removed. GitLab runs a check every day at 1:00 AM UTC to identify project access tokens that are expiring in the near future. Direct members of the project with at least the Maintainer role are notified by email when these tokens expire in a certain number of days. The number of days differs depending on the version of GitLab: diff --git a/spec/workers/personal_access_tokens/expiring_worker_spec.rb b/spec/workers/personal_access_tokens/expiring_worker_spec.rb index 303b2cd4b2a944656a6a6067f729257cd2055305..1023f38f1fd973810a918cbe2db024aff5d5c7e4 100644 --- a/spec/workers/personal_access_tokens/expiring_worker_spec.rb +++ b/spec/workers/personal_access_tokens/expiring_worker_spec.rb @@ -172,22 +172,6 @@ expect(expiring_token.thirty_days_notification_sent_at).to eq(Time.current) expect(expiring_token.sixty_days_notification_sent_at).to be_nil end - - context 'when expiring_pats_30d_60d_notifications feature flag is disabled' do - before do - stub_feature_flags(expiring_pats_30d_60d_notifications: false) - end - - it 'does not call notification services' do - expect(worker).not_to receive(:notification_service) - - worker.perform - end - - it 'does not change the notification delivered of the token' do - expect { worker.perform }.not_to change { expiring_token.reload.thirty_days_notification_sent_at } - end - end end context 'when tokens expire within 60 days' do @@ -218,22 +202,6 @@ expect(expiring_token.thirty_days_notification_sent_at).to be_nil expect(expiring_token.sixty_days_notification_sent_at).to eq(Time.current) end - - context 'when expiring_pats_30d_60d_notifications feature flag is disabled' do - before do - stub_feature_flags(expiring_pats_30d_60d_notifications: false) - end - - it 'does not call notification services' do - expect(worker).not_to receive(:notification_service) - - worker.perform - end - - it 'does not change the notification delivered of the token' do - expect { worker.perform }.not_to change { expiring_token.reload.sixty_days_notification_sent_at } - end - end end context 'when no tokens need to be notified' do