You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/24 23:44:32 UTC

[GitHub] [airflow] mik-laj opened a new pull request, #27243: Fix system tests for SnowflakeOperator

mik-laj opened a new pull request, #27243:
URL: https://github.com/apache/airflow/pull/27243

   I ran the system tests again, but this time on GitHub Action, and I noticed that there is still one bug - the `split_statements = True` option was missing.
   
   
   I have now used the YAML file below:
   ```
   name: CI
   
   on:
     push:
       branches: [ "main" ]
     pull_request:
       branches: [ "main" ]
     schedule:
       - cron: '30 1 * * 1'
     workflow_dispatch:
       inputs:
         repository:
           required: true
           type: string
           default: 'apache/airflow'
         ref:
           required: true
           type: string
           default: 'main'
   
   env:
     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     ANSWER: "yes"
     VERBOSE: "true"
   
   jobs:
     tests:
       runs-on: ubuntu-latest
   
       steps:
         - uses: actions/checkout@v3
           with: 
              repository: ${{ inputs.repository || 'apache/airflow' }}
              ref: ${{ inputs.ref || 'main' }}
         - run: ./scripts/ci/install_breeze.sh
         - run: breeze ci-image build --python 3.8 --github-repository apache/airflow
         - name: Set up credentials
           env:
              SNOWFLAKE_CONN: ${{ secrets.SNOWFLAKE_CONN }}
           run: |
             mkdir -p files/airflow-breeze-config;
             (
               echo "export AIRFLOW_CONN_MY_SNOWFLAKE_CONN=${SNOWFLAKE_CONN@Q}"
               echo "export SYSTEM_TESTS_ENV_ID=snowflake-${RANDOM@Q}"
             ) >> files/airflow-breeze-config/variables.env;
         - run: |
             # Temporary disabled tests
             rm tests/system/providers/snowflake/example_snowflake_to_slack.py
             rm tests/system/providers/snowflake/example_s3_to_snowflake.py
         - run: breeze testing tests --test-type 'Providers[snowflake]'
         - run: breeze testing tests -- tests/system/providers/snowflake/example_snowflake.py --system snowflake
         - name: "Upload airflow logs"
           uses: actions/upload-artifact@v3
           if: failure()
           with:
             name: airflow-logs
             path: "./files/airflow_logs*"
             retention-days: 7
         - name: "Upload container logs"
           uses: actions/upload-artifact@v3
           if: failure()
           with:
             name: containers-logs
             path: "./files/container_logs*"
             retention-days: 7
   
   ```
   and I used the command below to confirm everything is working.
   ```
   gh workflow run ci.yml -f repository=mik-laj/airflow -f ref=fix-snowflake-system-tests-2
   ```
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] mik-laj merged pull request #27243: Fix system tests for SnowflakeOperator

Posted by GitBox <gi...@apache.org>.
mik-laj merged PR #27243:
URL: https://github.com/apache/airflow/pull/27243


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org