Skip to content

[agentbricks] overwrite a stale app.agentbricksdev.yaml in agentbricks dev - #726

Merged
elainewang-db merged 1 commit into
databricks:mainfrom
elainewang-db:mason-dev-overwrite-local-manifest
Oct 13, 2026
Merged

elainewang-db merged 1 commit into
databricks:mainfrom
elainewang-db:mason-dev-overwrite-local-manifest

Conversation

@elainewang-db

@elainewang-db elainewang-db commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#675 made agentbricks dev refuse to start when app.agentbricksdev.yaml already exists. Dev deletes that file on exit, but only in a finally block, which doesn't run when the process is stopped by SIGTERM (an IDE stop button, kill, docker stop). After one such stop, every later agentbricks dev on the project fails until the user deletes the file by hand:

error: Could not write .../app.agentbricksdev.yaml: it already exists.
  help: Inspect and remove the old local-only manifest before retrying.

The E2E dev suite (#706) hit this on its first restart of agentbricks dev.

The file name is specific to dev, and the file is always regenerated from app.yaml. So this restores the pre-#675 behavior of overwriting it. A failed write still removes the partial file, so apps run-local never picks up a half-written manifest.

Changes

  • services/dev_service.py: _dev_entry_point writes the manifest with open("w") instead of open("x"), and removes the file if the write fails.
  • tests/unit_tests/dev_service_test.py:
    • removes test_prepare_refuses_stale_manifest_without_clobbering_user_file, which asserted the refusal;
    • test_manifest_write_failure_removes_partial_manifest_and_stops_tracing now intercepts the "w" open mode.

Testing

  • pytest tests/unit_tests: 1613 passed, 83 skipped.
  • ruff check and ruff format --check pass. ty check reports nothing in the changed files.
  • Not yet run live: the E2E test_dev[cli] in [l] [agentbricks] Add pytest E2E suites #706 should pass once this lands.

This pull request and its description were written by Isaac.

…s dev

Co-authored-by: Isaac <no-reply@databricks.com>
@elainewang-db elainewang-db changed the title [agentbricks] overwrite a stale app.agentbricksdev.yaml in agentbrick… [agentbricks] overwrite a stale app.agentbricksdev.yaml in agentbricks dev Oct 13, 2026

@jamesbxwu jamesbxwu 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.

thanks for catching and fixing this!

The E2E dev suite (#706) hit this on its first restart of agentbricks dev.

Curious why this wasn't caught previously (perhaps I didn't run it fully?)

@elainewang-db
elainewang-db merged commit c8989b6 into databricks:main Oct 13, 2026
54 checks passed
@elainewang-db

Copy link
Copy Markdown
Contributor Author

thanks for catching and fixing this!

The E2E dev suite (#706) hit this on its first restart of agentbricks dev.

Curious why this wasn't caught previously (perhaps I didn't run it fully?)

ah I've actually rewritten the smoke tests, and was running that new version

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