Skip to content

feat: implement counter app demo in Burr UI#675

Merged
skrawcz merged 2 commits into
apache:mainfrom
andreahlert:worktree-issue-69-counter-app
Mar 16, 2026
Merged

feat: implement counter app demo in Burr UI#675
skrawcz merged 2 commits into
apache:mainfrom
andreahlert:worktree-issue-69-counter-app

Conversation

@andreahlert
Copy link
Copy Markdown
Collaborator

Summary

  • Add FastAPI server for the hello-world-counter example with /count, /state and /create endpoints, following the multi-modal-chatbot server pattern
  • Register counter router in the main Burr tracking server (run.py)
  • Implement Counter React component with increment button and live telemetry view, replacing the WIP placeholder
  • Add CounterState model and API service methods to the frontend

Closes #69

Test plan

  • Python: server module imports, counter increments correctly, Pydantic model validates
  • TypeScript: tsc --noEmit passes with no errors
  • End-to-end: all endpoints tested via curl against a running Burr server (POST /create, GET /state, POST /count)
  • Tracking integration: steps are recorded and visible via /apps and application logs endpoints
  • OpenAPI spec: counter endpoints appear correctly in the generated schema

Add a fully functional counter demo integrated with the Burr tracking
UI, replacing the previous WIP placeholder.

Backend:
- Add FastAPI server for the counter example with /count, /state and
  /create endpoints
- Register counter router in the main Burr tracking server

Frontend:
- Implement Counter React component with increment button and live
  telemetry view
- Add CounterState model and API service methods
@skrawcz
Copy link
Copy Markdown
Contributor

skrawcz commented Mar 12, 2026

@andreahlert can you add pictures of it in action?

@andreahlert
Copy link
Copy Markdown
Collaborator Author

@andreahlert can you add pictures of it in action?

Sure! Tomorrow morning I'll bring it back to you.

@skrawcz
Copy link
Copy Markdown
Contributor

skrawcz commented Mar 16, 2026

Screenshot 2026-03-15 at 22 22 44

Looks good @andreahlert -- I fixed up the pre-commit.

@skrawcz skrawcz merged commit 226288f into apache:main Mar 16, 2026
11 of 12 checks passed
@andreahlert andreahlert deleted the worktree-issue-69-counter-app branch March 16, 2026 06:00
@andreahlert
Copy link
Copy Markdown
Collaborator Author

Thanks. Sorry for not being able to do it on time.

elijahbenizzy added a commit that referenced this pull request Apr 20, 2026
The tracking server imports burr.examples.hello-world-counter.server
(added in #675) but the release config still had it in the exclude
list. Move it from exclude to include so the wheel ships with the
module the server needs, preventing ModuleNotFoundError when running
burr from a fresh install.

Also bumps REQUIRED_EXAMPLES in scripts/apache_release.py and updates
tests/test_release_config.py accordingly.
elijahbenizzy added a commit that referenced this pull request Apr 21, 2026
Preparation for the release-validation CI workflow.

apache_release.py:
- Add --skip-signing to archive/sdist/wheel/all subcommands
- Split _sign_artifact into checksum (always) and GPG sign (skippable)
- Drop gpg from required tools when --skip-signing is set

ci_smoke_server.py:
- Installs a built wheel into a fresh venv outside the source tree
- Imports burr.tracking.server.run (catches missing-example bugs like #675)
- Starts the burr server on a free port with a dedicated data dir
- Runs a tracked app, verifies the server observes the project
elijahbenizzy added a commit that referenced this pull request Apr 21, 2026
Build the full release pipeline on every PR, plus RAT license check
and an end-to-end smoke install of the wheel outside the source tree.
This catches the failure modes that have broken recent RCs:

- build-artifacts: runs apache_release.py all --skip-signing --no-upload,
  verifies the 3 artifacts exist, runs Apache RAT without --report-only
  so license violations fail the job.
- install-and-smoke: on 3.10/3.11/3.12, installs the wheel into a fresh
  venv and runs scripts/ci_smoke_server.py. That helper imports the
  server module, boots the server, runs a tracked app, and asserts the
  server sees the project — so a missing example (like PR #675's
  hello-world-counter) would fail here.

Only "build-artifacts" and "install-and-smoke (3.12)" are required
checks in .asf.yaml; 3.10 and 3.11 are informational.
elijahbenizzy added a commit that referenced this pull request Apr 22, 2026
The tracking server imports burr.examples.hello-world-counter.server
(added in #675) but the release config still had it in the exclude
list. Move it from exclude to include so the wheel ships with the
module the server needs, preventing ModuleNotFoundError when running
burr from a fresh install.

Also bumps REQUIRED_EXAMPLES in scripts/apache_release.py and updates
tests/test_release_config.py accordingly.
elijahbenizzy added a commit that referenced this pull request Apr 22, 2026
Preparation for the release-validation CI workflow.

apache_release.py:
- Add --skip-signing to archive/sdist/wheel/all subcommands
- Split _sign_artifact into checksum (always) and GPG sign (skippable)
- Drop gpg from required tools when --skip-signing is set

ci_smoke_server.py:
- Installs a built wheel into a fresh venv outside the source tree
- Imports burr.tracking.server.run (catches missing-example bugs like #675)
- Starts the burr server on a free port with a dedicated data dir
- Runs a tracked app, verifies the server observes the project
elijahbenizzy added a commit that referenced this pull request Apr 22, 2026
Build the full release pipeline on every PR, plus RAT license check
and an end-to-end smoke install of the wheel outside the source tree.
This catches the failure modes that have broken recent RCs:

- build-artifacts: runs apache_release.py all --skip-signing --no-upload,
  verifies the 3 artifacts exist, runs Apache RAT without --report-only
  so license violations fail the job.
- install-and-smoke: on 3.10/3.11/3.12, installs the wheel into a fresh
  venv and runs scripts/ci_smoke_server.py. That helper imports the
  server module, boots the server, runs a tracked app, and asserts the
  server sees the project — so a missing example (like PR #675's
  hello-world-counter) would fail here.

Only "build-artifacts" and "install-and-smoke (3.12)" are required
checks in .asf.yaml; 3.10 and 3.11 are informational.
elijahbenizzy added a commit that referenced this pull request Apr 24, 2026
* fix: add __init__.py to tests/ so pytest discovery works

* fix: add ASF license header to tutorial.md

* fix: update .rat-excludes for RC2 feedback

- Fix patterns for burr/examples/ symlink duplicates (use .* prefix)
- Add .github/ templates (YAML/MD with frontmatter)
- Add image file extensions (.png, .gif, .ico, .jpg)

* fix: include hello-world-counter in release artifacts

The tracking server imports burr.examples.hello-world-counter.server
(added in #675) but the release config still had it in the exclude
list. Move it from exclude to include so the wheel ships with the
module the server needs, preventing ModuleNotFoundError when running
burr from a fresh install.

Also bumps REQUIRED_EXAMPLES in scripts/apache_release.py and updates
tests/test_release_config.py accordingly.

* fix: use sys.executable for uvicorn subprocess to fix venv isolation

The CLI spawned uvicorn as a bare command, which resolves via PATH.
For users with pyenv installed, ~/.pyenv/shims/ is in PATH ahead of
any venv's bin/, so bare `uvicorn` always hits a pyenv shim that
routes to a pyenv environment — never the venv the user is running
burr from. This means a fresh `pip install` into a non-pyenv venv
fails to start the server.

Using sys.executable -m uvicorn ensures uvicorn runs under the same
Python interpreter that is running burr, regardless of PATH.

* chore: add --skip-signing flag and CI smoke-test helper

Preparation for the release-validation CI workflow.

apache_release.py:
- Add --skip-signing to archive/sdist/wheel/all subcommands
- Split _sign_artifact into checksum (always) and GPG sign (skippable)
- Drop gpg from required tools when --skip-signing is set

ci_smoke_server.py:
- Installs a built wheel into a fresh venv outside the source tree
- Imports burr.tracking.server.run (catches missing-example bugs like #675)
- Starts the burr server on a free port with a dedicated data dir
- Runs a tracked app, verifies the server observes the project

* ci: drop svn requirement from 'all' command when --no-upload is set

CI runners don't have svn installed. The 'all' subcommand listed svn as
a required tool unconditionally, but svn is only used during the upload
step. Skip the requirement when --no-upload is passed.

* ci: add release validation workflow

Build the full release pipeline on every PR, plus RAT license check
and an end-to-end smoke install of the wheel outside the source tree.
This catches the failure modes that have broken recent RCs:

- build-artifacts: runs apache_release.py all --skip-signing --no-upload,
  verifies the 3 artifacts exist, runs Apache RAT without --report-only
  so license violations fail the job.
- install-and-smoke: on 3.10/3.11/3.12, installs the wheel into a fresh
  venv and runs scripts/ci_smoke_server.py. That helper imports the
  server module, boots the server, runs a tracked app, and asserts the
  server sees the project — so a missing example (like PR #675's
  hello-world-counter) would fail here.

Only "build-artifacts" and "install-and-smoke (3.12)" are required
checks in .asf.yaml; 3.10 and 3.11 are informational.

* fix: rewrite .rat-excludes with basename patterns that actually work

RAT's -E regex doesn't reliably match through path separators or
symlinked directories. The previous patterns like
'examples/deep-researcher/prompts.py' never excluded anything because
RAT effectively matches against basenames. We never noticed because
all prior RAT runs used --report-only mode.

Switch to basename patterns. The .tsx files are uniquely named, so
basename matching is precise. prompts.py only exists once. utils.py
matches 5 different files (all our own ASF code with headers); the
practical risk of skipping their checks is low.

Update the leading comment in .rat-excludes to document the constraint
so future authors don't repeat the mistake.

* chore: add .claude/ to .gitignore

* fix: address review feedback (paths-ignore, basename collisions, count)

- Workflow: drop '**/*.md' from paths-ignore. It would suppress runs
  whenever a bundled .md file (like the deployment tutorial.md) changes
  — exactly the case that triggered RC2 feedback.
- .rat-excludes: document the basename collisions for utils.py and
  button.tsx so the next maintainer doesn't think they're unique.
- test_release_config.py: fix '4 examples' string that should have been
  bumped to 5 when hello-world-counter was added.

* fix: use os.path.lexists in _prepare_wheel_contents to handle broken symlinks

On CI runners, burr/examples is a relative symlink ('../examples') that
may not resolve from the process's working directory — os.path.exists
returns False for a broken link while the link itself is still present
on disk. That made _prepare_wheel_contents skip the removal branch and
then fail on os.makedirs with 'File exists: burr/examples'.

Switch to os.path.lexists, which returns True for any directory entry
including broken symlinks, so the cleanup branch always runs when the
link is present.
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.

Counter app in Burr demo

2 participants