Skip to content

Run the common.ai agent framework adapter tests in CI - #73912

Merged
kaxil merged 4 commits into
apache:mainfrom
astronomer:ci-agent-framework-tests
Sep 30, 2026
Merged

kaxil merged 4 commits into
apache:mainfrom
astronomer:ci-agent-framework-tests

Conversation

@kaxil

@kaxil kaxil commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Strands Agents caps mcp below 2.2, and Google ADK caps opentelemetry at 1.42 and websockets below 16, while uv.lock resolves mcp 2.2.0, opentelemetry 1.44 and websockets 16.1. Neither framework can be installed in the workspace. The common.ai adapter tests for them (tools/test_strands.py, tools/test_adk.py) skip themselves when their framework is missing, so no CI job has ever run them.

This adds a small job, one matrix entry per framework, that installs that framework into the CI image and runs providers/common/ai/tests/unit/common/ai/tools (the other framework's tests skip themselves). Frameworks are isolated so a breaking release of one does not hide the other's result, and the entries run in parallel. The job runs on amd64 only for now. Each entry runs in one of two modes:

  • Outside a canary run, every package already in the image goes to uv pip install --override at its installed version. The frameworks' caps are overridden and the adapters are tested against the same dependencies as the rest of Airflow. The script then checks that no package the image ships changed.
  • On a canary run, --framework-pins lets the frameworks' own requirements win, which is the environment a user who installs them gets. This is what catches a framework release that breaks an adapter.

The job runs on main only: when common.ai or common.sql code, the common.ai dependencies or uv.lock change, or when the run tests everything. It is not a dependency of finalize-tests, so a bad upstream release does not stop the image cache push. notify-slack waits for it, so a canary failure still reaches Slack.

Run locally with the same breeze shell --backend none --skip-db-tests command the workflow uses, each framework passes in both modes (Strands: 53 tests with the ADK module skipped; ADK: 49 with the Strands module skipped), including the adapter tests CI skips today. In the default mode, installing a framework left every package in the image at its version; with the frameworks' pins, Strands resolves mcp to 2.1.1 and ADK resolves opentelemetry to 1.42.1 and websockets to 15.0.1.

Design rationale

Why a script and not a breeze flag like --upgrade-boto. The boto upgrade is wired through the workflow inputs, the breeze options, shell params, both test commands and entrypoint_ci.sh, because it reruns whole test suites. This job runs one directory of one provider, so a script under scripts/in_container and a reusable workflow keep it to the files it needs. It could move behind a breeze testing providers-tests flag instead, which would also give it the junit and warnings uploads; I kept it small for a first cut.

Why not add Strands to the lock with override-dependencies. The root pyproject.toml already does that for openai, and the comment above constraint-dependencies records the cost: an override replaces every package's requirement, so the resolver stopped rejecting azure-ai-projects when it moved to openai>=3. Overriding mcp for the whole workspace to test one adapter would trade a skipped test for a hidden conflict. Holding versions only inside this job keeps the lock honest.


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Strands Agents caps mcp below the version uv.lock resolves, so it cannot
be installed in the workspace and the common.ai adapter tests for it were
skipped in every CI job.

A new job installs the framework into the CI image and runs the tests of
the framework-neutral tools and their adapters. Outside a canary run every
package already in the image is held at its version with uv's --override,
so the adapters are tested against the same dependencies as the rest of
Airflow. On a canary run the framework's own pins win, which is what a user
installing it gets. The job runs on main when common.ai or common.sql code,
the common.ai dependencies or uv.lock change. It is not a dependency of
finalize-tests, so a breaking framework release does not stop the image
cache push, and notify-slack waits for it so a canary failure is reported.
ADK caps opentelemetry and websockets below the locked versions, the same way
Strands caps mcp, so its adapter tests were skipped everywhere too. Both modes
of the job install it now and check that it imports.
Each matrix entry installs a single framework, so a breaking release of one
cannot hide the other's result, and the entries run in parallel. The job is
gated to amd64 inside the reusable workflow, since ci-amd.yml and ci-arm.yml
must stay in sync.
Comment thread dev/breeze/doc/ci/05_workflows.md Resolved
Drop the one-element framework array, fail with a message when the installed
framework is missing from the freeze output instead of dying silently under
pipefail, and document run-agent-framework-tests in the selective checks table.
@kaxil
kaxil merged commit 16f974f into apache:main Sep 30, 2026
159 checks passed
@kaxil
kaxil deleted the ci-agent-framework-tests branch September 30, 2026 17:52
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 16f974f v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants