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: Disable account syncing in prod #27943

Merged
merged 2 commits into from
Oct 19, 2024
Merged

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Oct 17, 2024

Description

This PR disables account syncing in prod until we have e2e tests and documentation of proper testing

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. yarn build
  2. Account syncing should not occur

Screenshots/Recordings

Before

After

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.

@danjm danjm requested a review from a team as a code owner October 17, 2024 19:12
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.

Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Choose a reason for hiding this comment

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

LGTM. The isProduction check is nice!

@danjm danjm changed the title Disable account syncing in prod chore: Disable account syncing in prod Oct 17, 2024
@@ -1561,7 +1563,7 @@ export default class MetamaskController extends EventEmitter {
},
},
env: {
isAccountSyncingEnabled: isManifestV3,
isAccountSyncingEnabled: !isProduction() && isManifestV3,,
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. This isProduction function does not effectively check that the current build is a production build.

It only checks that this is not "development" or "testing":

process.env.METAMASK_ENVIRONMENT !== ENVIRONMENT.DEVELOPMENT &&

But there are many other environments:

Copy link
Member

Choose a reason for hiding this comment

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

This will be effective in disabling the check in production. But it will also disable it in any non-test builds produced on CircleCI, including release candidate builds, which would be confusing during release QA.

Copy link
Member

Choose a reason for hiding this comment

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

Thoughts on setting this to false instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it will also disable it in any non-test builds produced on CircleCI, including release candidate builds, which would be confusing during release QA.

Isn't that what we want, so that when v12.5.0 is tested, the feature is disabled?

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough, yes we would want those to be as production-like as possible. But our QA team uses a lot of different build types interchangeably, including development builds, so it would still be confusing.

What was the reason for leaving it enabled for development and e2e testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What was the reason for leaving it enabled for development and e2e testing?

I was just thinking not to inhibit the ongoing QA work. It can be more efficient to work with development builds while writing tests or doing exploratory testing.

@@ -31,6 +31,8 @@ import {
providerErrors,
} from '@metamask/rpc-errors';

import { isProduction } from '../../shared/modules/environment';
Copy link
Member

Choose a reason for hiding this comment

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

Needs to be re-ordered, causing a lint error

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@danjm danjm force-pushed the disable-account-syncing-prod branch from 5af0105 to dbd02ca Compare October 18, 2024 22:01
@metamaskbot
Copy link
Collaborator

Builds ready [dbd02ca]
Page Load Metrics (1864 ± 111 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24425631731503241
domContentLoaded166725501838226108
load168525651864230111
domInteractive19194594421
backgroundConnect96927189
firstReactRender482021024019
getState46712167
initialActions01000
loadScripts114220561374221106
setupStore11103443115
uiStartup183527482090252121
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 155 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm danjm added this pull request to the merge queue Oct 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2024
@danjm danjm added this pull request to the merge queue Oct 19, 2024
Merged via the queue into develop with commit 6794a10 Oct 19, 2024
76 checks passed
@danjm danjm deleted the disable-account-syncing-prod branch October 19, 2024 05:28
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2024
@metamaskbot metamaskbot added the release-12.8.0 Issue or pull request that will be included in release 12.8.0 label Oct 19, 2024
danjm added a commit that referenced this pull request Oct 21, 2024
Cherry-picks #27943

## **Description**

This PR disables account syncing in prod until we have e2e tests and
documentation of proper testing.

There were no merge conflicts when picking these commits.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27982?quickstart=1)

## **Related issues**

Fixes: #27943

## **Manual testing steps**

1. yarn build
2. Account syncing should not occur

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@gauthierpetetin gauthierpetetin added release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.8.0 Issue or pull request that will be included in release 12.8.0 labels Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-extension-platform team-notifications Notifications team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants