From 12669306479e0ef4b53d242a450055b42ea6f665 Mon Sep 17 00:00:00 2001 From: Zhihe Li Date: Wed, 21 Aug 2024 14:29:17 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Remove=20client=20agent?= =?UTF-8?q?=20feature=20flag=20(#2449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/routes/scopes/scope/projects.js | 25 ++++++++----------- .../scopes/scope/projects/sessions/session.js | 2 -- ui/desktop/config/environment.js | 7 +----- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/ui/desktop/app/routes/scopes/scope/projects.js b/ui/desktop/app/routes/scopes/scope/projects.js index a4160ed1c..736c8a190 100644 --- a/ui/desktop/app/routes/scopes/scope/projects.js +++ b/ui/desktop/app/routes/scopes/scope/projects.js @@ -36,7 +36,6 @@ export default class ScopesScopeProjectsRoute extends Route { @service clientAgentSessions; @service pollster; @service flashMessages; - @service features; // =methods @@ -52,21 +51,17 @@ export default class ScopesScopeProjectsRoute extends Route { * @return {Promise} */ async model() { - if (this.features.isEnabled('client-agent')) { - // Setup the poller job - if (!this.job) { - this.boundPoller = this.poller.bind(this); - this.job = this.pollster.findOrCreateJob(this.boundPoller, 2000); - } + // Setup the poller job + if (!this.job) { + this.boundPoller = this.poller.bind(this); + this.job = this.pollster.findOrCreateJob(this.boundPoller, 2000); + } - const isClientAgentRunning = await this.ipc.invoke( - 'isClientAgentRunning', - ); - if (isClientAgentRunning) { - this.job.start(); - } else { - this.job.stop(); - } + const isClientAgentRunning = await this.ipc.invoke('isClientAgentRunning'); + if (isClientAgentRunning) { + this.job.start(); + } else { + this.job.stop(); } const { id: scope_id } = this.modelFor('scopes.scope'); diff --git a/ui/desktop/app/routes/scopes/scope/projects/sessions/session.js b/ui/desktop/app/routes/scopes/scope/projects/sessions/session.js index 53ea5d197..2fe6171ef 100644 --- a/ui/desktop/app/routes/scopes/scope/projects/sessions/session.js +++ b/ui/desktop/app/routes/scopes/scope/projects/sessions/session.js @@ -14,7 +14,6 @@ export default class ScopesScopeProjectsSessionsSessionRoute extends Route { @service clientAgentSessions; @service flashMessages; @service intl; - @service features; // =methods @@ -30,7 +29,6 @@ export default class ScopesScopeProjectsSessionsSessionRoute extends Route { // If we don't have any credentials, we'll try to fetch them from the client agent in case this session // was initiated through the client agent. if ( - this.features.isEnabled('client-agent') && !session.credentials.length && (await this.ipc.invoke('isClientAgentRunning')) ) { diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index d3ae0cfaf..801c944cf 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -60,9 +60,7 @@ module.exports = function (environment) { timeout: 4000, }, - featureFlags: { - 'client-agent': false, - }, + featureFlags: {}, }; if (environment === 'development') { @@ -80,9 +78,6 @@ module.exports = function (environment) { ENV['ember-cli-mirage'].enabled = process.env.ENABLE_MIRAGE ? JSON.parse(process.env.ENABLE_MIRAGE) : true; - - // Enable features in development - ENV.featureFlags['client-agent'] = true; } if (environment === 'test') {