Skip to content

[agentbricks] Wait for dev's next steps in the dev template suites - #832

Merged
elainewang-db merged 1 commit into
databricks:mainfrom
elainewang-db:agentbricks-dev-panel-wait
Oct 30, 2026
Merged

elainewang-db merged 1 commit into
databricks:mainfrom
elainewang-db:agentbricks-dev-panel-wait

Conversation

@elainewang-db

Copy link
Copy Markdown
Contributor

What

test_dev_templates now polls the agentbricks dev log for the printed agentbricks endpoint invoke command, for up to 30 seconds, instead of reading the log once. It stops early if dev exits.

Why

Since #812, agentbricks dev prints its next-steps panel only once its own readiness poll (every 0.25s) sees the agent answering on its port. The test waits for that port separately (wait_until_serving, which counts the 404 from GET / as up) and then read the log immediately, so it could read it before the panel was written. That failed agentbricks_dev_functional (ubuntu-latest) on #831 (job): test_dev_templates[langgraph-custom], assert 0 == 1 on the invoke command count, with the log ending at the probe's GET / 404 and "Starting agent locally…". The same job passed on #812 and on main at that commit.

This is test-only. The product behaves as intended: the panel appears once the agent answers.

Testing

  • uv run pytest tests/suites/test_dev.py -k test_dev_templates --workspace fake -n 5: 5 passed. The race is intermittent, so a local pass doesn't prove it's gone.
  • ruff check / ruff format --check clean.

This pull request and its description were written by Isaac.

Since databricks#812, `agentbricks dev` prints its next-steps panel (with the
`agentbricks endpoint invoke` command) only once its own readiness poll
sees the agent answering. `test_dev_templates` waits for the port itself
and then read the log once, so it could read it before the panel was
written and fail with no invoke command found.

Poll the log for the invoke command for up to 30 seconds instead, and
stop early if `dev` exits.

Co-authored-by: Isaac <no-reply@databricks.com>
@elainewang-db
elainewang-db enabled auto-merge (squash) October 30, 2026 20:50
@elainewang-db
elainewang-db merged commit 051c51a into databricks:main Oct 30, 2026
55 checks passed
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