Skip to content

fix: Include missing files in Sentry release artifact upload#25113

Merged
DDDDDanica merged 1 commit intodevelopfrom
fix-sentry-artifact-upload-for-normal-bundles
Jun 6, 2024
Merged

fix: Include missing files in Sentry release artifact upload#25113
DDDDDanica merged 1 commit intodevelopfrom
fix-sentry-artifact-upload-for-normal-bundles

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Jun 6, 2024

Description

The Sentry release artifact upload step was assuming that all JavaScript files were at the root of the build directory. This is not the case; in #23672 some of them were moved to a scripts/ subdirectory. These files have been missing from release artifacts for some time now.

The script has been updated to include all JavaScript files included in the build. It references the entire build directory now rather than specifically targetting JavaScript files at the top-level. No additional filter is needed to exclude non-JavaScript files because this command defaults to only including JavaScript and sourcemap files (and some React native files that don't exist in our build).

Open in GitHub Codespaces

Related issues

Fixes #25110

Manual testing steps

  1. Create a personal Sentry account (if you don't have one already)
  2. Create a project in Sentry called metamask (if you don't have one already)
  3. Run this script:
SENTRY_ORG=[your account name/organization] SENTRY_PROJECT=metamask yarn exec ./development/sentry-upload-artifacts.sh --release v11.16.7
  1. Verify that all JavaScript files and source maps are shown on the CLI as being uploaded, and visible in the artifact bundle on the Sentry dashboard
  • The artifact bundle should be listed here: https://[your username/organization].sentry.io/settings/projects/metamask/source-maps/artifact-bundles/

Screenshots/Recordings

N/A

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.

@Gudahtt Gudahtt marked this pull request as ready for review June 6, 2024 18:41
@Gudahtt Gudahtt requested review from a team and kumavis as code owners June 6, 2024 18:41
@Gudahtt Gudahtt added team-extension-platform Extension Platform team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jun 6, 2024
The Sentry release artifact upload step was assuming that all
JavaScript files were at the root of the build directory. This is not
the case; in #23672 some of them were moved to a `scripts/`
subdirectory. These files have been missing from release artifacts for
some time now.

The script has been updated to include all JavaScript files included in
the build. It references the entire build directory now rather than
specifically targetting JavaScript files at the top-level. No
additional filter is needed to exclude non-JavaScript files because
this command defaults to only including JavaScript and sourcemap files
(and some React native files that don't exist in our build).

Fixes #25110
@Gudahtt Gudahtt force-pushed the fix-sentry-artifact-upload-for-normal-bundles branch from 1022122 to db2fea7 Compare June 6, 2024 19:59
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [db2fea7]
Page Load Metrics (48 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint69977973
domContentLoaded9121010
load41654873
domInteractive9121010
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.67%. Comparing base (9ca4f56) to head (db2fea7).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25113   +/-   ##
========================================
  Coverage    65.66%   65.67%           
========================================
  Files         1359     1359           
  Lines        54015    54015           
  Branches     14017    14017           
========================================
+ Hits         35468    35469    +1     
+ Misses       18547    18546    -1     

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

@DDDDDanica DDDDDanica merged commit 4104ef3 into develop Jun 6, 2024
@DDDDDanica DDDDDanica deleted the fix-sentry-artifact-upload-for-normal-bundles branch June 6, 2024 23:30
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jun 6, 2024
@metamaskbot metamaskbot added release-12.1.0 Issue or pull request that will be included in release 12.1.0 release-12.0.0 Issue or pull request that will be included in release 12.0.0 and removed release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Jun 6, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-12.0.0 on PR. Adding release label release-12.0.0 on PR and removing other release labels(release-12.1.0), as PR was added to branch 12.0.0 when release was cut.

@metamaskbot metamaskbot added release-11.16.8 Issue or pull request that will be included in release 11.16.8 and removed release-12.0.0 Issue or pull request that will be included in release 12.0.0 labels Jun 7, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-11.16.8 on PR. Adding release label release-11.16.8 on PR and removing other release labels(release-12.0.0), as PR was cherry-picked in branch 11.16.8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.16.8 Issue or pull request that will be included in release 11.16.8 team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Bug]: Sentry source maps broken for certain files

4 participants