Docs and operating-model requests 504: content hydration crawls 2,179 GitHub blobs serially inside a 30s Lambda
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, github, typescript
- Lĩnh vực
- backend, cloud, observability, performance
Hướng nghiên cứu
Start with backend/src/docs/githubStore.ts and trace how ContentsApiGithubStore.sync() is called by operatingModel/loader.ts. Reproduce the direct docs endpoint timeout, then choose and scope a hydration approach that completes within the Lambda budget and makes GitHub requests fail fast. Also inspect seedRuntimeUsers for the existing-user role backfill; done means docs and operating-model endpoints recover, hangs return promptly, and missing roles cannot recur.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Symptom
The portal Today page shows "Process documents are unavailable — HTTP 504", an empty action queue, and My Plan / operating-model data missing. Work API calls were also failing (fixed separately, see below).
Diagnosis (verified against production 2026-09-26)
GET /docs/process-qualityinvoked directly on the backend Lambda returnsSandbox.Timedoutafter 30.00s;/healthon the same container returns 200 in ~2s. CloudFront surfaces the timeout as 504.- Every docs/operating-model request calls
ContentsApiGithubStore.sync()(backend/src/docs/githubStore.ts), which on a cold container hydrates the wholecontent/tree one GitHub API call per blob, serially, with no fetch timeout. DataTalksClub/dataops-knowledgecontent/currently holds 2,179 blobs (443 md, 1,516 jpg, 220 png). At ~0.3–0.5s per blobs call that is ~10–15 minutes of work inside a 30s Lambda, so hydration never completes in one invocation. Each new container restarts the crawl (progress persists only in per-container /tmp), so no container ever becomes warm.- Blast radius:
/docs/*,/search,/api/operating-model,/api/my-plan, and the Today page's process-quality call (operatingModel/loader.tscalls the samestore.sync()). - Side damage: each doomed crawl burns up to ~2,200 GitHub requests; the knowledge token's rate limit already showed 1,301/5,000 used within one hour.
Work API 403s (fixed in data on 2026-09-26, needs a repo-level guard)
- The #164 role gate denies users without a supported
role. The three live user items predate the role attribute (created 2026-06-28, norole), andseedRuntimeUsersskips existing users as "unchanged", so the role was never backfilled. Every team read/work mutation returned 403 ("Team access requires an active admin or operator role"). - Applied the declared seed state (
role: 'admin'for grace/valeriia/alexey) directly todataops-v1-usersvia UpdateItem;/api/cardsand/api/tasksverified 200 after. - Follow-up needed: make
seedRuntimeUsersupdate missing attributes on existing users (or migrate in place), so this cannot recur. Data migration was done by hand this time only because the gate shipped without it.
Fix directions (for grooming)
- Stop eager per-blob hydration. Candidates: hydrate only
.mdeagerly and fetch images lazily viaensureFile; or download a single tarball and extractcontent/; or sync the knowledge repo to S3 from CI and hydrate from S3 in one/few calls. - Add an explicit timeout (
AbortSignal.timeout) torequest()/fetchImplingithubStore.tsso a GitHub hang fails fast with 502 instead of eating the whole Lambda budget. - Consider a startup/deploy-time hydration step (offline snapshot in the artifact) instead of on-demand crawling.
Related observability gap
Backend Lambda log streams stop on 2026-08-11 even though the function is actively invoked (CloudWatch metrics show hundreds of invocations/day; direct invokes today produced no streams). The execution role still has AWSLambdaBasicExecutionRole attached. Root cause unknown — needs its own investigation; until fixed, production debugging is blind (this diagnosis had to be reproduced by direct invokes).
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataTalksClub/dataops
-
Local dev frontend cannot connect: all interactive /api routes 401 even with valid login tokenĐang mởbackend bug needs grooming
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
DataTalksClub/dataops#227 · 1 bình luận ·
-
bug needs grooming process-docs testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
DataTalksClub/dataops#225 · 1 bình luận ·
-
design enhancement frontend P1 portal testing
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
DataTalksClub/dataops#219 · 13 bình luận ·
-
design enhancement frontend P1 portal testing
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
DataTalksClub/dataops#221 · 17 bình luận ·
-
design docs enhancement frontend P1 portal testing
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
DataTalksClub/dataops#220 · 25 bình luận ·
Tất cả issue của DataTalksClub/dataops
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rohitg00/agentmemory#1428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
boxlite-ai/boxlite#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Detect Deno tasks from deno.jsonĐang mởdetectors enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
SM260845/readme-gen#1 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
angular/angularfire#3774 ·
Maintainer thường phản hồi trong vòng 2 ngày