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

refactor: Permanently enable frontend client registration

This commit is contained in:
unleash-bot 2025-07-02 17:21:36 +00:00
parent 30fbc62f9b
commit a0445d8d14
8 changed files with 12 additions and 50 deletions

View File

@ -197,7 +197,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 +295,7 @@ 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

@ -84,7 +84,6 @@ export type UiFlags = {
showUserDeviceCount?: boolean;
consumptionModel?: boolean;
edgeObservability?: boolean;
registerFrontendClient?: boolean;
customMetrics?: boolean;
lifecycleMetrics?: boolean;
createFlagDialogCache?: boolean;

View File

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

View File

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

View File

@ -238,20 +238,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,
environment: app.environment,
sdkType: app.sdkType,
sdkVersion: app.sdkVersion,
projects: app.projects,
});
}
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

@ -54,7 +54,6 @@ export type IFlagKey =
| 'uniqueSdkTracking'
| 'consumptionModel'
| 'edgeObservability'
| 'registerFrontendClient'
| 'reportUnknownFlags'
| 'lifecycleMetrics'
| 'customMetrics'
@ -260,10 +259,6 @@ const flags: IFlags = {
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
false,
),
registerFrontendClient: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
false,
),
reportUnknownFlags: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REPORT_UNKNOWN_FLAGS,
false,

View File

@ -51,7 +51,6 @@ process.nextTick(async () => {
deltaApi: true,
uniqueSdkTracking: true,
strictSchemaValidation: true,
registerFrontendClient: true,
reportUnknownFlags: true,
customMetrics: true,
lifecycleMetrics: true,

View File

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