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: #12184 MVP split engine file #12366

Merged
merged 24 commits into from
Nov 24, 2024
Merged

chore: #12184 MVP split engine file #12366

merged 24 commits into from
Nov 24, 2024

Conversation

Cal-L
Copy link
Contributor

@Cal-L Cal-L commented Nov 21, 2024

Description

This PR establishes a pattern for splitting out controllers from the main Engine.ts file, which provides the following benefits

  • Reduce friction regarding code ownership especially during reviews (this is the main purpose of this effort)
  • Easier to manage, test, and handling controller initialization failures

The POC here applies to the AccountsController initialization logic, which has been mostly abstracted out into AccountsController directory. This pattern should be applicable to other controllers in the Engine file as well.

This pattern also enables us to redirect users to vault recovery in the event of controller initialization failures and should reduce the chances of users being "bricked". These changes may be introduced in future interations

Related issues

Fixes: #12184

Manual testing steps

The changes should not affect app behavior

  • Run the app as usual
  • Ensure that everything behaves as usual (Auth, dapp connections, navigation, etc)

Screenshots/Recordings

Before

After

App still runs normally

app.mov

Pre-merge author checklist

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.

@Cal-L Cal-L requested review from a team as code owners November 21, 2024 09:32
Copy link
Contributor

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.

@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise No QA Needed Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Nov 21, 2024
@Cal-L Cal-L changed the title chore: #12184 split engine file chore: #12184 MVP split engine file Nov 21, 2024
@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 21, 2024
@Cal-L Cal-L added the Run Smoke E2E Triggers smoke e2e on Bitrise label Nov 21, 2024
Copy link
Contributor

github-actions bot commented Nov 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8443cc7
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/897a1c5f-e79a-4635-af2f-d45d7ade7e75

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

Copy link
Contributor Author

@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.

We are not exporting via index for AccountsController here since it exposes the risk of circular dependencies (caused by action/event dependencies)

@Cal-L Cal-L requested review from a team as code owners November 21, 2024 22:51
@Cal-L Cal-L requested a review from a team as a code owner November 21, 2024 23:12
@Cal-L Cal-L added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 21, 2024
@Cal-L
Copy link
Contributor Author

Cal-L commented Nov 21, 2024

Skipping sonar failure (Engine.ts) since this PR just removes code from the file

@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 21, 2024
Copy link
Contributor

github-actions bot commented Nov 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: f69b6d3
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e8068757-a06a-41a0-900c-d02ca1f04e4b

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

@Cal-L Cal-L enabled auto-merge November 22, 2024 19:57
Copy link

sonarcloud bot commented Nov 22, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
53.7% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@EtherWizard33 EtherWizard33 left a comment

Choose a reason for hiding this comment

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

LGTM

@Cal-L Cal-L added this pull request to the merge queue Nov 24, 2024
Merged via the queue into main with commit 389de6e Nov 24, 2024
35 of 37 checks passed
@Cal-L Cal-L deleted the chore/12184-split-engine-file branch November 24, 2024 22:31
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2024
@metamaskbot metamaskbot added the release-7.37.0 Issue or pull request that will be included in release 7.37.0 label Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.37.0 Issue or pull request that will be included in release 7.37.0 Run Smoke E2E Triggers smoke e2e on Bitrise skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Establish pattern for splitting Engine.ts file
5 participants