feat: replace webpack with esbuild (100s → 2.3s builds) - #2
Open
ChakshuGautam wants to merge 396 commits into
Open
feat: replace webpack with esbuild (100s → 2.3s builds)#2ChakshuGautam wants to merge 396 commits into
ChakshuGautam wants to merge 396 commits into
Conversation
…rarchy, read_boundary_entities, read_boundary_relationships, read_workflow_states, read_workflow_actions methods to streamline codebase and improve maintainability.
… templates for boundary management and employee master
merge the master changes
…-CCSD-1421 CCSD-1419,CCSD-1421
Batch fix for local-setup issues plus a new cross-root tenant bootstrap feature with full CI coverage. Fixes: - egovernments#192: Remove Elasticsearch references from smoke-tests, Tiltfile, docs - egovernments#193: Change localeDefault from "en_IN" to "en" (prevents en_IN_IN key) - egovernments#214: PGR Update (Assign) sends assignees array instead of empty - egovernments#215: Remove extra audit block from update bodies; Rate&Close uses [] - egovernments#216: File Upload uses {{authToken}} instead of hardcoded token - egovernments#217: Citizen Auth Token uses correct defaults, fix pm.environment.set - egovernments#220: Add opt-in telemetry via Matomo HTTP Tracking API New feature: - egovernments#225: Auto-bootstrap new tenant roots in create_tenant - copies all MDMS schemas, essential data (IdFormat, departments, designations, complaint types, workflow) from source root. Includes CI test that creates "ciboot.citya", bootstraps "ciboot" root from "pg", and runs the full PGR lifecycle (create → assign → resolve → rate&close). Testing: - Bootstrap data integrity: verifies IdFormat, departments, ServiceDefs, workflow states, and ID generation all work on bootstrapped root - Postman assertions: each PGR step now validates HTTP 200, response shape, and expected applicationStatus transition - 16 assertions per Newman run (up from 1), on both pg.citest and ciboot.citya tenants CI improvements: - Trigger workflow on PRs targeting develop branch - Fix ImportError for relative imports in CI context - Use serviceCode override in MDMSv2 PGR Search to prevent flakiness - Capture ci-dataloader stdout on failure (set +e pattern) Closes egovernments#192, closes egovernments#193, closes egovernments#214, closes egovernments#215, closes egovernments#216, closes egovernments#217, closes egovernments#220, closes egovernments#225 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add telemetry sidecar (alpine:3.20) that monitors Docker socket for container start/stop/health events and sends them to Matomo - Detects which docker-compose file(s) were used via container labels - Sends setup start/stop events on compose up/down (SIGTERM handler) - Tracks individual container lifecycle (start, die, unhealthy) - Update Matomo site ID from 1 to 5 in telemetry.sh and telemetry.py - Update events.csv catalog with new container-level events - Skip digit-telemetry in CI health check loop Opt-out: TELEMETRY=false (same env var as existing telemetry) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Send container healthy events (previously only logged, not sent) - Fix stop event not arriving: shutdown handler now uses synchronous curl (foreground) instead of backgrounded curl that got killed on exit - Remove set -e that could cause early exits in signal handlers - Kill events monitor PID before sending stop event - Add container healthy event to events.csv catalog Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Script tests the full boundary lifecycle as done in the DataLoader notebook: 1. Login and create test tenant (pg.bndtest) 2. Create boundary hierarchy definition (BNDTEST: State→District→Block) 3. Generate boundary template via egov-bndry-mgmnt 4. Poll for completion and download the XLSX template 5. Fill the template programmatically with 6 test boundaries 6. Upload filled template and process boundaries 7. Verify boundaries exist via boundary-service API Handles both template formats (standard and column-per-level). Falls back to direct API creation if template generation fails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump egov-localization heap from -Xmx256m to -Xmx512m and container memory limit from 320M to 640M. The boundary management service fetches all 34K localization messages at once during template generation, causing OutOfMemoryError: Java heap space. - Fix filestore download URL resolution inside Docker containers: map localhost:19000 (MinIO host port) to minio:9000 (container DNS) so Jupyter notebook can download boundary templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds an always-run step that prints the telemetry container logs before cleanup, so we can verify which events are being sent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs: 1. Docker API returns `.Action` not `.status` — sidecar was reading the wrong JSON field so health events were silently dropped 2. Docker sends `health_status: healthy` (with space after colon) but case matched `health_status:healthy` (no space) Verified by capturing raw Docker events via the unix socket API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On `docker compose down`, the sidecar was killing its event stream immediately on SIGTERM, missing die events from other containers. Now waits 3s after SIGTERM to let the event stream capture die events from other containers being stopped, then sends the stop summary. Bumped stop_grace_period to 10s to accommodate the delay. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Matomo filters out requests with curl's default user-agent as bot traffic. All three telemetry senders (sidecar.sh, telemetry.py, telemetry.sh) now send `User-Agent: DIGIT-LocalSetup/1.0`. Also changed URL from `app://local-setup/...` to `https://local-setup.digit.org/...` — Matomo may reject non-HTTP URL schemes in reports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…p-issues Fix local-setup issues egovernments#192, egovernments#193, egovernments#214-217, egovernments#220
docs: improve local-setup README based on review feedback
This reverts commit 053706b.
Added a template for creating epics to the issue tracker, outlining key sections for problem identification, planning, and success measurement.
…-patch-epic-template Add epic issue template for feature planning
Add esbuild as the production bundler, reducing build times from ~100s (webpack) to ~2.3s. The build:webpack script now runs esbuild instead. - esbuild.build.js: Full build config with CDN externals plugin, SVG loader, React dedup aliases, HTML injection, and chunk splitting - dev-build.sh: Fast local rebuild + deploy to running container (~4s) - webpack.config.js: Add resolve aliases for local core module source and React singleton (prevents "Invalid hook call" errors) - package.json: Add esbuild dep, build:esbuild script Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
8 tasks
KDwevedi
added a commit
that referenced
this pull request
May 21, 2026
Last full-path gap: fullpath7 passed EVERYTHING (converge x2, OpenBao seal+re-unseal, Mac-nginx serving /configurator/ + /digit-ui/ at 200, auth probe, MDMS StateInfo, INFRA VALIDATION) and failed only on the trailing debug task 'Show MCP health status', which reads mcp_health.rc — but mcp_health is registered only by the enable_mcp-gated wait task (skipped on Mac), so it's undefined. Gate this status line the same way, consistent with fix #2 and the mcp-bootstrap tasks. Linux/VPC (enable_mcp true) unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build:webpackscript now runsyarn build:libraries && yarn build:esbuild— the webpack config is preserved for local dev (yarn start) but production builds use esbuilddev-build.shfor fast local iteration: rebuild + deploy to running container in ~4 secondsChanges
esbuild.build.jspublic/index.html, chunk splittingdev-build.shdigit-uicontainerwebpack.config.jsresolve.aliasfor local core module source + React singleton (prevents "Invalid hook call" from duplicate React instances)package.jsonesbuilddep,build:esbuildscript, updatesbuild:webpackto call esbuildHow it works
esbuild bundles the app into
build/with:<script>tags (same pattern as existing setup)node_modules/@egovernments/digit-ui-module-coreresolves to localmicro-ui-internals/packages/modules/coreso custom App.js/Login changes are includedpublic/index.htmltemplateTest plan
yarn build:webpack— should complete in ~3 seconds and producebuild/directorydocker build -f docker/Dockerfile .should succeed/digit-ui/with all pages functionalyarn start(webpack dev server) still works for local development🤖 Generated with Claude Code