1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-09 13:47:13 +02:00

chore: remove registerFrontendClient flag, keep feature

This commit is contained in:
henry-the-valet (aider) 2025-05-21 17:33:42 +00:00
parent 76b201e40e
commit 4106a3a917
8 changed files with 7 additions and 42 deletions

View File

@ -16,7 +16,6 @@ import WarningAmberRounded from '@mui/icons-material/WarningAmberRounded';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues.tsx';
import { useUiFlag } from 'hooks/useUiFlag';
const StyledTable = styled('table')(({ theme }) => ({
fontSize: theme.fontSizes.smallerBody,
@ -197,7 +196,6 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
const { elementRef, width } = useElementWidth();
const navigate = useNavigate();
const theme = useTheme();
const registerFrontendClientEnabled = useUiFlag('registerFrontendClient');
const mode = getApplicationIssues(data);
@ -296,23 +294,8 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
{environment.instanceCount}
</StyledCell>
</tr>
{!registerFrontendClientEnabled ? (
<tr>
<StyledCell>SDK:</StyledCell>
<StyledCell>
{environment.sdks.map(
(sdk) => (
<div key={sdk}>
{sdk}
</div>
),
)}
</StyledCell>
</tr>
) : null}
{registerFrontendClientEnabled &&
environment.backendSdks.length > 0 ? (
{environment.backendSdks.length > 0 ? (
<tr>
<StyledCell>
Backend SDK:
@ -329,8 +312,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
</tr>
) : null}
{registerFrontendClientEnabled &&
environment.frontendSdks.length > 0 ? (
{environment.frontendSdks.length > 0 ? (
<tr>
<StyledCell>
Frontend SDK:

View File

@ -88,7 +88,6 @@ export type UiFlags = {
edgeObservability?: boolean;
addEditStrategy?: boolean;
cleanupReminder?: boolean;
registerFrontendClient?: boolean;
featureLinks?: boolean;
projectLinkTemplates?: boolean;
};

View File

@ -137,8 +137,7 @@ export class FrontendApiService {
if (
metrics.instanceId &&
typeof sdkVersion === 'string' &&
this.flagResolver.isEnabled('registerFrontendClient')
typeof sdkVersion === 'string'
) {
const client = {
appName: metrics.appName,

View File

@ -46,9 +46,7 @@ let destroy: () => Promise<void>;
beforeAll(async () => {
const setup = await getSetup({
experimental: {
flags: {
registerFrontendClient: true,
},
flags: {},
},
});
request = setup.request;

View File

@ -228,20 +228,14 @@ export default class ClientMetricsController extends Controller {
app.sdkType === 'frontend' &&
typeof app.sdkVersion === 'string'
) {
if (
this.flagResolver.isEnabled(
'registerFrontendClient',
)
) {
this.clientInstanceService.registerFrontendClient({
appName: app.appName,
instanceId: app.instanceId,
this.clientInstanceService.registerFrontendClient({
appName: app.appName,
instanceId: app.instanceId,
environment: app.environment,
sdkType: app.sdkType,
sdkVersion: app.sdkVersion,
projects: app.projects,
});
}
} else {
promises.push(
this.clientInstanceService.registerBackendClient(

View File

@ -59,7 +59,6 @@ export type IFlagKey =
| 'addEditStrategy'
| 'cleanupReminder'
| 'removeInactiveApplications'
| 'registerFrontendClient'
| 'featureLinks'
| 'projectLinkTemplates'
| 'reportUnknownFlags'
@ -283,10 +282,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_REMOVE_INACTIVE_APPLICATIONS,
false,
),
registerFrontendClient: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
false,
),
featureLinks: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_FEATURE_LINKS,
false,

View File

@ -53,7 +53,6 @@ process.nextTick(async () => {
addEditStrategy: true,
cleanupReminder: true,
strictSchemaValidation: true,
registerFrontendClient: true,
featureLinks: true,
projectLinkTemplates: true,
reportUnknownFlags: true,

View File

@ -54,7 +54,6 @@ beforeAll(async () => {
experimental: {
flags: {
strictSchemaValidation: true,
registerFrontendClient: true,
},
},
},