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

chore: remove all remaining legacy analytics native code #8829

Merged
merged 9 commits into from
Mar 7, 2024

Conversation

NicolasMassart
Copy link
Contributor

@NicolasMassart NicolasMassart commented Mar 4, 2024

Description

Remove all Mixpanel analytics native code and dependencies.

Android

  • Remove mixpanel native dependencies in android/app/build.gradle
  • all native module code in Android related to RCTAnalytics in android/app/src/main/java/io/metamask/nativeModules
  • MM_MIXPANEL_TOKEN in .android.env and gradle files

iOS

  • Remove mixpanel native dependencies in ios/mixpanel-iphone and ios/Mixpanel.framework
  • all native module code in iOS related to RCTAnalytics in ios/MetaMask/NativeModules/RCTAnalytics
  • all mixpanel code in ios
  • all framework link in ios/MetaMask.xcodeproj
  • ios/mixpanel-iphone git submodule
  • MM_MIXPANEL_TOKEN in plist files

Common

  • all mixpanel properties (search for mixpanel in all the project)
  • update remapFlaskEnvVariables mapping of MM_MIXPANEL_TOKEN in scripts/build.sh
  • update injectHomePageScripts in app/components/Views/BrowserTab/index.js

Note

update injectHomePageScripts in app/components/Views/BrowserTab/index.js will be done in another PR as it's not mission critical and requires answers form dapp page team.
see #8843

Note

.github/workflows/security-code-scanner.yml uses a Mixpanel tocken that is different from the mobile app one. So no impact on it for the moment except that they have to update on their side as we will terminate the Segment subscription. I notified @NicholasEllul.

Note

TODO added in code related to #8833
todo is an accepted issue in Sonar as there's an issue linked to it.

Related issues

Fixes #8795

Manual testing steps

NA

Screenshots/Recordings

NA

Before

NA

After

NA

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@NicolasMassart NicolasMassart added No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. team-mobile-platform needs-smoke-e2e labels Mar 4, 2024
@NicolasMassart NicolasMassart self-assigned this Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.66%. Comparing base (9cf7630) to head (a1098fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8829      +/-   ##
==========================================
- Coverage   41.66%   41.66%   -0.01%     
==========================================
  Files        1271     1271              
  Lines       30906    30905       -1     
  Branches     3088     3088              
==========================================
- Hits        12877    12876       -1     
  Misses      17250    17250              
  Partials      779      779              

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

@NicolasMassart NicolasMassart marked this pull request as ready for review March 5, 2024 11:02
@NicolasMassart NicolasMassart requested a review from a team as a code owner March 5, 2024 11:02
@NicolasMassart NicolasMassart added the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 5, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 3256f16
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/91a46a46-670f-4af6-813c-38daa8ec3ec9

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 5, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Left some comments

ios/MetaMask.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
scripts/ios/bundle-js-and-sentry-upload.sh Outdated Show resolved Hide resolved
@NicolasMassart NicolasMassart added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 6, 2024
Copy link
Contributor

github-actions bot commented Mar 6, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 14241b0
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fc134d94-8613-433c-8f4a-cb5ef5f49de5

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@NicolasMassart NicolasMassart changed the title feat: remove all remaining legacy analytics native code chore: remove all remaining legacy analytics native code Mar 6, 2024
Cal-L
Cal-L previously approved these changes Mar 6, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Mar 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@NicolasMassart NicolasMassart added release-7.18.0 Issue or pull request that will be included in release 7.18.0 and removed No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. labels Mar 7, 2024
@sethkfman
Copy link
Contributor

LGTM

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Lgtm!

@NicolasMassart NicolasMassart merged commit 984874e into main Mar 7, 2024
33 of 34 checks passed
@NicolasMassart NicolasMassart deleted the feat/8795_remove_mixpanel branch March 7, 2024 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 7, 2024
@metamaskbot metamaskbot added release-7.19.0 Issue or pull request that will be included in release 7.19.0 and removed release-7.19.0 Issue or pull request that will be included in release 7.19.0 labels Mar 7, 2024
@metamaskbot
Copy link
Collaborator

More than one release label on PR. Keeping the lowest one (release-7.18.0) on PR and removing other release labels (release-7.19.0).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-smoke-e2e release-7.18.0 Issue or pull request that will be included in release 7.18.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat: remove all remaining legacy analytics native code
6 participants