Commit e0decc6b authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '330939-remove-canary_ingress_weight_control-ff' into 'master'

Remove canary_ingress_weight_control feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!63710
parents d08dbd1f 1b29140c
......@@ -66,9 +66,7 @@ export default {
return this.isEmpty;
},
canRenderCanaryWeight() {
return (
this.glFeatures.canaryIngressWeightControl && !isEmpty(this.deployBoardData.canary_ingress)
);
return !isEmpty(this.deployBoardData.canary_ingress);
},
instanceCount() {
const { instances } = this.deployBoardData;
......
......@@ -15,9 +15,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
push_frontend_feature_flag(:prometheus_computed_alerts)
push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate)
end
before_action do
push_frontend_feature_flag(:canary_ingress_weight_control, default_enabled: true)
end
before_action :authorize_read_environment!, except: [:metrics, :additional_metrics, :metrics_dashboard, :metrics_redirect]
before_action :authorize_create_environment!, only: [:new, :create]
before_action :authorize_stop_environment!, only: [:stop]
......
......@@ -98,11 +98,7 @@ module Clusters
pods = read_pods(environment.deployment_namespace)
deployments = read_deployments(environment.deployment_namespace)
ingresses = if ::Feature.enabled?(:canary_ingress_weight_control, environment.project, default_enabled: true)
read_ingresses(environment.deployment_namespace)
else
[]
end
ingresses = read_ingresses(environment.deployment_namespace)
# extract only the data required for display to avoid unnecessary caching
{
......
......@@ -34,10 +34,6 @@ module Environments
private
def validate(environment)
unless Feature.enabled?(:canary_ingress_weight_control, environment.project, default_enabled: true)
return error(_("Feature flag is not enabled on the environment's project."))
end
unless can?(current_user, :update_environment, environment)
return error(_('You do not have permission to update the environment.'))
end
......
---
name: canary_ingress_weight_control
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43816
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/260295
milestone: '13.5'
type: development
group: group::release
default_enabled: true
......@@ -13731,9 +13731,6 @@ msgstr ""
msgid "Feature Flags"
msgstr ""
msgid "Feature flag is not enabled on the environment's project."
msgstr ""
msgid "Feature flag status"
msgstr ""
......
......@@ -12,7 +12,6 @@ describe('Deploy Board', () => {
const createComponent = (props = {}) =>
mount(Vue.extend(DeployBoard), {
provide: { glFeatures: { canaryIngressWeightControl: true } },
propsData: {
deployBoardData: deployBoardMockData,
isLoading: false,
......
......@@ -439,16 +439,6 @@ RSpec.describe Clusters::Platforms::Kubernetes do
include_examples 'successful deployment request'
end
context 'when canary_ingress_weight_control feature flag is disabled' do
before do
stub_feature_flags(canary_ingress_weight_control: false)
end
it 'does not fetch ingress data from kubernetes' do
expect(subject[:ingresses]).to be_empty
end
end
end
context 'when the kubernetes integration is disabled' do
......
......@@ -32,16 +32,6 @@ RSpec.describe Environments::CanaryIngress::UpdateService, :clean_gitlab_redis_c
let(:params) { { weight: 50 } }
let(:canary_ingress) { ::Gitlab::Kubernetes::Ingress.new(kube_ingress(track: :canary)) }
context 'when canary_ingress_weight_control feature flag is disabled' do
before do
stub_feature_flags(canary_ingress_weight_control: false)
end
it_behaves_like 'failed request' do
let(:message) { "Feature flag is not enabled on the environment's project." }
end
end
context 'when the actor does not have permission to update environment' do
let(:user) { reporter }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment