-
Notifications
You must be signed in to change notification settings - Fork 133
chore: reinstate telemetry/docker change after revert MCP-49 #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,6 +7,7 @@ | |||||
import { EventCache } from "./eventCache.js"; | ||||||
import nodeMachineId from "node-machine-id"; | ||||||
import { getDeviceId } from "@mongodb-js/device-id"; | ||||||
import fs from "fs/promises"; | ||||||
|
||||||
type EventResult = { | ||||||
success: boolean; | ||||||
|
@@ -18,7 +19,7 @@ | |||||
export class Telemetry { | ||||||
private isBufferingEvents: boolean = true; | ||||||
/** Resolves when the device ID is retrieved or timeout occurs */ | ||||||
public deviceIdPromise: Promise<string> | undefined; | ||||||
public dataPromise: Promise<[string, boolean]> | undefined; | ||||||
|
public dataPromise: Promise<[string, boolean]> | undefined; | |
public setupPromise: Promise<[string, boolean]> | undefined; |
super nit, just may be a nicer name
Copilot
AI
Jul 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using Promise.any
instead of Promise.all
when checking file existence to short-circuit on the first success and avoid unnecessary filesystem checks.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't have thought of this myself but that is a good point 🤖
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private async start(): Promise<void> { | |
private async setup(): Promise<void> { |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -219,7 +219,7 @@ describe("Telemetry", () => { | |||||
expect(telemetry["isBufferingEvents"]).toBe(true); | ||||||
expect(telemetry.getCommonProperties().device_id).toBe(undefined); | ||||||
|
||||||
await telemetry.deviceIdPromise; | ||||||
await telemetry.dataPromise; | ||||||
|
await telemetry.dataPromise; | |
await telemetry.setupPromise; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await telemetry.dataPromise; | |
await telemetry.setupPromise; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await telemetry.dataPromise; | |
await telemetry.setupPromise; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.