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

   ### SUMMARY
   
   Since #29791 the 
[webpack.config.js](https://github.com/apache/superset/blob/548d543efe81ecd6f0a6657550230b765ab4d955/superset-frontend/webpack.config.js)
 file now requires that the translation files are present when running the 
build. This change simply moves the copy of the translation files before the 
`npm run build` step.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Beforehand, an error printed was printed, although it doesn't seem to stop 
the build, that can cause confusion as to whether something is wrong with the 
build:
   
   ```sh
   #19 [superset-node  7/12] RUN npm run build
   #19 0.291
   #19 0.291 > [email protected] build
   #19 0.291 > cross-env NODE_OPTIONS=--max_old_space_size=8192 
NODE_ENV=production BABEL_ENV="${BABEL_ENV:=production}" webpack --color --mode 
production
   #19 0.291
   #19 1.087 Error reading the directory: Error: ENOENT: no such file or 
directory, scandir '/app/superset/translations'
   #19 1.087     at Object.readdirSync (node:fs:1507:26)
   #19 1.087     at getAvailableTranslationCodes 
(/app/superset-frontend/webpack.config.js:52:22)
   #19 1.087     at Object.<anonymous> 
(/app/superset-frontend/webpack.config.js:168:20)
   #19 1.087     at Module._compile (node:internal/modules/cjs/loader:1469:14)
   #19 1.087     at Module._extensions..js 
(node:internal/modules/cjs/loader:1548:10)
   #19 1.087     at Module.load (node:internal/modules/cjs/loader:1288:32)
   #19 1.087     at Module._load (node:internal/modules/cjs/loader:1104:12)
   #19 1.087     at Module.require (node:internal/modules/cjs/loader:1311:19)
   #19 1.087     at require (node:internal/modules/helpers:179:18)
   #19 1.087     at WebpackCLI.tryRequireThenImport 
(/app/superset-frontend/node_modules/webpack-cli/lib/webpack-cli.js:204:22) {
   #19 1.087   errno: -2,
   #19 1.087   code: 'ENOENT',
   #19 1.087   syscall: 'scandir',
   #19 1.087   path: '/app/superset/translations'
   #19 1.087 }
   ```
   
   ### TESTING INSTRUCTIONS
   
   Build the `superset-node` stage and ensure it completes without errors 
relating to the translations files:
   
   ```sh
   docker buildx build --progress plain --target superset-node --build-arg 
PY_VER=3.10-slim-bookworm --no-cache .
   ```
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to