kaxil opened a new pull request, #73912:
URL: https://github.com/apache/airflow/pull/73912

   Strands Agents caps `mcp` below 2.2, and `uv.lock` resolves `mcp` 2.2.0, so 
Strands cannot be installed in the workspace. The common.ai adapter tests for 
it (`tools/test_strands.py`) skip themselves when Strands is missing, so no CI 
job has ever run them.
   
   This adds a small job that installs Strands into the CI image and runs 
`providers/common/ai/tests/unit/common/ai/tools`, 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. Strands' caps are overridden 
and the adapter is 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 Strands' own requirements win 
(`mcp` resolves to 2.1.1), which is the environment a user who installs Strands 
gets. This is what catches a Strands release that breaks the 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, both modes pass all 21 tests in that directory, 
including the 7 Strands tests CI skips today. In the default mode, installing 
Strands left every package in the image at its version.
   
   ## 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.
   
   Google ADK has the same problem with OpenTelemetry and `websockets`. Its 
adapter is in review in #73898, and adding `google-adk` to the script's 
framework list is all it needs once that lands.
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#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](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: 
`{pr_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
 You can add this file in a follow-up commit after the PR is created so you 
know the PR number.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to