-
Notifications
You must be signed in to change notification settings - Fork 2
Tw continuous ready match #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Gitar automatically fixes CI failures and addresses comments starting with ⚙️ Options:
🔄 To revert changes, post a comment:
* Gitar never force pushes to your branch |
9050be7
to
63cc7b1
Compare
in terminal logs and directory output meta.jsons, this will output a json ``` {"middlewareRequestID":"c3e36c64","doneAt":"2025-10-13T17:06:32.026094+02:00"} {"middlewareRequestID":"777bfc30","doneAt":"2025-10-13T17:06:38.413933+02:00"} {"middlewareRequestID":"777bfc30","watchOptions":"-trunc(0)/-trunc(0)","when":"2025-10-13T15:06:38.385144025Z","normHost":"location.hotrod-devmesh.svc.cluster.local:8081","routingKey":"g9wqf90gqw9mj","destWorkload":"Deployment/hotrod-devmesh/location","requestURI":"http://sbr-dep-location-2c37fc13.hotrod-devmesh.svc:8081/locations","method":"GET","proto":"HTTP/1.1","userAgent":"curl/8.7.1"} ``` Note the order between doneAt and the initial request is not guaranteed (I think it would be hard and likely buggy to do so...) In request directories, the meta.jsons gets updated to include "doneAt":
@scott-cotton, here is another issue: $ signadot sandbox apply -f - <<EOF
name: test1
spec:
cluster: test
virtual:
- name: location
workload:
kind: Deployment
namespace: hotrod-devmesh
name: location
routing:
forwards:
- name: test
port: 8081
toLocal: "localhost:18081"
EOF
$ signadot traffic watch --sandbox test1 --dir /tmp/tw1
Error: 400 Bad Request: sandboxes with spec.local or spec.routing.forwards must be created via the Signadot CLI |
- overwrite on first apply - fix retErrs overwrites - fix a couple of logic issues
* adds doneAt reporting in terminal logs and directory output meta.jsons, this will output a json ``` {"middlewareRequestID":"c3e36c64","doneAt":"2025-10-13T17:06:32.026094+02:00"} {"middlewareRequestID":"777bfc30","doneAt":"2025-10-13T17:06:38.413933+02:00"} {"middlewareRequestID":"777bfc30","watchOptions":"-trunc(0)/-trunc(0)","when":"2025-10-13T15:06:38.385144025Z","normHost":"location.hotrod-devmesh.svc.cluster.local:8081","routingKey":"g9wqf90gqw9mj","destWorkload":"Deployment/hotrod-devmesh/location","requestURI":"http://sbr-dep-location-2c37fc13.hotrod-devmesh.svc:8081/locations","method":"GET","proto":"HTTP/1.1","userAgent":"curl/8.7.1"} ``` Note the order between doneAt and the initial request is not guaranteed (I think it would be hard and likely buggy to do so...) In request directories, the meta.jsons gets updated to include "doneAt": * fixes to continuous readiness checking - overwrite on first apply - fix retErrs overwrites - fix a couple of logic issues
@daniel-de-vera I merged the addition of doneAt here for workflow reasons. It contains fixes for your comments above, in addition to @foxish 's suggestion to overwrite on first apply. It does not yet contain adding local machine id when needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ signadot traffic watch --sandbox test1 --short
Waiting (up to --wait-timeout=30s) for sandbox to be ready...
✓ Sandbox status: Ready: All desired workloads are available.
msg="watching sandbox request activity" sandbox=test1 watch-options=-trunc(0)/-trunc(0) output=<none>
msg=incoming-request sandbox=test1 request.id=d4404429 request.normHost=location.hotrod-devmesh.svc.cluster.local:8081 request.dest=Deployment/hotrod-devmesh/location request.uri=http://location.hotrod-devmesh.svc:8081/locations request.method=GET request.userAgent=curl/8.5.0
msg=request-done sandbox=test1 request.id=d4404429 request.doneAt=2025-10-14T14:08:41.42059431-03:00
msg=request-done sandbox=test1 request.id=2dcf3f81 request.doneAt=2025-10-14T14:08:46.02429807-03:00
msg=incoming-request sandbox=test1 request.id=2dcf3f81 request.normHost=location.hotrod-devmesh.svc.cluster.local:8081 request.dest=Deployment/hotrod-devmesh/location request.uri=http://location.hotrod-devmesh.svc:8081/locations request.method=GET request.userAgent=curl/8.5.0
msg=request-done sandbox=test1 request.id=909417b3 request.doneAt=2025-10-14T14:08:51.290361624-03:00
msg=incoming-request sandbox=test1 request.id=909417b3 request.normHost=location.hotrod-devmesh.svc.cluster.local:8081 request.dest=Deployment/hotrod-devmesh/location request.uri=http://location.hotrod-devmesh.svc:8081/locations request.method=GET request.userAgent=curl/8.5.0
It's odd to find the request-done
event in stdout before the incoming-request
for the same request.id
.
Do you think there could be a simple solution to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned previously, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have however stacked #223 to address this.
I think it technically removes the limited memory guarantee, unfortunately, but in practice it would be near impossible for that to become an issue.
I also think it solves a race that would be hard to witness, being quite unlikely but technically possible, where the updated meta.json file could have a doneAt addition attempted before the initial write. I don't think that's practically likely b/c it waits for the request/response payload files to be written. But, technically the race I believe is there without the proposed change.
* implementation of tw directory default also, - improve help - improve signal handling * add --clean flag * fix sentence in help * use -{json,yaml} for directory * update flags after discussion - no-instrument is hidden - --to has become --output-dir, which only applies when !short - --output-file may be provided with --short * check match consistency as well. * rename watch command to record * add 'r' alias for record * rename files to reflect 'record' command name * use trafficwatch.MiddlewareName everywhere * rename cli mw to trafficwatch from trafficwatch-client (depends on PR in signadot repo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.