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

fix: attribution link #25947

Merged
merged 9 commits into from
Jul 19, 2024
Merged

fix: attribution link #25947

merged 9 commits into from
Jul 19, 2024

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jul 18, 2024

Description

Update the attribution link to match the current metamask version

Open in GitHub Codespaces

Related issues

Fixes: #2655

Manual testing steps

GIVEN the user has already completed setup
WHEN they access Settings>About>Attributions
THEN the user should be redirected to the RC link for attributions

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.

@cryptodev-2s cryptodev-2s requested a review from a team July 18, 2024 16:10
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner July 18, 2024 16:10
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.

@cryptodev-2s cryptodev-2s requested a review from Gudahtt July 18, 2024 16:20
@metamaskbot
Copy link
Collaborator

Builds ready [2c27d77]
Page Load Metrics (265 ± 268 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791531132411
domContentLoaded107735189
load471991265559268
domInteractive107735189
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.69%. Comparing base (52f4868) to head (b80a35e).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25947      +/-   ##
===========================================
+ Coverage    69.67%   69.69%   +0.02%     
===========================================
  Files         1400     1401       +1     
  Lines        49513    49577      +64     
  Branches     13692    13701       +9     
===========================================
+ Hits         34495    34548      +53     
- Misses       15018    15029      +11     

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

@@ -18,8 +18,7 @@ const supportContactUs =
const mmiHomePage = 'https://metamask.io/institutions/';
const privacyAndNotice = 'https://consensys.io/privacy-notice';
const openSeaTermsOfUse = 'https://opensea.io/securityproviderterms';
const metamaskAttributions =
'https://raw.githubusercontent.com/MetaMask/metamask-extension/develop/attribution.txt';
const metamaskAttributions = `https://raw.githubusercontent.com/MetaMask/metamask-extension/v${process.env.METAMASK_VERSION}/attribution.txt`;
Copy link
Member

Choose a reason for hiding this comment

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

Similarly here, I am wondering if process.env.METAMASK_VERSION is set to anything

Copy link
Contributor Author

@cryptodev-2s cryptodev-2s Jul 19, 2024

Choose a reason for hiding this comment

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

Compared to the previous unit test, this is an end-to-end test where the extension is built and installed on the browser. During the build process, the version is assigned from the manifest. I tried running the e2e tests locally; although they did not complete successfully, the extension was installed, and the wallet was recovered. However, the process stopped at the password setup, which I completed manually. When I checked, the attribution from the settings they were using the correct link.

Also in the current pipeline I see that mmi e2e are skipped as I made explicitly this commit to make the pipeline fail (53b811f) but it succeeded

Copy link
Member

Choose a reason for hiding this comment

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

During the build process, the version is assigned from the manifest

Yes, but the build process is separate from test processes. The this file is run as part of the test process, where it's not set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're right. I was able to run the tests locally, and they failed. In my previous message, I mentioned that it's working because I only checked that the extension had the correct attribution link, which it does. However, the test was expecting https://raw.githubusercontent.com/MetaMask/metamask-extension/vundefined/attribution.txt, but it received https://raw.githubusercontent.com/MetaMask/metamask-extension/v11.16.15-mmi.0/attribution.txt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to remove the test because, unfortunately, the build and test processes are separate. We can't reference the version used during the build in the test. The change has been approved by @zone-live

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, we could read package.json from within the test, and populate it that way. But removing it sounds OK to me too.

@metamaskbot
Copy link
Collaborator

Builds ready [b78ba46]
Page Load Metrics (141 ± 169 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6913295199
domContentLoaded96329189
load391676141352169
domInteractive96329189
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [619d425]
Page Load Metrics (166 ± 182 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791881122311
domContentLoaded117831199
load471817166380182
domInteractive117831199
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [53b811f]
Page Load Metrics (206 ± 209 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6213292157
domContentLoaded95726115
load451578206436209
domInteractive95726115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cryptodev-2s
Copy link
Contributor Author

MMI e2e attribution link check has been removed as it can't be dynamically updated

Copy link

@cryptodev-2s cryptodev-2s requested a review from Gudahtt July 19, 2024 15:58
@metamaskbot
Copy link
Collaborator

Builds ready [b80a35e]
Page Load Metrics (353 ± 303 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint801911173014
domContentLoaded109134209
load551996353630303
domInteractive109133209
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@cryptodev-2s cryptodev-2s merged commit ee1dfe4 into develop Jul 19, 2024
79 checks passed
@cryptodev-2s cryptodev-2s deleted the fix/attribution-link branch July 19, 2024 17:08
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants