Skip to content

demos/counter: remove sandbox IP greeting from counter response - #3510

Merged
Dmitry Berkovich (dberkov) merged 2 commits into
agent-substrate:mainfrom
zoez7:remove-counter-hello-from
Oct 31, 2026
Merged

Dmitry Berkovich (dberkov) merged 2 commits into
agent-substrate:mainfrom
zoez7:remove-counter-hello-from

Conversation

@zoez7

@zoez7 Zoe Zhao (zoez7) commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #3498 (comment). Remove hello from: %s and getCurrentIP() from demos/counter/counter.go.

Why? counter.go included hello from: <ip> in its response from early dyas of Substrate to show that an actor resumed on a different worker Pod IP. However, now every actor sandbox uses the fixed veth address 169.254.17.2 (ActorVethIP in internal/ateworker/actornet/net.go), so getCurrentIP() always returns 169.254.17.2 regardless of which worker Pod hosts the actor.

Also updated documentations to remove mentioning of "the different worker Pod IP replied by counter indicates it was resumed on another pod".

AI use: AI-assisted to update the counter demo, docs, and tests; I reviewed the diff.

  • Tests pass
  • Docs updated

Comment thread demos/counter/counter.go Outdated
// Command counter is a simple server that will be used as a worker pod. It listens on ports 80
// and returns a greeting with the IP of the pod where it is running.
// Command counter is a simple HTTP server that listens on port 80 and increments
// counters in memory, on a durable volume, and on the root filesystem.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: the counter demo support --extra-port and --tcp-port

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in f044c39.

getCurrentIP returns the sandbox's fixed link-local veth address (169.254.17.2) rather than the worker pod IP. Remove it from the counter response and update the demo docs to check the worker pod assignment with kubectl ate get actor.

Signed-off-by: Zoe Zhao <[email protected]>
Signed-off-by: Zoe Zhao <[email protected]>
@dberkov
Dmitry Berkovich (dberkov) added this pull request to the merge queue Oct 31, 2026
Merged via the queue into agent-substrate:main with commit 659832f Oct 31, 2026
7 checks passed
Dmitry Berkovich (dberkov) pushed a commit that referenced this pull request Nov 2, 2026
<!-- The PR title becomes the release note. Write it for users. -->

Follow-up to
#3498 (comment).
Remove `hello from: %s` and `getCurrentIP()` from
`demos/counter/counter.go`.

Why? `counter.go` included `hello from: <ip>` in its response from early
dyas of Substrate to show that an actor resumed on a different worker
Pod IP. However, now every actor sandbox uses the fixed veth address
`169.254.17.2` (`ActorVethIP` in `internal/ateworker/actornet/net.go`),
so `getCurrentIP()` always returns `169.254.17.2` regardless of which
worker Pod hosts the actor.

Also updated documentations to remove mentioning of "the different
worker Pod IP replied by counter indicates it was resumed on another
pod".

<!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author
trailers. -->
AI use: AI-assisted to update the counter demo, docs, and tests; I
reviewed the diff.

<!-- Breaking change? Describe what users must do on upgrade and ask for
the `breaking-change` label. -->

- [x] Tests pass
- [x] Docs updated

---------

Signed-off-by: Zoe Zhao <[email protected]>
(cherry picked from commit 659832f)
Signed-off-by: Eitan Yarmush <[email protected]>
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