Skip to content

Commit 5e65454

Browse files
stainless-app[bot]deepthi-rao-scaleclaude
authored
chore: release main (#479)
Co-authored-by: Deepthi Rao <deepthi.rao@scale.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent c0566d9 commit 5e65454

9 files changed

Lines changed: 53 additions & 26 deletions

File tree

.github/workflows/build-and-push-tutorial-agent.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,30 +181,43 @@ jobs:
181181
AGENT_NAME="${{ steps.image-name.outputs.agent_name }}"
182182
REPOSITORY_NAME="${{ github.repository }}/tutorial-agents/${AGENT_NAME}"
183183
184-
# Determine if we should push based on event type
184+
# Determine if we should publish based on event type.
185+
# Publish path: push to an immutable candidate tag (the commit SHA) first,
186+
# validate that exact pushed artifact, then promote :latest onto it. This
187+
# keeps an unvalidated image off :latest — if validation fails, :latest is
188+
# left pointing at the last known-good build, and only the SHA tag is dirty.
185189
if [ "${{ github.event_name }}" = "push" ] || [ "${{ inputs.rebuild_all }}" = "true" ]; then
186190
SHOULD_PUSH=true
187-
VERSION_TAG="latest"
188-
echo "🚀 Building agent (will push after validation): ${{ matrix.agent_path }}"
191+
PROMOTE_LATEST=true
192+
VERSION_TAG="${{ github.sha }}"
193+
echo "🚀 Building agent (push candidate ${VERSION_TAG}, promote :latest after validation): ${{ matrix.agent_path }}"
189194
else
190195
SHOULD_PUSH=false
196+
PROMOTE_LATEST=false
191197
VERSION_TAG="${{ github.sha }}"
192198
echo "🔍 Building agent for validation: ${{ matrix.agent_path }}"
193-
# Set full image name for validation step (local build)
194-
echo "FULL_IMAGE=${REGISTRY}/${REPOSITORY_NAME}:${VERSION_TAG}" >> $GITHUB_ENV
195199
# Skip image validation for PRs since Buildx doesn't load multi-platform images locally
196200
echo "SKIP_VALIDATION=true" >> $GITHUB_ENV
197201
fi
198202
199-
# Always build locally first (without push)
203+
# Build the image. On the publish path, push straight from buildx to the
204+
# candidate tag: a multi-platform build cannot be loaded into the local
205+
# Docker store, so it must be pushed by the build itself rather than by a
206+
# later `docker push` (which would have no fresh local image and would
207+
# re-push a stale tag instead).
200208
BUILD_ARGS="--manifest ${{ matrix.agent_path }}/manifest.yaml --registry ${REGISTRY} --tag ${VERSION_TAG} --platforms linux/amd64,linux/arm64 --repository-name ${REPOSITORY_NAME}"
209+
if [ "$SHOULD_PUSH" = "true" ]; then
210+
BUILD_ARGS="$BUILD_ARGS --push"
211+
fi
201212
202213
agentex agents build $BUILD_ARGS
203214
echo "✅ Successfully built: ${REGISTRY}/${REPOSITORY_NAME}:${VERSION_TAG}"
204215
205216
# Set environment variables for subsequent steps
206217
echo "FULL_IMAGE=${REGISTRY}/${REPOSITORY_NAME}:${VERSION_TAG}" >> $GITHUB_ENV
218+
echo "LATEST_IMAGE=${REGISTRY}/${REPOSITORY_NAME}:latest" >> $GITHUB_ENV
207219
echo "SHOULD_PUSH=${SHOULD_PUSH}" >> $GITHUB_ENV
220+
echo "PROMOTE_LATEST=${PROMOTE_LATEST}" >> $GITHUB_ENV
208221
209222
- name: Validate agent image
210223
if: env.SKIP_VALIDATION != 'true'
@@ -279,13 +292,15 @@ jobs:
279292
280293
echo "✅ All validations passed for: $FULL_IMAGE"
281294
282-
- name: Push Agent Image
283-
if: env.SHOULD_PUSH == 'true'
295+
- name: Promote validated image to :latest
296+
if: env.PROMOTE_LATEST == 'true'
284297
run: |
285-
FULL_IMAGE="${{ env.FULL_IMAGE }}"
286-
echo "🚀 Pushing validated image: $FULL_IMAGE"
287-
docker push "$FULL_IMAGE"
288-
echo "✅ Successfully pushed: $FULL_IMAGE"
298+
echo "🏷️ Promoting validated ${{ env.FULL_IMAGE }} -> ${{ env.LATEST_IMAGE }}"
299+
# Registry-side manifest copy: no rebuild, preserves the multi-arch
300+
# manifest list, and only runs after validation passed — so :latest never
301+
# points at an unvalidated image.
302+
docker buildx imagetools create --tag "${{ env.LATEST_IMAGE }}" "${{ env.FULL_IMAGE }}"
303+
echo "✅ Promoted to ${{ env.LATEST_IMAGE }}"
289304
290305
deprecate-agents:
291306
name: "Deprecate Removed Agents"

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
".": "0.22.0",
3-
"adk": "0.22.0"
2+
".": "0.22.1",
3+
"adk": "0.22.1"
44
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212

1313
* **tracing:** emit OTel metrics for async span queue depth, batch drain, and SGP export success/failure (HTTP status labels). Disable SDK-side recording with ``AGENTEX_TRACING_METRICS=0``.
1414

15+
## 0.22.1 (2026-07-29)
16+
17+
Full Changelog: [agentex-client-v0.22.0...agentex-client-v0.22.1](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.22.0...agentex-client-v0.22.1)
18+
19+
### Bug Fixes
20+
21+
* **ci:** push tutorial images from buildx instead of re-pushing a stale local tag ([#478](https://github.com/scaleapi/scale-agentex-python/issues/478)) ([a7c8f5a](https://github.com/scaleapi/scale-agentex-python/commit/a7c8f5af8e0acf6ba2eab82f3e9c700c40ec4265))
22+
1523
## 0.22.0 (2026-07-29)
1624

1725
Full Changelog: [agentex-client-v0.21.0...agentex-client-v0.22.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.21.0...agentex-client-v0.22.0)

adk/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.22.1 (2026-07-29)
4+
5+
Full Changelog: [agentex-sdk-v0.22.0...agentex-sdk-v0.22.1](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.22.0...agentex-sdk-v0.22.1)
6+
7+
### Chores
8+
9+
* **agentex-sdk:** Synchronize agentex versions
10+
311
## 0.22.0 (2026-07-29)
412

513
Full Changelog: [agentex-sdk-v0.21.0...agentex-sdk-v0.22.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.21.0...agentex-sdk-v0.22.0)

adk/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# (agentex/{__init__.py, _*.py, types/, resources/}) ships from the slim
55
# sibling package `agentex-client` which is pinned as a runtime dep.
66
name = "agentex-sdk"
7-
version = "0.22.0"
7+
version = "0.22.1"
88
description = "Agent Development Kit (ADK) overlay for the Agentex API — FastACP server, Temporal workflows, LLM provider integrations, observability"
99
license = "Apache-2.0"
1010
authors = [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# overlay (formerly `src/agentex/lib/*`) now lives in `adk/` and ships
44
# as the sibling `agentex-sdk` package — see `adk/pyproject.toml`.
55
name = "agentex-client"
6-
version = "0.22.0"
6+
version = "0.22.1"
77
description = "The official Python REST client for the Agentex API"
88
dynamic = ["readme"]
99
license = "Apache-2.0"

src/agentex/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "agentex"
4-
__version__ = "0.22.0" # x-release-please-version
4+
__version__ = "0.22.1" # x-release-please-version

src/agentex/lib/cli/commands/agents.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,9 @@ def build(
128128
help="Docker build argument in the format 'KEY=VALUE' (can be used multiple times)",
129129
),
130130
cache: bool = typer.Option(
131-
False,
131+
True,
132132
"--cache/--no-cache",
133-
help="Whether to use the build cache. Defaults to off so a stale cached layer "
134-
"can't silently ship source that no longer matches the checkout (notably when "
135-
"republishing a moving tag like ':latest'). Pass --cache to opt back in.",
133+
help="Whether to use the build cache (default on). Pass --no-cache for a clean rebuild.",
136134
),
137135
):
138136
"""

src/agentex/lib/cli/handlers/agent_handlers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def build_agent(
3939
secret: str | None = None,
4040
tag: str | None = None,
4141
build_args: list[str] | None = None,
42-
cache: bool = False,
42+
cache: bool = True,
4343
) -> str:
4444
"""Build the agent locally and optionally push to registry
4545
@@ -50,10 +50,8 @@ def build_agent(
5050
secret: Docker build secret in format 'id=secret-id,src=path-to-secret-file'
5151
tag: Image tag to use (defaults to 'latest')
5252
build_args: List of Docker build arguments in format 'KEY=VALUE'
53-
cache: Whether to use the build cache. Defaults to False (passes --no-cache to
54-
buildx) so a stale cached layer can't silently ship source that no longer
55-
matches the checkout, notably when republishing a moving tag like ':latest'.
56-
Pass True to opt back in for faster local rebuilds.
53+
cache: Whether to use the build cache. Defaults to True. Set to False to pass
54+
--no-cache to buildx for a clean rebuild.
5755
5856
Returns:
5957
The image URL

0 commit comments

Comments
 (0)