Skip to content

revert: deprecating more networks (#23695)#24369

Merged
salimtb merged 1 commit intodevelopfrom
revert-depricating-sepolia-linea
May 14, 2024
Merged

revert: deprecating more networks (#23695)#24369
salimtb merged 1 commit intodevelopfrom
revert-depricating-sepolia-linea

Conversation

@salimtb
Copy link
Copy Markdown
Contributor

@salimtb salimtb commented May 3, 2024

This reverts commit 257e9f9.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@salimtb salimtb added team-assets INVALID-PR-TEMPLATE PR's body doesn't match template needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. labels May 3, 2024
@salimtb salimtb requested review from a team as code owners May 3, 2024 16:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 3, 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.

@metamaskbot metamaskbot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label May 3, 2024
@salimtb salimtb force-pushed the revert-depricating-sepolia-linea branch 3 times, most recently from 5add3d1 to e1d0760 Compare May 3, 2024 16:49
@salimtb salimtb changed the title Revert "fix: deprecating more networks (#23695)" revert: deprecating more networks (#23695) May 3, 2024
@salimtb salimtb force-pushed the revert-depricating-sepolia-linea branch 6 times, most recently from 03b9de3 to af2eab9 Compare May 6, 2024 08:46
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [af2eab9]
Page Load Metrics (341 ± 406 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6212678157
domContentLoaded95613105
load513163341845406
domInteractive95613105
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -2.04 KiB (-0.05%)
  • ui: 356 Bytes (0.01%)
  • common: 302 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.29%. Comparing base (e775193) to head (50aae8e).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24369      +/-   ##
===========================================
- Coverage    67.36%   67.29%   -0.07%     
===========================================
  Files         1282     1282              
  Lines        50011    49991      -20     
  Branches     12983    12971      -12     
===========================================
- Hits         33685    33638      -47     
- Misses       16326    16353      +27     

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't the revert PR only revert the 115.ts file which was responsible to migrate users ti linea sepolia?
I think 117.ts and 116.ts logic should still stay and maybe be renamed if we are removing 115.ts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this PR, we address changes to our migration files. Specifically, we've removed the migration file named 115.ts. During the period since its creation, two additional migration files, 116.ts and 117.ts, were introduced. To maintain a sequential order and fill the gap left by the deletion of 115.ts, we've renumbered these files: 116.ts has been renamed to 115.ts, and 117.ts has been renamed to 116.ts. This adjustment ensures our migration files are sequentially organized without any missing numbers in the sequence.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Renaming migration files does not seem a good idea as it might lead to migrations being skipped for anyone that is between 115 and 117 (inclusive). For example this should prevent anyone already on version 117 to skip the future 117 migration file when it is added again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hey @cryptotavares ,
I agree with your points, but it's important to note a crucial detail: the migration file in question has never been deployed to a production environment, nor has it been run at all.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@salimtb it has been run in develop, meaning that everyone's local env might be affected. Example: if I was to add an 117 migration right now, I would not be able to trigger it locally without modifying the extension persisted state.

(output from window.stateHooks.getCleanAppState().then(console.log) in the browser console)
Screenshot 2024-05-07 at 10 21 51

It has also been included in the 11.16 release cut. We can cherry pick a fix into 11.16 release candidate.. but I suspect that anyone that is already QAing that branch might face similar issues, if we end up having to cherry pick a commit to add another migration (future 117).

In my opinion, it would be cleaner and simpler to just add another migration (lets say 118) that would revert 115. But I don't know how we have approach this in the past. @Gudahtt or @danjm, how have we dealt with this in the past?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

eeemm ok , thnx for the clarification @cryptotavares , i'll add another file ( 118.ts ) like you just suggested.
will ping you in a few moment once it's done.
thnx for your comment and clarification

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cryptotavares update done , pls check again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cryptotavares I agree that it is preferable to avoid removing already committed migration files when we can. At the same time, I don't like having migration code that does nothing.

We faced a similar issue about a year ago, and because the changes were not yet on master, we decided to renumber the migration files https://consensys.slack.com/archives/CTQAGKY5V/p1677784034578949

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't see this thread before, but Salim flagged it for me after I opened this #24666

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Meanwhile, this was not as big of an issue a year ago:

It has also been included in the 11.16 release cut. We can cherry pick a fix into 11.16 release candidate.. but I suspect that anyone that is already QAing that branch might face similar issues, if we end up having to cherry pick a commit to add another migration (future 117).

There were many fewer people building release branches then... I think I still lean in favour of deleting migration files if they are not needed and have not yet been merged to master.

sahar-fehri
sahar-fehri previously approved these changes May 6, 2024
bergeron
bergeron previously approved these changes May 6, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [5b08f80]
Page Load Metrics (983 ± 610 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint58145852211
domContentLoaded85515115
load4733599831271610
domInteractive85515115
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -2.04 KiB (-0.05%)
  • ui: 356 Bytes (0.01%)
  • common: 302 Bytes (0.00%)

@salimtb salimtb dismissed stale reviews from sahar-fehri and bergeron via ca78b52 May 7, 2024 12:58
@salimtb salimtb force-pushed the revert-depricating-sepolia-linea branch 2 times, most recently from ca78b52 to 17ac937 Compare May 7, 2024 12:59
@salimtb salimtb force-pushed the revert-depricating-sepolia-linea branch from 17ac937 to 50aae8e Compare May 7, 2024 13:00
@salimtb salimtb closed this May 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
@salimtb salimtb reopened this May 7, 2024
...state,
NetworkController: networkControllerState,
};
return state;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see that basically we wanted to keep the 115 migration but we are not making any state modifications, then in future it will be reverted back

@sahar-fehri
Copy link
Copy Markdown
Contributor

LGTM

const testNetworks = {
[CHAIN_IDS.GOERLI]: true,
[CHAIN_IDS.SEPOLIA]: true,
[CHAIN_IDS.LINEA_GOERLI]: true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we still need to get rid of goerli.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, this revert PR is only temporary, and it is to make sure the deprecation only happens in v11.17

@salimtb salimtb requested a review from jpuri May 14, 2024 09:07
@salimtb salimtb merged commit 01bac0c into develop May 14, 2024
@salimtb salimtb deleted the revert-depricating-sepolia-linea branch May 14, 2024 16:35
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [50aae8e]
Page Load Metrics (1226 ± 706 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint60173922914
domContentLoaded9391484
load48441312261469706
domInteractive9391484
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.49 KiB (-0.04%)
  • ui: 356 Bytes (0.01%)
  • common: 302 Bytes (0.00%)

@gauthierpetetin gauthierpetetin added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. release-12.0.0 Issue or pull request that will be included in release 12.0.0 team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants