Not learning from block; trace is missing
Opened this issue · 2 comments
jlewi commented
I have a block log which should have a generate trace associated with it but I only see exec traces.
Block log
{
"id": "01HZ3K97HMF590J823F10RJZ4T",
"execTraceIds": [
"01HZ3KB7Q01XB8QNH30MZN5BDF",
"01HZ3KBAKYKZXH8TS6WZ4S1K9E",
"01HZ3KA0DK5YBG9JRK8P1TY9SD",
"01HZ3KA0DK5YBG9JRK8P1TY9SD",
"01HZ3KBAKYKZXH8TS6WZ4S1K9E",
"01HZ3KB7Q01XB8QNH30MZN5BDF"
],
"executedBlock": {
"kind": "CODE",
"contents": "flux reconcile kustomization dev-cluster ----with-source "
},
"exitCode": -2377
}
Here's the result of grepping the logs for that block
/Users/jlewi/.foyle/logs/raw/foyle.logs.2024-05-28T17:39:34.json:{"severity":"info","time":1717034065.4601119,"caller":"agent/agent.go:105","function":"github.com/jlewi/foyle/app/pkg/agent.(*Agent).Generate","message":"Agent.Generate returning blocks","traceId":"a0d115795efe207d614f4fb0aacf177d","evalMode":false,"blockIds":["01HZ3K97HMF590J823EY849AB2","01HZ3K97HMF590J823EYM78T13","01HZ3K97HMF590J823F06DQRRM","01HZ3K97HMF590J823F10RJZ4T","01HZ3K97HMF590J823F18XD0FD"]}
jlewi commented
The timestamp of the log file seems off; why is it from 24 hours ago? I suspect maybe its because that's when I started foyle and had stopped it since then.
jlewi commented
When I ran it under a debugger it got the trace and updated the block.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1123 100 1123 0 0 75663 0 --:--:-- --:--:-- --:--:-- 109k
{
"id": "01HZ3K97HMF590J823F10RJZ4T",
"genTraceId": "a0d115795efe207d614f4fb0aacf177d",
"execTraceIds": [
"01HZ3KB7Q01XB8QNH30MZN5BDF",
"01HZ3KBAKYKZXH8TS6WZ4S1K9E",
"01HZ3KA0DK5YBG9JRK8P1TY9SD",
"01HZ3KA0DK5YBG9JRK8P1TY9SD",
"01HZ3KBAKYKZXH8TS6WZ4S1K9E",
"01HZ3KB7Q01XB8QNH30MZN5BDF",
"01HZ3KB7Q01XB8QNH30MZN5BDF",
"01HZ3KBAKYKZXH8TS6WZ4S1K9E",
"01HZ3KA0DK5YBG9JRK8P1TY9SD"
],
"doc": {
"blocks": [
{
"kind": "MARKUP",
"language": "markdown",
"contents": "Use gitops to aply the latest manifests to the dev cluster"
}
]
},
"generatedBlock": {
"kind": "CODE",
"language": "bash",
"contents": "# Step 1: Commit your latest changes to the Git repository holding the dev cluster manifests\ncd /path/to/dev-cluster-manifests\ngit add .\ngit commit -m \"Update manifests for dev cluster\"\ngit push origin main\n\n# Step 2: Trigger a synchronization in your GitOps tool to apply the changes to the dev cluster\n# Replace 'gitops-tool' with the actual tool you are using for GitOps\ngitops-tool sync dev-cluster",
"id": "01HZ3K97HMF590J823F10RJZ4T"
},
"executedBlock": {
"kind": "CODE",
"contents": "flux reconcile kustomization dev-cluster ----with-source "
},
"exitCode": -2377
}
Is it possible I need to rebuild my binary?