mik-laj commented on a change in pull request #8556:
URL: https://github.com/apache/airflow/pull/8556#discussion_r415114170
##########
File path:
airflow/providers/google/cloud/example_dags/example_gcs_to_bigquery.py
##########
@@ -53,7 +53,7 @@
delete_test_dataset = BashOperator(
task_id='delete_airflow_test_dataset',
- bash_command='bq rm -rf airflow_test',
+ bash_command='bq rm -r -f airflow_test',
Review comment:
We generate environment variables for each test run.
To set environment variables we have a script that is similar to the
following.
```bash
if [[ ! -f "${RANDOM_FILE}" ]]; then
echo "${RANDOM}" > "${RANDOM_FILE}"
fi
RANDOM_POSTFIX=$(cat "${RANDOM_FILE}")
AIRFLOW_BREEZE_SHORT_SHA="${AIRFLOW_BREEZE_SHORT_SHA:="build"}"
AIRFLOW_BREEZE_TEST_SUITE="${AIRFLOW_BREEZE_TEST_SUITE:="test"}"
AIRFLOW_BREEZE_UNIQUE_SUFFIX=${AIRFLOW_BREEZE_TEST_SUITE}-${AIRFLOW_BREEZE_SHORT_SHA}-${RANDOM_POSTFIX}
GCP_FIRESTORE_DATASET_NAME=test_firestore_to_bigquery_${RANDOM_POSTFIX}
```
This script generates unique resource names for each CI launch. This script
generates unique resource names for each CI launch.
During development, to make sure everything works, I often run tests using
the following command.
```
GCP_GCS_BUCKET=airflow-life-science-$RANDOM pytest
tests/providers/google/cloud/operators/test_life_sciences_system.py --system
google -s
````
That way I can be sure that everything works and I don't have side effects
from another run.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]