-
Notifications
You must be signed in to change notification settings - Fork 23
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
Create a transformer to enforce current terminology in reportEvent without breaking Mixpanel events #8774
Conversation
…report-event-tranformer
…report-event-tranformer
…report-event-tranformer
*/ | ||
export async function clearExtensionDebugLogs( | ||
extensionId: UUID, | ||
export async function clearModComponentDebugLogs( |
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.
Not sure of the safety of changing the indexes for the database.
Since this is for debug and trace only it may be safe? Otherwise I can revert this change
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.
Since this is for debug and trace only it may be safe?
I suspect we'd need to write some sort of migration. But I don't have enough experience with IDB to know
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.
That's what I was wondering. I can look into it if we want to move forward with this concept
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.
There's this comment here suggesting we don't really need the logs anyways?
pixiebrix-extension/src/telemetry/logging.ts
Lines 133 to 139 in 9ccb875
// For now, just clear local logs whenever we need to upgrade the log database structure. There's no real use | |
// cases for looking at historic local logs | |
db.deleteObjectStore(ENTRY_OBJECT_STORE); | |
console.warn( | |
"Deleting object store %s for upgrade", | |
ENTRY_OBJECT_STORE, | |
); |
But if we were to do it properly we'd bump the database version number and properly implement that upgrade
function
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.
Per the comment, I'm just going to bump the version number
src/telemetry/reportEvent.ts
Outdated
event: Event, | ||
data: UnknownObject = {}, | ||
data: TData extends ReservedKeys ? never : TData = {} as never, |
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.
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.
There might be a better type that explicitly states which key(s) is the problem, but this works as a POC
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.
What about never
on the types of the individual offending properties? I'm sure we could get fancy with that somehow but it would obviously be nice to have a more specific type error
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.
Actually there's a much simpler solution that I didn't catch my first time around
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.
Did you make that change? I noticed you marked this ready for review
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.
i did
Playwright test resultsDetails Open report ↗︎ Flaky testsedge › tests/extensionConsole/modsPage.spec.ts › can open mod in the workshop Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8774 +/- ##
==========================================
- Coverage 74.24% 74.19% -0.06%
==========================================
Files 1332 1333 +1
Lines 40817 40892 +75
Branches 7634 7651 +17
==========================================
+ Hits 30306 30340 +34
- Misses 10511 10552 +41 ☔ View full report in Codecov by Sentry. |
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
Discussion
blueprintId
fromreportEvent
payloads because it breaks Mixpanel reportsblueprintId
&&recipeId
&&modId
for backwards compatibilityFor more information on our expectations for the PR process, see the
code review principles doc