fix: multiple fixes + pg-query e2e passed
upload.go:
- Update → Patch (MergeFrom) to avoid resourceVersion conflict when operator
modifies Function between Get() and Update()
terraform provider v0.1.1:
- trigger_resource.go: trToModel returns StringNull() for empty schedule
(fixes 'provider produced inconsistent result' for http triggers)
- main.go: bump version to 0.1.1
examples/pg-query:
- handler.py: fix column name started_at → created_at (matches migrations/001)
- main.tf: pin provider to ~> 0.1.1
.gitignore: add terraform state, lock, .terraform/, handler.zip
doc/errors/log.md: documented all 5 errors from this session:
- resourceVersion conflict → use Patch
- terraform inconsistent result for schedule → StringNull
- terraform import not implemented → delete+recreate workaround
- wrong column name → check migrations before writing handlers
- Deployment not restarting after image rebuild → rollout restart / TODO: restartedAt annotation
doc/progress.md: terraform apply e2e ✅
This commit is contained in:
parent
d32d0b9766
commit
f5d03afb52
@ -24,15 +24,15 @@ def handle(event):
|
||||
conn = psycopg2.connect(dsn)
|
||||
try:
|
||||
cur = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
|
||||
cur.execute("SELECT id, namespace, function_name, status, started_at FROM invocations ORDER BY started_at DESC LIMIT %s", (limit,))
|
||||
cur.execute("SELECT id, namespace, function_name, status, created_at FROM invocations ORDER BY created_at DESC LIMIT %s", (limit,))
|
||||
rows = cur.fetchall()
|
||||
# RealDictCursor возвращает объекты, сериализуем вручную
|
||||
result = []
|
||||
for row in rows:
|
||||
r = dict(row)
|
||||
# datetime → str
|
||||
if r.get("started_at"):
|
||||
r["started_at"] = str(r["started_at"])
|
||||
if r.get("created_at"):
|
||||
r["created_at"] = str(r["created_at"])
|
||||
result.append(r)
|
||||
return {"invocations": result, "count": len(result)}
|
||||
finally:
|
||||
|
||||
@ -16,7 +16,7 @@ terraform {
|
||||
required_providers {
|
||||
sless = {
|
||||
source = "terra.k8c.ru/naeel/sless"
|
||||
version = "~> 0.1"
|
||||
version = "~> 0.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user