The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
ci(infra): trace scheduled integration tests (#37615)
Mason Daughertybdd7f71a1b42
diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.ymlindex 0fbafcf748..097d60c271 100644--- a/.github/workflows/_release.yml+++ b/.github/workflows/_release.yml@@ -116,7 +116,7 @@ jobs:build:name: π¦ Build distributionif: github.ref == 'refs/heads/master' || inputs.dangerous-nonmaster-release- environment: Scheduled testing+ environment: Releaseruns-on: ubuntu-latestpermissions:contents: read@@ -274,6 +274,7 @@ jobs:needs:- build- release-notes+ environment: Releaseruns-on: ubuntu-latestpermissions:contents: read@@ -433,6 +434,7 @@ jobs:- build- release-notes- pre-release-checks+ environment: Releaseruns-on: ubuntu-latestpermissions:# This permission is used for trusted publishing:@@ -475,6 +477,7 @@ jobs:- release-notes- test-pypi-publish- pre-release-checks+ environment: Releaseruns-on: ubuntu-latestpermissions:contents: read@@ -638,6 +641,7 @@ jobs:# - test-prior-published-packages-against-new-core# Run if all needed jobs succeeded or were skipped (test-dependents only runs for core/langchain_v1)if: ${{ !cancelled() && !failure() }}+ environment: Releaseruns-on: ubuntu-latestpermissions:# This permission is used for trusted publishing:@@ -685,6 +689,7 @@ jobs:- publish# Run if all needed jobs succeeded or were skippedif: ${{ !cancelled() && !failure() }}+ environment: Releaseruns-on: ubuntu-latestpermissions:# This permission is needed by `ncipollo/release-action` todiff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.ymlindex 6ca34bee12..00b01b79b9 100644--- a/.github/workflows/integration_tests.yml+++ b/.github/workflows/integration_tests.yml@@ -128,6 +128,8 @@ jobs:if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'name: "π Python ${{ matrix.python-version }}: ${{ matrix.working-directory }}"runs-on: ubuntu-latest+ # Scopes LangSmith tracing credentials (and any other env-scoped secrets)+ environment: "Scheduled testing"needs: [compute-matrix]timeout-minutes: 30strategy:@@ -212,6 +214,34 @@ jobs:;;esac+ - name: "π§Ύ Build LangSmith Metadata"+ # GHA expression values flow through intermediate env vars (injection+ # hardening) and jq -nc builds the JSON, so quotes/newlines in any+ # field can't corrupt the payload.+ env:+ GH_SHA: ${{ github.sha }}+ GH_RUN_ID: ${{ github.run_id }}+ GH_RUN_ATTEMPT: ${{ github.run_attempt }}+ GH_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}+ GH_WORKFLOW: ${{ github.workflow }}+ GH_EVENT: ${{ github.event_name }}+ GH_REF: ${{ github.ref }}+ WORKING_DIRECTORY: ${{ matrix.working-directory }}+ PYTHON_VERSION: ${{ matrix.python-version }}+ run: |+ metadata=$(jq -nc \+ --arg github_sha "$GH_SHA" \+ --arg github_run_id "$GH_RUN_ID" \+ --arg github_run_attempt "$GH_RUN_ATTEMPT" \+ --arg github_run_url "$GH_RUN_URL" \+ --arg github_workflow "$GH_WORKFLOW" \+ --arg github_event "$GH_EVENT" \+ --arg github_ref "$GH_REF" \+ --arg working_directory "$WORKING_DIRECTORY" \+ --arg python_version "$PYTHON_VERSION" \+ '{github_sha: $github_sha, github_run_id: $github_run_id, github_run_attempt: $github_run_attempt, github_run_url: $github_run_url, github_workflow: $github_workflow, github_event: $github_event, github_ref: $github_ref, working_directory: $working_directory, python_version: $python_version}')+ echo "LANGSMITH_METADATA=$metadata" >> "$GITHUB_ENV"+- name: "π Run Integration Tests"# WARNING: All secrets below are available to every matrix job regardless of# which package is being tested. This is intentional for simplicity, but means@@ -219,6 +249,12 @@ jobs:env:LANGCHAIN_TESTS_USER_AGENT: ${{ secrets.LANGCHAIN_TESTS_USER_AGENT }}+ # Route traces to one project with GitHub run metadata so failures link back to the originating Actions run.+ LANGSMITH_TRACING: "true"+ LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}+ LANGSMITH_PROJECT: ${{ vars.LANGSMITH_PROJECT || 'scheduled-testing-py' }}+ LANGSMITH_TAGS: "github-actions,${{ matrix.working-directory }},python-${{ matrix.python-version }},sha-${{ github.sha }}"+AI21_API_KEY: ${{ secrets.AI21_API_KEY }}ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}ANTHROPIC_FILES_API_IMAGE_ID: ${{ secrets.ANTHROPIC_FILES_API_IMAGE_ID }}