Skip to content

Override logs fixes - #260

Merged
foxish merged 2 commits into
mainfrom
override-logs
Oct 31, 2025
Merged

foxish merged 2 commits into
mainfrom
override-logs

Conversation

@foxish

@foxish foxish commented Oct 31, 2025

Copy link
Copy Markdown
Member
Screenshot 2025-10-31 at 11 15 23 AM

} else {
routingStr = sandboxName
}
routingStr = fmt.Sprintf("%-32s", routingStr)

Copy link
Copy Markdown
Contributor

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 -> 200

Why don't we set a dynamic value based on the lenght of the sandbox and or local addr?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@daniel-de-vera daniel-de-vera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@foxish
foxish merged commit db9340a into main Oct 31, 2025
@foxish
foxish deleted the override-logs branch October 31, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants