Commit graph

18 commits

Author SHA1 Message Date
Ashwin Kumar Sivakumar
8a8372850f perf(ci): settle on capacity 2/node x 3 workers = 6 concurrent slots
All checks were successful
build-and-release / build (catering-services) (push) Successful in 9m29s
build-and-release / build (cron) (push) Successful in 4m33s
build-and-release / build (gateway) (push) Successful in 2m57s
build-and-release / build (companies) (push) Successful in 8m56s
build-and-release / build (customers) (push) Successful in 8m53s
build-and-release / build (developers) (push) Successful in 9m8s
build-and-release / build (employees) (push) Successful in 9m8s
build-and-release / build (fitness-trainers) (push) Successful in 8m27s
build-and-release / build (jobs) (push) Successful in 3m48s
build-and-release / build (graphic-designers) (push) Successful in 8m36s
build-and-release / build (social-media-managers) (push) Successful in 7s
build-and-release / build (tutors) (push) Successful in 6s
build-and-release / build (job-seekers) (push) Successful in 9m5s
build-and-release / build (leads) (push) Successful in 9m12s
build-and-release / build (makeup-artists) (push) Successful in 9m10s
build-and-release / build (video-editors) (push) Successful in 9s
build-and-release / build (payments) (push) Successful in 8m42s
build-and-release / build (photographers) (push) Successful in 8m32s
build-and-release / build (ugc-content-creators) (push) Successful in 8m44s
build-and-release / build (users) (push) Successful in 9m58s
capacity=3/node (9 total) oversubscribed the 8 physical cores per
node - individual builds slowed roughly 3x under contention (observed
directly: builds that took ~2m37s standalone were still running after
8+ minutes), for no clear net throughput win since this workload is
CPU-bound. Also found and fixed the actual reason capacity wasn't
taking effect at all initially: the runner daemon command never
passed --config, so it was silently running on default settings
regardless of config.yaml. Settled on 2/node (6 total, matching
docker-ready runner-2/3/4 - the control-plane node nxtgauge-1 is
deliberately excluded from the runner DaemonSet and should stay that
way, not used for build load).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:43:46 +05:30
Ashwin Kumar Sivakumar
ba1b0ebcc0 fix(ci): raise max-parallel to 9, make gitops push failures actually fail the job
Some checks failed
build-and-release / build (cron) (push) Successful in 3m8s
build-and-release / build (gateway) (push) Successful in 5m7s
build-and-release / build (jobs) (push) Successful in 6m39s
build-and-release / build (payments) (push) Failing after 2m34s
build-and-release / build (graphic-designers) (push) Failing after 7m40s
build-and-release / build (job-seekers) (push) Failing after 7m38s
build-and-release / build (employees) (push) Failing after 8m8s
build-and-release / build (developers) (push) Failing after 8m10s
build-and-release / build (fitness-trainers) (push) Failing after 8m6s
build-and-release / build (leads) (push) Failing after 7m54s
build-and-release / build (photographers) (push) Failing after 1m17s
build-and-release / build (makeup-artists) (push) Failing after 7m52s
build-and-release / build (customers) (push) Failing after 13m56s
build-and-release / build (companies) (push) Failing after 17m4s
build-and-release / build (catering-services) (push) Failing after 17m5s
build-and-release / build (tutors) (push) Successful in 9m19s
build-and-release / build (social-media-managers) (push) Successful in 9m26s
build-and-release / build (ugc-content-creators) (push) Successful in 9m36s
build-and-release / build (video-editors) (push) Successful in 9m37s
build-and-release / build (users) (push) Successful in 12m26s
Bumped runner.capacity from 1 to 3 on all 3 runner pods (9 total
concurrent slots - nodes were sitting at 7-11% CPU during builds, so
plenty of headroom), matched here with max-parallel: 9.

Also fixed a real bug: the gitops-push retry loop had no check after
exhausting all attempts, so a job whose every push attempt failed
would still exit 0 and report "success" - which is exactly what
happened on the previous run (verified: all 20 services built and
pushed their images correctly, but the actual GITOPS_PAT secret was
invalid/expired, and the retry loop silently swallowed the resulting
failure across all 20 jobs). Fixed the secret itself (confirmed the
existing admin-scoped Forgejo token has valid push access to
ashwin/nxtgauge-gitops and rotated GITOPS_PAT to it), and added an
explicit exit 1 if the retry loop exhausts without a successful push.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:30:36 +05:30
Ashwin Kumar Sivakumar
9efb733974 fix(ci): use GITOPS_PAT instead of never-configured GITOPS_PUSH_TOKEN
All checks were successful
build-and-release / build (catering-services) (push) Successful in 49s
build-and-release / build (cron) (push) Successful in 49s
build-and-release / build (developers) (push) Successful in 39s
build-and-release / build (employees) (push) Successful in 38s
build-and-release / build (fitness-trainers) (push) Successful in 38s
build-and-release / build (gateway) (push) Successful in 38s
build-and-release / build (graphic-designers) (push) Successful in 38s
build-and-release / build (job-seekers) (push) Successful in 39s
build-and-release / build (jobs) (push) Successful in 39s
build-and-release / build (leads) (push) Successful in 39s
build-and-release / build (makeup-artists) (push) Successful in 39s
build-and-release / build (companies) (push) Successful in 6m56s
build-and-release / build (payments) (push) Successful in 39s
build-and-release / build (customers) (push) Successful in 6m33s
build-and-release / build (social-media-managers) (push) Successful in 39s
build-and-release / build (ugc-content-creators) (push) Successful in 39s
build-and-release / build (users) (push) Successful in 39s
build-and-release / build (video-editors) (push) Successful in 39s
build-and-release / build (photographers) (push) Successful in 6m28s
build-and-release / build (tutors) (push) Successful in 6m32s
Confirmed via the matrix run: every service's actual docker build and
push succeeded, but the GitOps-update step failed on all of them with
"GITOPS_PUSH_TOKEN is empty". Checked the repo's configured secrets -
GITOPS_PUSH_USERNAME/GITOPS_PUSH_TOKEN were never set; only a leftover
GITOPS_GITHUB_USERNAME/GITOPS_GITHUB_TOKEN pair (from before the
gitops repo moved to Forgejo) and GITOPS_PAT exist. Confirmed
ashwin/nxtgauge-gitops lives on ci.nxtgauge.com matching this
workflow's defaults, so GITOPS_PAT is the one meant for this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:10:33 +05:30
Ashwin Kumar Sivakumar
e8651cf6c6 perf(ci): parallelize service builds across all 3 runners via matrix strategy
Some checks failed
build-and-release / build (companies) (push) Failing after 8s
build-and-release / build (customers) (push) Failing after 7s
build-and-release / build (developers) (push) Failing after 7s
build-and-release / build (employees) (push) Failing after 7s
build-and-release / build (fitness-trainers) (push) Failing after 8s
build-and-release / build (gateway) (push) Failing after 7s
build-and-release / build (graphic-designers) (push) Failing after 7s
build-and-release / build (job-seekers) (push) Failing after 8s
build-and-release / build (jobs) (push) Failing after 7s
build-and-release / build (leads) (push) Failing after 6s
build-and-release / build (makeup-artists) (push) Failing after 7s
build-and-release / build (payments) (push) Failing after 8s
build-and-release / build (photographers) (push) Failing after 7s
build-and-release / build (social-media-managers) (push) Failing after 7s
build-and-release / build (tutors) (push) Failing after 7s
build-and-release / build (ugc-content-creators) (push) Failing after 8s
build-and-release / build (users) (push) Failing after 7s
build-and-release / build (video-editors) (push) Failing after 7s
build-and-release / build (cron) (push) Failing after 3m19s
build-and-release / build (catering-services) (push) Failing after 5m54s
The build was structured as a single job looping through all ~20
services sequentially, so only 1 of the 3 deployed runner pods (one
per worker node) was ever used - the other 2 sat idle for the entire
build. Switched to a static per-service matrix (max-parallel: 3,
matching the 3 runners at capacity 1 each) so independent services
build concurrently. Each matrix job does its own quick "does this
service need building" check up front (same change-detection logic,
now per-job) rather than relying on a shared job output, to avoid
needing cross-job artifact/output passing.

GitOps updates also move into each matrix job (previously a single
step at the end) since there's no longer one job aggregating all
results - added a fetch/reset/retry loop since multiple jobs can now
push to the same gitops branch concurrently.

Tried adding cargo registry/target cache mounts to Dockerfile.simple
for a bigger per-build win too, but measured it directly (local A/B:
cold build 2m37s vs a second, supposedly-cached build 7m18s) and it
made things slower here, likely cargo's own cache-verification pass
outweighing the benefit for this dependency set - reverted that part,
Dockerfile.simple is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 01:54:47 +05:30
Ashwin Kumar Sivakumar
968960fb3d fix(ci): tolerate buildx's pretty-printed metadata-file JSON when extracting digest
Some checks failed
build-and-release / build (push) Failing after 1h49m45s
docker buildx --metadata-file writes pretty-printed JSON (space after
the colon: "containerimage.digest": "sha256:..."), but the digest
grep required compact JSON with no space, so it always matched
nothing. That produced an empty $digest, which the script correctly
treated as fatal and exited on - right after the first service
(gateway) had already built and pushed successfully, silently
aborting the rest of the service loop. Verified the fix against a
real locally-generated metadata file from the same buildx command.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 00:03:32 +05:30
Ashwin Kumar Sivakumar
c8fa02a9a4 fix(ci): derive DOCKER_HOST from the job container's own default gateway
Some checks failed
build-and-release / build (push) Failing after 16s
--add-host=host.docker.internal:host-gateway is not being honored by
this act_runner setup (tried via the runner's global container.options
and a per-job container: block; neither worked, confirmed by two
separate failed runs with identical DNS-lookup errors). Read the
container's real default-route gateway from /proc/net/route instead
(portable, no iproute2 dependency) and export it as DOCKER_HOST via
GITHUB_ENV. This is the actual IP of the dind engine that spawned the
job container, regardless of hostname-aliasing support.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:50:54 +05:30
Ashwin Kumar Sivakumar
dcf573e0f6 fix(ci): use explicit container: block for reliable job-level docker options
Some checks failed
build-and-release / build (push) Failing after 16s
Forgejo's docs note --add-host via the runner's global
container.options config is not reliably honored for jobs using pure
label-based runs-on mapping. Setting the same image + options
explicitly per-job via jobs.build.container is the more directly
supported path for per-job container customization.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:45:35 +05:30
Ashwin Kumar Sivakumar
b9e0ba247c fix(ci): route job-container DOCKER_HOST via host.docker.internal
Some checks failed
build-and-release / build (push) Failing after 16s
127.0.0.1:2375 only worked from the runner container's own network
namespace (sibling to the dind sidecar in the same pod). The actual
job container that runs each step is spawned *by* that dind engine,
one level deeper, so its own loopback doesn't reach the sidecar.
host.docker.internal (mapped to the job container's real gateway via
--add-host=host.docker.internal:host-gateway in the runner's
container.options) reaches back to the dind engine that created it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 19:59:27 +05:30
Ashwin Kumar Sivakumar
0ea4024657 fix(ci): fix YAML syntax error in build.yaml that silently disabled Actions
Some checks failed
build-and-release / build (push) Failing after 14s
The unindented heredoc terminator (<<EOF2 ... EOF2 flush-left) broke the
YAML block-scalar indentation contract for the `run: |` step, causing
Forgejo to log "ignore invalid workflow build.yaml: yaml: line 75:
could not find expected ':'" and silently skip the workflow entirely
on every push since this line was introduced. No builds have run on
main or high-performance since 2026-07-05 as a result. Replaced the
multi-line heredoc with a single-line bash here-string, which needs
no extra indentation and keeps the shell logic identical.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 18:34:45 +05:30
Ashwin Kumar Sivakumar
afb4dc9ae6 fix(ci): use docker-ready runner label in Forgejo workflow
- Change runs-on from self-hosted to docker-ready
- Add DOCKER_HOST and DOCKER_BUILDKIT env vars
- Align with other repo workflows
2026-07-06 04:24:06 +05:30
Ashwin Kumar Sivakumar
4bfb5b4418 Update Forgejo backend publish workflow 2026-06-17 03:28:46 +05:30
Ashwin Kumar Sivakumar
349673b7f8 fix(ci): unify backend build flow through forgejo 2026-06-14 01:20:24 +05:30
Ashwin Kumar Sivakumar
0d35bf5649 trigger build: rebuild all services
Some checks failed
build-and-push / detect-changes (push) Successful in 2s
build-and-push / build (catering-services) (push) Failing after 2s
build-and-push / build (companies) (push) Failing after 4s
build-and-push / build (cron) (push) Failing after 3s
build-and-push / build (developers) (push) Failing after 3s
build-and-push / build (customers) (push) Failing after 4s
build-and-push / build (employees) (push) Failing after 3s
build-and-push / build (fitness-trainers) (push) Failing after 4s
build-and-push / build (gateway) (push) Failing after 3s
build-and-push / build (job-seekers) (push) Failing after 3s
build-and-push / build (graphic-designers) (push) Failing after 4s
build-and-push / build (jobs) (push) Failing after 2s
build-and-push / build (leads) (push) Failing after 4s
build-and-push / build (makeup-artists) (push) Failing after 3s
build-and-push / build (payments) (push) Failing after 3s
build-and-push / build (photographers) (push) Failing after 3s
build-and-push / build (tutors) (push) Failing after 3s
build-and-push / build (social-media-managers) (push) Failing after 4s
build-and-push / build (ugc-content-creators) (push) Failing after 3s
build-and-push / build (users) (push) Failing after 4s
build-and-push / build (video-editors) (push) Failing after 3s
2026-06-13 01:23:22 +05:30
Ashwin Kumar Sivakumar
d0b10eac8f trigger forgejo pipeline: rebuild all services
Some checks failed
build-and-push / detect-changes (push) Successful in 4s
build-and-push / build (catering-services) (push) Failing after 3s
build-and-push / build (companies) (push) Failing after 3s
build-and-push / build (cron) (push) Failing after 2s
build-and-push / build (customers) (push) Failing after 4s
build-and-push / build (developers) (push) Failing after 2s
build-and-push / build (fitness-trainers) (push) Failing after 3s
build-and-push / build (employees) (push) Failing after 4s
build-and-push / build (gateway) (push) Failing after 3s
build-and-push / build (graphic-designers) (push) Failing after 3s
build-and-push / build (job-seekers) (push) Failing after 3s
build-and-push / build (jobs) (push) Failing after 3s
build-and-push / build (leads) (push) Failing after 3s
build-and-push / build (makeup-artists) (push) Failing after 3s
build-and-push / build (payments) (push) Failing after 3s
build-and-push / build (social-media-managers) (push) Failing after 3s
build-and-push / build (photographers) (push) Failing after 4s
build-and-push / build (tutors) (push) Failing after 3s
build-and-push / build (ugc-content-creators) (push) Failing after 3s
build-and-push / build (users) (push) Failing after 3s
build-and-push / build (video-editors) (push) Failing after 4s
build-and-push / cleanup-after-build (push) Failing after 0s
Retention script was too aggressive and deleted most images.
Increasing keep count from 2 to 10 SHA tags.
2026-06-12 23:55:01 +05:30
Ashwin Kumar Sivakumar
0bda2b2f10 remove: delete high-performance-latest tag from builds - use SHA tags only 2026-06-12 04:40:36 +05:30
Ashwin Kumar Sivakumar
8adc84699e fix: keep only 2 SHA tags (current + 1 previous) to save disk space 2026-06-12 04:12:15 +05:30
Ashwin Kumar Sivakumar
758f0699ff fix: move image cleanup to post-build job after all builds complete 2026-06-12 04:10:52 +05:30
Ashwin Kumar Sivakumar
1b1d98ebee chore: migrate ci naming to forgejo 2026-06-11 17:17:42 +05:30
Renamed from .gitea/workflows/build.yaml (Browse further)