chore(release): prepare 0.27.0b1 - #521
stephen-wang24 wants to merge 2 commits into
Conversation
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
| RUN --mount=type=secret,id=codeartifact-pip-conf,required=false \ | ||
| if [ -s /run/secrets/codeartifact-pip-conf ]; then \ | ||
| export UV_DEFAULT_INDEX="$(sed -n 's#^[[:space:]]*index-url[[:space:]]*=[[:space:]]*##p' /run/secrets/codeartifact-pip-conf | head -1)"; \ | ||
| fi; \ | ||
| uv pip install --system -r requirements.txt |
There was a problem hiding this comment.
requirements.txt can choose a source package whose build code runs inside this same RUN. That code inherits the credentialed UV_DEFAULT_INDEX and can read codeartifact-pip-conf while it is mounted. Keep the secret out of dependency build processes, or install only trusted private artifacts before running project-controlled builds. The same pattern appears in the other requirements-based Dockerfile templates.
How this was verified: Project-controlled requirements run build code while the private-index secret and credentialed environment value are both available.
Knowledge Base Used: Command-line workflows
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/cli/templates/default/Dockerfile.j2
Line: 40-44
Comment:
`requirements.txt` can choose a source package whose build code runs inside this same `RUN`. That code inherits the credentialed `UV_DEFAULT_INDEX` and can read `codeartifact-pip-conf` while it is mounted. Keep the secret out of dependency build processes, or install only trusted private artifacts before running project-controlled builds. The same pattern appears in the other requirements-based Dockerfile templates.
**How this was verified:** Project-controlled requirements run build code while the private-index secret and credentialed environment value are both available.
**Knowledge Base Used:** [Command-line workflows](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/command-line-workflows.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| if shutdown is None: | ||
| logger.debug("sgp-obs has no shutdown(); needs 0.16.0+ to flush on exit") | ||
| return | ||
| await asyncio.to_thread(shutdown) |
There was a problem hiding this comment.
sgp_obs.shutdown does blocking exporter work, but this await has no deadline. If an exporter or collector stalls, ACP and Temporal shutdown can wait past the pod grace period. asyncio.to_thread also leaves a stalled default-executor thread to be joined at process exit. Give the whole flush a hard budget and use an exit path that cannot be held open by the worker thread.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/core/observability/sgp_obs_setup.py
Line: 339
Comment:
`sgp_obs.shutdown` does blocking exporter work, but this await has no deadline. If an exporter or collector stalls, ACP and Temporal shutdown can wait past the pod grace period. `asyncio.to_thread` also leaves a stalled default-executor thread to be joined at process exit. Give the whole flush a hard budget and use an exit path that cannot be held open by the worker thread.
**Knowledge Base Used:**
- [Observability](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/observability.md)
- [Tracing pipeline](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/tracing-pipeline.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| init_sgp_obs() | ||
|
|
||
| await self.start_health_check_server() |
There was a problem hiding this comment.
init_sgp_obs runs before the cleanup try. If health startup, registration, client creation, workflow checks, or Worker construction fails, the new providers never reach shutdown_sgp_obs, so buffered startup telemetry and exporter resources are left behind. Start the try immediately after initialization so every later exit drains what was created.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/core/temporal/workers/worker.py
Line: 237-239
Comment:
`init_sgp_obs` runs before the cleanup `try`. If health startup, registration, client creation, workflow checks, or `Worker` construction fails, the new providers never reach `shutdown_sgp_obs`, so buffered startup telemetry and exporter resources are left behind. Start the `try` immediately after initialization so every later exit drains what was created.
**Knowledge Base Used:**
- [Temporal execution](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/temporal-execution.md)
- [Observability](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/observability.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
https://github.com/scaleapi/scale-agentex-python/actions/runs/35035099786 published to public pypi landed https://pypi.org/project/agentex-sdk/#history |
Summary
agentex-sdkbeta containing only the observability changes from feat(obs): wire sgp-obs from the SDK for traces, metrics and logs #5180.27.0b10.27.0-b1in the release-please manifestRelease scope
This PR prepares the beta release but does not publish it. Do not run
publish-pypi.ymluntil the intended public-vs-private distribution path has been confirmed. If public PyPI is selected, dispatch the workflow foragentex-sdkonly.Validation
uv sync --all-packages --all-extrasuv run ruff check .uv run pyright -p .uv run pytest(1679 passed, 1622 skipped)uv build --all-packages --wheel0.27.0b1This PR is not safe to merge until the private-index token is isolated and observability shutdown is bounded.
Fix with agent prompt
Summary
Agentex now supports optional
sgp-obsobservability and private package installs while preparing both packages for the0.27.0b1beta release. The observability setup stays inactive unless an agent installs the private package and enables the matching environment settings.Diagram
sequenceDiagram participant Build as Agent image build participant Broker as Package broker participant UV as uv install participant ACP as ACP server participant Worker as Temporal worker participant Obs as sgp-obs participant Backend as Telemetry backend Broker-->>Build: Mount private index secret Build->>UV: Install project dependencies UV->>UV: Run selected package build code Build->>ACP: Start server ACP->>Obs: init_sgp_obs(app) Build->>Worker: Start worker process Worker->>Obs: init_sgp_obs() ACP->>Worker: Dispatch Temporal work Worker->>Obs: Record model and runtime telemetry Obs->>Backend: Export signals par ACP shutdown ACP->>ACP: Drain async and sync spans ACP->>Obs: shutdown_sgp_obs() and Worker shutdown Worker->>Worker: Drain sync spans Worker->>Obs: shutdown_sgp_obs() endReviews (1) · Last reviewed commit: "chore(release): prepare 0.27.0b1"