From c1f3dcfe1e542138789b05c3c580b4c07929d5f6 Mon Sep 17 00:00:00 2001 From: Philip Gao Date: Thu, 21 Mar 2024 17:11:38 +0800 Subject: [PATCH] [Fundamental] Fix Matrix using tracing (#2430) # Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes. --- .cspell.json | 5 ++++- .../step_create_python_environment/action.yml | 1 + .../promptflow-release-testing-matrix.yml | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index b6f9e082077..e9f5b8f1bd3 100644 --- a/.cspell.json +++ b/.cspell.json @@ -34,7 +34,10 @@ "**/setup.py", "scripts/installer/curl_install_pypi/**", "scripts/installer/windows/**", - "src/promptflow/promptflow/_sdk/_service/pfsvc.py" + "src/promptflow/promptflow/_sdk/_service/pfsvc.py", + ".github/workflows/**", + ".github/actions/**", + ".github/pipelines/**" ], "words": [ "aoai", diff --git a/.github/actions/step_create_python_environment/action.yml b/.github/actions/step_create_python_environment/action.yml index d5ec17972af..cd7069c7d25 100644 --- a/.github/actions/step_create_python_environment/action.yml +++ b/.github/actions/step_create_python_environment/action.yml @@ -15,6 +15,7 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.pythonVersion }} + - uses: snok/install-poetry@v1 - run: | python -m pip install --upgrade pip pip install -r ${{ inputs.pipFilePath }} diff --git a/.github/workflows/promptflow-release-testing-matrix.yml b/.github/workflows/promptflow-release-testing-matrix.yml index cc76ecfa63e..dfbdbaf60a3 100644 --- a/.github/workflows/promptflow-release-testing-matrix.yml +++ b/.github/workflows/promptflow-release-testing-matrix.yml @@ -16,6 +16,7 @@ env: testWorkingDirectory: src/promptflow PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" + TRACING_PATH: ${{ github.workspace }}/src/promptflow-tracing jobs: id: runs-on: ubuntu-latest @@ -44,6 +45,7 @@ jobs: path: | ${{ github.workspace }}/src/promptflow/dist/*.whl ${{ github.workspace }}/src/promptflow-tools/dist/*.whl + promptflow_sdk_cli_tests: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'pull_request' }} needs: build @@ -95,6 +97,11 @@ jobs: gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: Install tracing + shell: pwsh + working-directory: ${{ env.TRACING_PATH }} + run: | + poetry install --only main - name: Run SDK CLI Test shell: pwsh working-directory: ${{ env.testWorkingDirectory }} @@ -173,6 +180,11 @@ jobs: gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} pip freeze + - name: Install tracing + shell: pwsh + working-directory: ${{ env.TRACING_PATH }} + run: | + poetry install --only main - name: Run SDK CLI Azure Test shell: pwsh working-directory: ${{ env.testWorkingDirectory }} @@ -230,6 +242,11 @@ jobs: gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure,executor-service]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: Install tracing + shell: pwsh + working-directory: ${{ env.TRACING_PATH }} + run: | + poetry install --only main - name: Run Executor Test shell: pwsh working-directory: ${{ github.workspace }}