Skip to content

Conversation

@fengcone
Copy link
Collaborator

Summary

  • What is changing and why?

Testing

  • Not run (docs only)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

```python
# From fast-sandbox internal/controller/agentpool/registry.go

def Allocate(sandbox) -> AgentInfo:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not show the allocate logic using golang directly, since this happens in the fast sandbox controller?

candidates.append((agent, score))

# Select lowest score (prefers cached images)
return min(candidates, key=lambda x: x[1])[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if no candidates available?

continue
if agent.allocated >= agent.capacity:
continue
if not agent.has_available_port(sandbox.ports):
Copy link
Collaborator

Choose a reason for hiding this comment

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

In some scenarios, we have no idea which ports will be used for a given sandbox.
And this do increase the ports conflict issue to the sandbox running phase.

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