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

Report business platform ID instead of partner ID when relevant #5120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amcaplan
Copy link
Contributor

@amcaplan amcaplan commented Dec 17, 2024

WHY are these changes introduced?

To ensure we are tracking BP orgs and Partner orgs separately.

WHAT is this pull request doing?

Introduces a new business_platform_id field in analytics tracking to differentiate between Partner and Business Platform organizations. When working with a Business Platform organization, the system now logs the business_platform_id instead of the partner_id.

How to test your changes?

Check that when working with App Management, the correct field is reported in analytics (see verbose logs)

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.33% (-0% 🔻)
8839/11734
🟡 Branches
70.59% (-0.01% 🔻)
4289/6076
🟡 Functions 75.2% 2314/3077
🟡 Lines
75.87% (+0.01% 🔼)
8356/11014
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app-context.ts
96.3% (-3.7% 🔻)
85.71% (-3.76% 🔻)
100%
96.15% (-3.85% 🔻)
🟢
... / app-event-watcher.ts
93.83% (-1.23% 🔻)
86.49% (-2.7% 🔻)
90.48% 98.61%

Test suite run success

1994 tests passing in 900 suites.

Report generated by 🧪jest coverage report action from 39bfdc6

@amcaplan amcaplan force-pushed the report-BP-id-to-analytics branch from 6a6802a to a152cf6 Compare December 17, 2024 18:48
@amcaplan amcaplan marked this pull request as ready for review December 19, 2024 19:51
@amcaplan amcaplan requested a review from a team as a code owner December 19, 2024 19:51
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

@amcaplan amcaplan force-pushed the report-BP-id-to-analytics branch from a152cf6 to e51c6c6 Compare December 19, 2024 22:19
@amcaplan amcaplan force-pushed the report-BP-id-to-analytics branch 2 times, most recently from c2c710a to 39bfdc6 Compare December 22, 2024 19:15
Copy link
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/monorail.d.ts
@@ -16,6 +16,7 @@ export interface Schemas {
             env_plugin_installed_all?: Optional<string>;
         };
         public: {
+            business_platform_id?: Optional<number>;
             partner_id?: Optional<number>;
             command: string;
             project_type?: Optional<string>;
packages/cli-kit/dist/public/node/plugins.d.ts
@@ -16,7 +16,7 @@ import { Config, Interfaces } from '@oclif/core';
  * @returns A dictionary of plug-in names to the response from the hook.
  */
 export declare function fanoutHooks<TPluginMap extends HookReturnsPerPlugin, TEvent extends string & keyof TPluginMap>(config: Interfaces.Config, event: TEvent, options: TPluginMap[typeof event]['options'], timeout?: number): Promise<Partial<TPluginMap[typeof event]['pluginReturns']>>;
-type AppSpecificMonorailFields = PickByPrefix<MonorailEventPublic, 'app_', 'project_type' | 'api_key' | 'partner_id'> & PickByPrefix<MonorailEventPublic, 'cmd_extensions_'> & PickByPrefix<MonorailEventPublic, 'cmd_scaffold_'>;
+type AppSpecificMonorailFields = PickByPrefix<MonorailEventPublic, 'app_', 'project_type' | 'api_key' | 'partner_id' | 'business_platform_id'> & PickByPrefix<MonorailEventPublic, 'cmd_extensions_'> & PickByPrefix<MonorailEventPublic, 'cmd_scaffold_'>;
 type AppSpecificSensitiveMonorailFields = PickByPrefix<MonorailEventSensitive, 'app_'>;
 export interface HookReturnsPerPlugin extends HookReturnPerTunnelPlugin {
     public_command_metadata: {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant