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: Improve Keyring/Accounts error handling and logs #12822

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Dec 20, 2024

Description

This PR does the following

  1. unmasks non sensitive data from the Accounts Controller and Keyring controller to help us better debug issues in prod. This means that more data will be provided in the sentry state logs. I have ensured that all addresses have remained masked
  2. adds logs when creating key components such as the engine and the accounts controller. This will help us debug issues with empty state

Related issues

Progresses : #12408

Manual testing steps

  1. Go to this page...

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.

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.

@owencraston owencraston added the Run Smoke E2E Triggers smoke e2e on Bitrise label Dec 20, 2024
Copy link
Contributor

github-actions bot commented Dec 20, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 4c958ed
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/af7f2b81-5142-4ee2-a670-5cd7bfd5055d

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

});
} else {
Logger.log('Creating AccountsController with provided initial state', {
hasSelectedAccount: !!initialState.internalAccounts?.selectedAccount,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest optional chaining on all of the logs. If any of these are undefined we shouldn't crash init.

@owencraston owencraston force-pushed the chore/improve-accounts-controller-error-logging branch from abf729d to ce694cc Compare December 21, 2024 18:17
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 59.08%. Comparing base (9d6908b) to head (1dd82bd).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...ore/Engine/controllers/AccountsController/utils.ts 75.00% 0 Missing and 1 partial ⚠️
app/core/Engine/utils/logger.ts 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12822      +/-   ##
==========================================
+ Coverage   58.85%   59.08%   +0.22%     
==========================================
  Files        1851     1853       +2     
  Lines       41739    41828      +89     
  Branches     5397     5424      +27     
==========================================
+ Hits        24566    24713     +147     
+ Misses      15502    15441      -61     
- Partials     1671     1674       +3     

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

@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Dec 21, 2024
Copy link
Contributor

github-actions bot commented Dec 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 327980c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8c2d0c55-c540-4a22-98f5-6627c740ba9c

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
38.8% Coverage on New Code (required ≥ 60%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants