-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
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. |
There was a problem hiding this 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!
app/scripts/metamask-controller.js
Outdated
@@ -1561,7 +1563,7 @@ export default class MetamaskController extends EventEmitter { | |||
}, | |||
}, | |||
env: { | |||
isAccountSyncingEnabled: isManifestV3, | |||
isAccountSyncingEnabled: !isProduction() && isManifestV3,, |
There was a problem hiding this comment.
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:
const ENVIRONMENT = { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
app/scripts/metamask-controller.js
Outdated
@@ -31,6 +31,8 @@ import { | |||
providerErrors, | |||
} from '@metamask/rpc-errors'; | |||
|
|||
import { isProduction } from '../../shared/modules/environment'; |
There was a problem hiding this comment.
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>
5af0105
to
dbd02ca
Compare
Builds ready [dbd02ca]
Page Load Metrics (1864 ± 111 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
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>
Description
This PR disables account syncing in prod until we have e2e tests and documentation of proper testing
Related issues
Fixes:
Manual testing steps
yarn build
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist