You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2023/10/12 23:00:55 UTC

[PR] chore: adding 'no-experimental-fetch' node option on scripts, removin… [superset]

rusackas opened a new pull request, #25628:
URL: https://github.com/apache/superset/pull/25628

   …g it from docs
   
   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   When running `npm run build` I would get this error:
   ```
   throw new Error("You must provide the URL of lib/mappings.wasm by calling " +
               ^
   
   Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
       at readWasm (/Users/evan/GitHub/superset/superset-frontend/node_modules/react-hot-loader/node_modules/source-map/lib/read-wasm.js:8:13)
       at wasm (/Users/evan/GitHub/superset/superset-frontend/node_modules/react-hot-loader/node_modules/source-map/lib/wasm.js:25:16)
       at /Users/evan/GitHub/superset/superset-frontend/node_modules/react-hot-loader/node_modules/source-map/lib/source-map-consumer.js:264:14
   
   Node.js v18.16.1
   ```
   
   When troubleshooting, I found a helpful note in the docs:
   
   > If this type of error comes while building assets(i.e using above commands):
   > 
   > ```bash
   > Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize
   > ```
   > 
   > Then put this:
   > 
   > ```bash
   > export NODE_OPTIONS=--no-experimental-fetch
   > ```
   
   I'm _assuming_ that nobody _needs_ the `experimental-fetch` option enabled, so rather than letting users hit this error and go looking for the fix, let's just add the fix to the webpack build scripts in `package.json`
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   n/a
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   run all three build methods and make sure they don't bomb out :)
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #25628:
URL: https://github.com/apache/superset/pull/25628#issuecomment-1760489467

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/25628?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#25628](https://app.codecov.io/gh/apache/superset/pull/25628?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9201ecf) into [master](https://app.codecov.io/gh/apache/superset/commit/ef1807cd7ee1378774875fb5b9f43e989651d3b2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ef1807c) will **decrease** coverage by `10.38%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #25628       +/-   ##
   ===========================================
   - Coverage   68.99%   58.61%   -10.38%     
   ===========================================
     Files        1931     1931               
     Lines       75506    75506               
     Branches     8402     8402               
   ===========================================
   - Hits        52096    44261     -7835     
   - Misses      21250    29085     +7835     
     Partials     2160     2160               
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.64% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.28% <ø> (-21.60%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/25628/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.49% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   [see 293 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/25628/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1416104611


##########
superset-frontend/package.json:
##########
@@ -208,6 +208,7 @@
     "rison": "^0.1.1",
     "scroll-into-view-if-needed": "^2.2.28",
     "shortid": "^2.2.6",
+    "source-map": "^0.7.4",

Review Comment:
   I feel like I tried that and it didn't work for some reason. The sourcemaps are generated/used by prod builds created by `npm run build` so maybe it's used in rendering/utilizing the source maps in those builds? I'm not exactly sure, but I somewhat recall it throwing the same error when it was a dev dependency.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #25628:
URL: https://github.com/apache/superset/pull/25628


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1423246196


##########
superset-frontend/package.json:
##########
@@ -208,6 +208,7 @@
     "rison": "^0.1.1",
     "scroll-into-view-if-needed": "^2.2.28",
     "shortid": "^2.2.6",
+    "source-map": "^0.7.4",

Review Comment:
   Ok, it's now a dev dependency :D Seems to work!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "mdeshmu (via GitHub)" <gi...@apache.org>.
mdeshmu commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1357605442


##########
CONTRIBUTING.md:
##########
@@ -598,18 +598,6 @@ There are three types of assets you can build:
 2. `npm run dev-server`: local development assets, with sourcemaps and hot refresh support
 3. `npm run build-instrumented`: instrumented application code for collecting code coverage from Cypress tests
 
-If this type of error comes while building assets(i.e using above commands):
-
-```bash
-Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize

Review Comment:
   Even though i didn't add these docs but I feel `calling SourceMapConsumer.initialize` would still be needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1416102245


##########
superset-frontend/package.json:
##########
@@ -208,6 +208,7 @@
     "rison": "^0.1.1",
     "scroll-into-view-if-needed": "^2.2.28",
     "shortid": "^2.2.6",
+    "source-map": "^0.7.4",

Review Comment:
   Shouldn't this be a dev dependency?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #25628:
URL: https://github.com/apache/superset/pull/25628#issuecomment-1760485745

   @mdeshmu since you added the docs (thank you!!!) let me know if I'm missing something here... I assume this would just fix it, but let us know if you think this PR sets up some other danger/error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1358906237


##########
CONTRIBUTING.md:
##########
@@ -598,18 +598,6 @@ There are three types of assets you can build:
 2. `npm run dev-server`: local development assets, with sourcemaps and hot refresh support
 3. `npm run build-instrumented`: instrumented application code for collecting code coverage from Cypress tests
 
-If this type of error comes while building assets(i.e using above commands):
-
-```bash
-Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize

Review Comment:
   Upon messing with it, it seems like you shouldn't _have to_ call the initialize method when using React... and that merely installing the `source-map` npm module fixes this. 
   
   I did `unset NODE_OPTIONS` to set my machine back to "stock" and all of the webpack build modes seem to work fine now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1423371347


##########
superset-frontend/package.json:
##########
@@ -208,6 +208,7 @@
     "rison": "^0.1.1",
     "scroll-into-view-if-needed": "^2.2.28",
     "shortid": "^2.2.6",
+    "source-map": "^0.7.4",

Review Comment:
   You were right... n`pm run dev`, `npm run dev-server`, and `npm run buid` all seem to work fine for me with it as a dev dependency. Game on!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore: adding 'no-experimental-fetch' node option by default [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #25628:
URL: https://github.com/apache/superset/pull/25628#discussion_r1423371347


##########
superset-frontend/package.json:
##########
@@ -208,6 +208,7 @@
     "rison": "^0.1.1",
     "scroll-into-view-if-needed": "^2.2.28",
     "shortid": "^2.2.6",
+    "source-map": "^0.7.4",

Review Comment:
   You were right... `npm run dev`, `npm run dev-server`, and `npm run buid` all seem to work fine for me with it as a dev dependency. Game on!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org