Skip to content

Fix/automation worker build - #60

Merged
atulmgupta merged 2 commits into
mainfrom
fix/automation-worker-build
May 3, 2026
Merged

atulmgupta merged 2 commits into
mainfrom
fix/automation-worker-build

Conversation

@atulmgupta

Copy link
Copy Markdown
Contributor

Description

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would break existing functionality)
  • Documentation update
  • Infrastructure / CI change

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing tests pass locally
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Screenshots (if applicable)

atulmgupta and others added 2 commits May 2, 2026 13:57
The automation-worker build was failing on CI runners with:
  internal compiler error: panic: runtime error: invalid memory address
  at /usr/local/go/src/sync/atomic/type.go:47:6

while compiling internal/api. This is a Go 1.25 inliner bug that
triggers on the large internal/api package (~219 files) under runner
memory pressure.

Fix applies three defense-in-depth flags to the build:
  - GOMEMLIMIT=2GiB caps Go GC growth so peak RSS fits runner budgets
  - -p 2 limits parallel compile jobs (default = NumCPU, often too many)
  - -gcflags=all=-l disables inlining, sidestepping the crash

Locally verified: docker build --no-cache produces a 56.4MB image in 71s
(vs 36s with inlining); the resulting binary boots and exits cleanly
from the built-in healthcheck path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add leafletGlobal.ts to mirror Leaflet onto window.L so classic plugins (leaflet-draw, markercluster, etc.) can find L when evaluated. Import this module in GeofenceDrawer and MarkerCluster before the plugin imports to ensure plugins don't throw `L is not defined`. Also update en.json placeholder formatting for pagination strings (noData, showing, pageOf) from JS template literals to i18n-style {{}} placeholders.
@atulmgupta
atulmgupta merged commit 396ff9b into main May 3, 2026
10 of 12 checks passed
@atulmgupta
atulmgupta deleted the fix/automation-worker-build branch May 3, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant