Commit Graph
190 Commits
Author SHA1 Message Date
Naeel f8f95d7147 examples/VM: bump nubes provider 5.0.49, rename resources vm-sless 2026-03-28 20:27:16 +03:00
Naeel 547994dc55 examples: DEVfromGround vc_org, NODEJS, VM, POSTGRES updates 2026-03-26 08:33:03 +03:00
Naeel 2b03ba520e examples/DEVfromGround: add Terraform manifests (nubes_vc_org, DEV endpoint) 2026-03-26 06:43:53 +03:00
Naeel bc0e00acca feat(vm): add vApp + VM terraform example 2026-03-25 08:17:08 +03:00
Naeel 3404af578b feat(builder): py_compile + node --check при сборке ловят синтаксические ошибки (v0.1.63) 2026-03-23 11:23:01 +03:00
Naeel 8051870208 fix(web-console): убраны память/таймаут, двойной рендер кода (v0.1.11) 2026-03-23 11:14:32 +03:00
Naeel cad89fdbb6 fix(web-console): NotFoundError — urlRow создаётся сразу, не через insertBefore (v0.1.10) 2026-03-23 11:05:30 +03:00
Naeel 6e73729c46 feat(web-console): URL строкой ниже, статус сборки после Save (v0.1.9) 2026-03-23 11:01:01 +03:00
Naeel 470039f6d6 fix(web-console): таймер исчезает после Building→Ready, шаблоны без context (v0.1.8) 2026-03-23 10:52:37 +03:00
Naeel f68b601484 fix(web-console): zip invalid — Close() после Bytes() (v0.1.6) 2026-03-23 10:47:25 +03:00
Naeel 442ba8bc2f feat(web-console): deps, rename, Building poll+timer, kind=service — v0.1.5 2026-03-23 10:41:43 +03:00
Naeel b7fa8acf76 feat(web-console): create/edit/delete functions in UI, v0.1.4
- services/funcs: новые маршруты POST create-function, POST save-function,
  DELETE delete-function — создание/редактирование/удаление через браузер
- index.html: модалка создания с шаблонами Python/Node.js hello world,
  кнопки edit/delete на каждой карточке функции
- sless-funcs-service:v0.1.4 задеплоен
- examples/POSTGRES: удалены логи, .bak, backup tfstate, лишние функции
  оставлены 2 Python (pg-stats, pg-counter) + 2 Node.js (pg-info, js-idempotent)
2026-03-23 10:19:42 +03:00
Naeel 7a168185ea fix: cache lag retry, go.work, провайдер rollback, test v4 no -target 2026-03-23 10:03:26 +03:00
“Naeel” cb77a7f68e fix: go.work replace + test destroy targets 2026-03-23 09:30:37 +04:00
Naeel 2e7cd7f4f7 feat(v0.1.60): sha256-based s3Key for content-addressed cache hit 2026-03-23 06:57:18 +03:00
Naeel c033adec11 feat(v0.1.59): in-cluster registry:2 — insecure HTTP mode, ImageExists error handling 2026-03-23 06:41:30 +03:00
Naeel 9edd43edc5 feat(v0.1.58): ImageExists cache hit, timing analysis, in-cluster registry plan 2026-03-23 06:22:25 +03:00
Naeel 7023e0e6fc feat(builder): add REGISTRY_PROJECT for easy registry migration
DockerHub (flat): REGISTRY_HOST=naeel, REGISTRY_PROJECT=<empty>
  -> naeel/{nsPrefix}-{func}:{tag}
Harbor/GCR (project): REGISTRY_HOST=host, REGISTRY_PROJECT=proj
  -> host/proj/{func}:{tag}

Switch registry by changing 2 env vars only.
2026-03-22 17:51:05 +03:00
Naeel c762047234 fix(builder/go1.23): add require sless/fn/handler to server/go.mod at build time
go.work replace rule requires explicit require directive in server/go.mod.
Patch appended at kaniko build time - no base image rebuild needed.
2026-03-22 17:28:40 +03:00
“Naeel” 088493b7e7 0 2026-03-22 17:04:01 +04:00
Naeel 9b5dec4dde fix: multiuser test — memory_mb + zip invalid + early return 2026-03-22 15:00:55 +03:00
Naeel dca98aac97 test: G_MULTIUSER — 10 parallel users + Postgres (ready to run) 2026-03-22 14:36:52 +03:00
Naeel d25fc608dd test: G17/G18/G19/G20/G22 - 154/154 PASS 2026-03-22 14:09:15 +03:00
Naeel 40474324bd feat: v0.1.51 + G13/G14/G15 tests (126/126 PASS)
- fix: UpdateService IsInvalid → 400 (was 500 for ruby3.0 runtime)
- test: G13 edge cases — 40 tests, 40 PASS (name validation, boundary values,
  lifecycle, state transitions, update validation, upload edge cases)
- test: G14 cluster chaos — 20 tests, 20 PASS (self-healing, pod kill,
  OOM kill, kaniko interrupt, operator restart)
- test: G15 combined chaos — 21 tests, 21 PASS (CRUD under chaos, upload
  during self-heal, concurrent creates, errors after restart, rapid lifecycle)
- doc: progress.md, errors/log.md, decisions/log.md — полная документация сессии
2026-03-22 11:15:46 +03:00
Naeel a76baa62a3 fix: v0.1.50 — runtime 400 + SLESS_ENTRYPOINT в Deployment
Bug 1: services.go — k8s IsInvalid error (CRD enum validation) маппился в 500.
Теперь errors.IsInvalid() → 400 Bad Request (invalid service spec).

Bug 2: service_controller.go buildServiceDeployment не передавал env SLESS_ENTRYPOINT
в под. Добавлен в envVars из svc.Spec.Entrypoint. Без него server.py использовал
fallback handler.handle и не замечал неверный entrypoint.

operator_failure_test.sh 12B-2: обновлён под новое правильное поведение —
create ruby3.0 → 400 (не 201). Старый 201-путь сохранён как warn для совместимости.
2026-03-22 08:11:05 +03:00
Naeel d4ccbc7d15 test: operator_failure_test.sh — group 12 failure modes (43/45) 2026-03-22 07:49:58 +03:00
Naeel 19fbfb5502 fix: survival test — время в GMT+4 (TZ=Asia/Dubai) 2026-03-22 07:11:05 +03:00
Naeel f6aaf15245 test: survival+pg — group 11 PG STORM + параметризация TOKEN/NS/PG
- TOKEN/NS параметризованы через env SLESS_TOKEN / SLESS_NS
- PG_HOST/PORT/USER/PASSWORD/DATABASE/TABLE добавлены в CONFIG
- make_python_pg_zip: Python handler с psycopg2 (init/insert/count)
- create_pg_deploy, pg_invoke_burst, pg_count_fn, pg_init_fn
- Group 11 PG STORM: 11 тестов, 300+ параллельных INSERT/COUNT
- Итоговый banner обновлён (G11 + PG STORM label)
2026-03-22 06:55:31 +03:00
Naeel e6be6026fe fix: survival test — false alarm at 5.2, empty CLEANUP entries, teardown guard 2026-03-21 19:22:50 +03:00
Naeel a25725fdb7 test: operator_survival_test.sh — survival suite (группы 5-10)
5 FLOOD BUILD:         6 функций (3×Python + 3×Node.js) параллельно → все Ready
6 RAPID DISCARD STORM: 30 create→DELETE без build, orphan-check
7 CHURN UNDER FIRE:    10 PUT env-updates под 200 параллельными invokes, rate≥90%
8 PHOENIX:             3 цикла DELETE+recreate одного имени
9 SELF-HEALING MARATHON: 5×kubectl delete deployment → auto-recreate (RequeueAfter)
10 INVOKE HURRICANE:   500 параллельных invokes в 5 волнах (100 × 5), rate≥90%

Ожидаемое время прогона: 75-100 минут
2026-03-21 19:16:30 +03:00
Naeel f65677a4d0 fix: operator v0.1.49 — Resources update + self-healing requeue
БАГ 1: ensureServiceDeployment UPDATE блок теперь обновляет Containers[0].Resources
  → memory_mb через PUT применяется к k8s Deployment

БАГ 2: ensureServiceDeployment возвращает RequeueAfter: 60s вместо Result{}
  → ручное удаление Deployment пересоздаётся контроллером в течение 60s

lifecycle-тест: 47/47 PASS (ранее 44/44 с 2 known bugs)
2026-03-21 18:51:02 +03:00
Naeel 9b74358979 docs: lifecycle test — 44/44 PASS; 2 бага оператора задокументированы в errors/log.md + progress.md
Баги:
  1. memory_mb через PUT не обновляет k8s Deployment Resources → controllers/service_controller.go:~241
  2. нет self-healing при ручном удалении Deployment → нет RequeueAfter / cross-namespace watch
2026-03-21 18:32:14 +03:00
Naeel 67e1bd4786 test(operator): lifecycle test — 44/44 PASS; 2 бага оператора задокументированы
Группы тестов:
  1. Валидация API (8 тестов) — memory_mb, timeout_sec, missing fields, 404
  2. Полный цикл одной функции (18 тестов):
     - create → build → ready → invoke → env update → memory update → timeout → delete
     - delete → k8s Deployment/Service удалены
  3. Граничные сценарии:
     - DELETE while Building → kaniko убит, Deployment не создан
     - Reconcile: kubectl delete Deployment → [БАГ: не пересоздаётся]
  4. Параллельные функции (10 тестов):
     - 3 функции одновременно → delete одной в Building → 2 доходят до Ready
     - 40 параллельных invoke → 40/40 OK

Найденные баги оператора:
  БАГ 1: ensureServiceDeployment не обновляет Resources (memory_mb через PUT игнорируется)
  БАГ 2: нет self-healing — если Deployment удалён вручную, контроллер не пересоздаёт
         (нет cross-namespace watch, RequeueAfter не задан)
2026-03-21 17:58:14 +03:00
Naeel b86ff3a62e feat(service): timeout_sec без дефолта; 0=нет таймаута; operator v0.1.48
- api/v1alpha1/service_types.go: убрать +kubebuilder:default=30
- invoke.go: TimeoutSec=0 → &http.Client{} (без таймаута)
- services.go: валидация timeout_sec < 0 || > 900 → HTTP 400
- service_resource.go: TF schema Optional (без Computed); 0 → Int64Null()
- deployments/k8s/operator.yaml: v0.1.47 → v0.1.48
- doc/: progress.md + api/design.md (модель Service) + decisions/log.md
- examples/POSTGRES/: bug_hunter.sh, chaos_marathon.sh, chaos_marathon.tf
2026-03-21 16:58:43 +03:00
Naeel 7f7aa44e59 chore: удаление устаревших examples, новый doc, правки funcs-service
- examples/: удалены старые директории (TNAR, demo-event-log, demo-managed-functions,
  hello-go, hello-node, notes-python, pg-list-python, simple-node, simple-python)
- examples/README.md: обновлён (только POSTGRES остался)
- doc/decisions/build-deploy-pipeline.md: новый документ по пайплайну сборки/деплоя
- services/funcs/main.go: правки из текущей сессии
2026-03-21 08:46:30 +03:00
Naeel 778cbc8b32 fix(runtime): Go panic→500 (recover), Python exception→500+threading+backlog
- go1.23 v0.1.2: defer recover() в HTTP handler — panic no longer closes connection → HTTP 500
- python3.11 v0.1.5: try/except в do_GET/_handle_with_body/do_HEAD → 500 вместо EOF
- python3.11 v0.1.5: ThreadingHTTPServer — concurrent requests (был single-thread)
- python3.11 v0.1.6: _HighBacklogHTTPServer(request_queue_size=128) — listen(128) вместо listen(5)
- context.go: go1.23 v0.1.1→v0.1.2, python3.11 v0.1.4→v0.1.6
- operator: v0.1.45 → v0.1.47 (два деплоя подряд с новыми runtime-версиями)
- examples/POSTGRES: stress.tf (10 сервисов), full_test.sh (48 тестов, 4 фазы)
- examples/POSTGRES: README.md, очистка от старых файлов (luceUNDnode.tf, funcs_list.py)

Результат: full_test.sh 48/48 PASS
- Фаза 3 PG-стресс: 40/40 parallel writer OK, 30/30 js-async OK, pgstorm 14k ops 0 err
- Фаза 4 краш-шторм: 75/75 × HTTP 500 (паники не роняют платформу)
2026-03-21 08:42:03 +03:00
Naeel 0592f57fb6 docs: log examples cleanup session 2026-03-21 2026-03-21 07:50:09 +03:00
Naeel 37a50c23c0 docs: document session 2 — API testing, DELETE 404 fix, funcs-console, source for services 2026-03-21 07:31:23 +03:00
Naeel 50f24565ec fix(source): add /services/{name}/source endpoint; fix 404 for service code view in funcs-console 2026-03-21 07:20:03 +03:00
Naeel 09b35888d4 fix(deploy): imagePullSecrets + образ v0.2.1 в funcs-service.yaml 2026-03-21 07:09:36 +03:00
Naeel 683d7282af feat(funcs-console): показывать sless_service вместе с функциями — единый листинг 2026-03-21 07:00:59 +03:00
Naeel e8d0d78310 fix(api): DELETE несуществующего ресурса — 404 вместо 204 (function/service/trigger/job) 2026-03-21 06:45:55 +03:00
Naeel 146d3b5d5d docs(progress): итоги deploy v0.1.43, terraform apply POSTGRES Succeeded 2026-03-21 06:32:50 +03:00
Naeel c910bb8b36 chore: operator image v0.1.43 2026-03-21 06:24:01 +03:00
Naeel 735958ba4f fix(controller): ждать S3Key перед startJobBuild — provider загружает код после создания CRD 2026-03-21 06:21:16 +03:00
Naeel 3b3d510def chore(postgres): provider version 0.1.18 → 0.1.19 (sless_job self-contained) 2026-03-20 22:08:19 +03:00
Naeel b3559c972c chore(crd): регенерация — FunctionJobSpec самодостаточен (runtime/entrypoint/env) 2026-03-20 22:02:28 +03:00
Naeel 3dfe98e93a fix(operator): добавить imagePullSecrets sless-registry-auth для pearlharbor 2026-03-20 22:00:20 +03:00
Naeel 23141e5ae9 chore: operator image v0.1.42 — pearlharbor registry 2026-03-20 21:56:16 +03:00
Naeel 6f76ecbc81 fix(invoke): заменить FunctionRef на поля из Function.Spec — FunctionJobSpec самодостаточен 2026-03-20 21:52:49 +03:00