RedHatInsights / insights-chrome

Chroming for Insights apps
MIT License
27 stars 130 forks source link

fix(RHINENG-10654): Reimplement Sentry #2881

Open adonispuente opened 2 months ago

adonispuente commented 2 months ago

This reconfigures sentry so that it handles multiple frontends properly with chrome being the wrapper. Currently there are a few changes I need to make in the settings of the repo itself to add secret keys to the environment, as well as a CI/CD addition, but these changes will allow the projects to be better monitored. I dont have perms for this and will ping platform team in regards to the set up aspect, those changes must be merged for this to work at all

This is step 1, but by the end, ideally, the cp-001 project will only report errors sentry deems is from chrome, and all the apps will have their own projects where we can monitor the health of specific apps. All the apps would need to do after this is done is have a similar PR like this : https://github.com/RedHatInsights/insights-advisor-frontend/pull/1268/files and then some CI/CD changes + secret variables added

https://issues.redhat.com/browse/RHINENG-10654

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 48.00%. Comparing base (67d7d4a) to head (f49af70).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2881/graphs/tree.svg?width=650&height=150&src=pr&token=GuRwyW1uUf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) ```diff @@ Coverage Diff @@ ## master #2881 +/- ## =========================================== - Coverage 63.44% 48.00% -15.44% =========================================== Files 202 105 -97 Lines 4650 2552 -2098 Branches 858 468 -390 =========================================== - Hits 2950 1225 -1725 + Misses 1689 917 -772 - Partials 11 410 +399 ``` | [Files](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2881?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) | Coverage Δ | | |---|---|---| | [src/utils/sentry.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2881?src=pr&el=tree&filepath=src%2Futils%2Fsentry.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3V0aWxzL3NlbnRyeS50cw==) | `0.00% <0.00%> (-16.22%)` | :arrow_down: | ... and [174 files with indirect coverage changes](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2881/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)
adonispuente commented 2 months ago

Exposed federated modules are failing to be build. Here is the common error:

ERROR in ./src/components/FavoriteServices/DashboardFavorites.tsx
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: Bindings not found.
    at Compiler.<anonymous> (/home/martin/insights/insights-chrome/node_modules/@swc/core/index.js:227:19)
    at Generator.next (<anonymous>)
    at /home/martin/insights/insights-chrome/node_modules/@swc/core/index.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/home/martin/insights/insights-chrome/node_modules/@swc/core/index.js:27:12)
    at Compiler.transform (/home/martin/insights/insights-chrome/node_modules/@swc/core/index.js:203:16)
    at Object.transform (/home/martin/insights/insights-chrome/node_modules/@swc/core/index.js:352:21)
    at Object.<anonymous> (/home/martin/insights/insights-chrome/node_modules/swc-loader/src/index.js:97:21)
 @ container entry ./DashboardFavorites[0]

I believe the issue is the tsconfig, "sourceRoot": "/", This is needed for sentry to map against hidden source maps. Looking into the most non-hacky solution i can come up with.

adonispuente commented 2 months ago

/retest

adonispuente commented 2 months ago

ci keeps failing because it cant find the container for this PR

adonispuente commented 2 months ago

/retest

adonispuente commented 2 months ago

/retest

adonispuente commented 1 month ago

/retest

adonispuente commented 1 month ago

converting to draft for a bit. I need to find a better way to map the source maps. there are too many with no refs