Skip to content
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

Add Mixpanel Lexicon to version control #9149

Merged
merged 22 commits into from
Sep 24, 2024
Merged

Conversation

mnholtz
Copy link
Collaborator

@mnholtz mnholtz commented Sep 12, 2024

What does this PR do?

  • Closes https://github.com/pixiebrix/pixiebrix-app/issues/2972
  • Introduces a Lexicon Map for the purposes of enforcing devs to document new telemetry events introduced in our code base
  • Introduces new post-merge GitHub workflow upload-mixpanel-lexicon that will sync the version of the Lexicon we have in version control with Mixpanel

Future Work

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.81%. Comparing base (8318d74) to head (c762201).
Report is 317 commits behind head on main.

Files with missing lines Patch % Lines
src/telemetry/lexicon.ts 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    pixiebrix/pixiebrix-extension#9149      +/-   ##
==========================================
+ Coverage   74.24%   74.81%   +0.57%     
==========================================
  Files        1332     1365      +33     
  Lines       40817    42048    +1231     
  Branches     7634     7851     +217     
==========================================
+ Hits        30306    31460    +1154     
- Misses      10511    10588      +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mnholtz mnholtz marked this pull request as ready for review September 12, 2024 22:15
Copy link

github-actions bot commented Sep 12, 2024

Playwright test results

passed  126 passed
flaky  8 flaky
skipped  4 skipped

Details

report  Open report ↗︎
stats  138 tests across 45 suites
duration  3 hours, 20 minutes, 16 seconds
commit  c762201
info  For more information on how to debug and view this report, see our readme

Flaky tests

msedge-setup › setup/affiliated.setup.ts › authenticate with affiliated user
chrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
msedge › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
chrome › tests/pageEditor/copyMod.spec.ts › run a copied mod with a built-in integration
chrome › tests/regressions/sidebarLinks.spec.ts › #8206: clicking links from the sidebar doesn't crash browser
chrome › tests/regressions/welcomeStarterBricks.spec.ts › #8740: can view the starter mods on the pixiebrix.com/welcome page
msedge › tests/runtime/sidebar/sidebarNavigation.spec.ts › sidebar form and temporary panels are unavailable after navigation
chrome › tests/runtime/srcdocFrames.spec.ts › 8143: mods can run in srcdoc iframes

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
msedge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

@mnholtz
Copy link
Collaborator Author

mnholtz commented Sep 12, 2024

I'll need support from @grahamlangford to configure service acct credentials for the workflow. Would like to do a test run before deploying to ensure the workflow is configured properly


/**
* Transforms a LexiconMap into a JSON schema that can be used in the request body to upload the Lexicon to Mixpanel.
* See expected shape here https://developer.mixpanel.com/reference/upload-schemas-for-project
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick search, but it doesn't seem like there's any vended types for this type of request, right?

* Transforms a LexiconMap into a JSON schema that can be used in the request body to upload the Lexicon to Mixpanel.
* See expected shape here https://developer.mixpanel.com/reference/upload-schemas-for-project
*/
export function transformLexicon(lexiconMap: LexiconMap): JSONSchema {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe a more specific method name? transformLexiconMapToRequestSchema

Copy link

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.

@twschiller
Copy link
Contributor

FYI @Pashaminkovsky

@mnholtz mnholtz enabled auto-merge (squash) September 24, 2024 18:03
@mnholtz mnholtz merged commit 8664519 into main Sep 24, 2024
20 checks passed
@mnholtz mnholtz deleted the feature/mixpanel_lexicon_poc branch September 24, 2024 21:28
@twschiller twschiller added this to the 2.1.3 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants