- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Override logs fixes #260
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
Override logs fixes #260
Conversation
      
          
      
      
            foxish
  
      
      
      commented
        Oct 31, 2025 
      
    
  
    | } else { | ||
| routingStr = sandboxName | ||
| } | ||
| routingStr = fmt.Sprintf("%-32s", routingStr) | 
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.
the 32 chars looks odd on short names:
$ signadot local override --sandbox=test2 --workload=route --workload-port=8083 --with=localhost:18083
→ Applying override to test2
Waiting (up to --wait-timeout=3m0s) for sandbox to be ready...
✓ Sandbox status: Ready: All desired workloads are available.
✓ Local destination localhost:18083 will override sandbox responses as follows:
All HTTP/gRPC requests intended for sandbox test2, workload route, port 8083 will be sent to your local service at localhost:18083.
* If your local service (localhost:18083) responds with header `sd-override: true`:
    -> Response from your local service (localhost:18083) is returned to the client.
* Otherwise:
    -> Request is forwarded to the sandbox (test2).
Printing traffic logs below (press Ctrl+C to stop):
SERVED BY                        METHOD  PATH -> STATUS
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
localhost:18083                  POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200
test2                            POST    /route.RoutesService/FindRoute -> 200Why don't we set a dynamic value based on the lenght of the sandbox and or local addr?
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 just went by the longest width needed for a sandbox - I'm a bit wary of the dynamic computation but I guess in this case it's quite safe.
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.
Will make this change and push
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.
Done
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