fix: add ppc64le build and dev server support for frontend#2101
Conversation
Signed-off-by: Ethan Choe <ethanchoe@ibm.com>
Signed-off-by: Ethan Choe <ethanchoe3@gmail.com>
Signed-off-by: Ethan Choe <ethanchoe3@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughFrontend development and production builds now select Next.js webpack fallbacks on Power architectures. Environment files resolve from the working directory, while development startup configures absolute paths, ports, and port-specific build output directories. ChangesFrontend Power architecture support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 736-742: Update both next dev command branches in the Makefile to
escape the shell hostname substitution, replacing the Make expansion $(hostname)
with $$(hostname) so the shell resolves the hostname at runtime.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 12f64511-96d8-43f3-a752-38be961cf97f
📒 Files selected for processing (4)
Makefilefrontend/build.jsfrontend/next.config.tsfrontend/package.json
* fix: add ppc64le build support for frontend Signed-off-by: Ethan Choe <ethanchoe@ibm.com> * fix: add ppc64le webpack fallback for make frontend dev server Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> * fix: use path.resolve for ENV_FILE to support absolute paths Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> * fix: escape $(hostname) as $$(hostname) in Makefile frontend target --------- Signed-off-by: Ethan Choe <ethanchoe@ibm.com> Signed-off-by: Ethan Choe <ethanchoe3@gmail.com>
…nstead of missing (#2139) * fix: add ppc64le build and dev server support for frontend (#2101) * fix: add ppc64le build support for frontend Signed-off-by: Ethan Choe <ethanchoe@ibm.com> * fix: add ppc64le webpack fallback for make frontend dev server Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> * fix: use path.resolve for ENV_FILE to support absolute paths Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> * fix: escape $(hostname) as $$(hostname) in Makefile frontend target --------- Signed-off-by: Ethan Choe <ethanchoe@ibm.com> Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> * fix: wire _resolve_service_name into podman and docker status paths * test: added unit tests for tui status fixes * style: ruff autofix (auto) * test: added unit test for docker path --------- Signed-off-by: Ethan Choe <ethanchoe@ibm.com> Signed-off-by: Ethan Choe <ethanchoe3@gmail.com> Co-authored-by: ethanchoe-2 <ethanchoe3@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Fixes #2088
What changed
frontend/next.config.ts— replace__dirnamewithprocess.cwd()(fixes crash when Next.js compiles config as an ES module under the WASM runtime)frontend/build.js— new arch-detection wrapper that adds--webpackflag on ppc64lefrontend/package.json— change build script fromnext buildtonode build.jsMakefile— add ppc64le arch check tomake frontenddev server target, passes--webpackon Power hardwareWhy
next-swchas no native bindings forlinux/ppc64le. The WASM fallback compilesnext.config.tsas an ES module where__dirnameis undefined, crashing both the build and dev server. Forcing--webpackand usingprocess.cwd()instead makes the build work correctly on ppc64le while remaining unchanged on x86_64 and arm64.Summary by CodeRabbit