Skip to content

Commit f0cdfd1

Browse files
committed
chore: apply prettier formatting to telemetry files
Fixes the lint CI job which runs prettier --check before eslint. Co-authored-by: Isaac Signed-off-by: samikshya-chand_data <samikshya.chand@databricks.com>
1 parent e8dadb6 commit f0cdfd1

3 files changed

Lines changed: 5 additions & 17 deletions

File tree

lib/telemetry/DatabricksTelemetryExporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default class DatabricksTelemetryExporter {
234234
protoLogs,
235235
};
236236

237-
const authHeaders = authenticatedExport ? ((await this.context.getAuthProvider()?.authenticate()) ?? {}) : {};
237+
const authHeaders = authenticatedExport ? (await this.context.getAuthProvider()?.authenticate()) ?? {} : {};
238238

239239
// Get agent with proxy settings (same pattern as CloudFetchResultHandler and DBSQLSession)
240240
const connectionProvider = await this.context.getConnectionProvider();

lib/telemetry/FeatureFlagCache.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ export default class FeatureFlagCache {
4646

4747
private circuitBreakerRegistry: CircuitBreakerRegistry;
4848

49-
constructor(
50-
private context: IClientContext,
51-
circuitBreakerRegistry?: CircuitBreakerRegistry,
52-
) {
49+
constructor(private context: IClientContext, circuitBreakerRegistry?: CircuitBreakerRegistry) {
5350
this.contexts = new Map();
5451
this.circuitBreakerRegistry = circuitBreakerRegistry || new CircuitBreakerRegistry(context);
5552
}

tests/unit/telemetry/FeatureFlagCache.test.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ describe('FeatureFlagCache', () => {
141141
const fetchStub = sinon.stub(cache as any, 'fetchFeatureFlags').callsFake(async () => {
142142
const ctx = (cache as any).contexts.get(host);
143143
if (ctx) {
144-
ctx.flags.set(
145-
'databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs',
146-
'true',
147-
);
144+
ctx.flags.set('databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs', 'true');
148145
}
149146
});
150147

@@ -166,10 +163,7 @@ describe('FeatureFlagCache', () => {
166163
const fetchStub = sinon.stub(cache as any, 'fetchFeatureFlags').callsFake(async () => {
167164
const ctx = (cache as any).contexts.get(host);
168165
if (ctx) {
169-
ctx.flags.set(
170-
'databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs',
171-
'true',
172-
);
166+
ctx.flags.set('databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs', 'true');
173167
}
174168
});
175169

@@ -302,10 +296,7 @@ describe('FeatureFlagCache', () => {
302296
const fetchStub = sinon.stub(cache as any, 'fetchFeatureFlags').callsFake(async () => {
303297
const ctx = (cache as any).contexts.get(host);
304298
if (ctx) {
305-
ctx.flags.set(
306-
'databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs',
307-
'true',
308-
);
299+
ctx.flags.set('databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForNodeJs', 'true');
309300
}
310301
});
311302

0 commit comments

Comments
 (0)