Skip to content

Commit

Permalink
Clean nightly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jayehwhyehentee committed Jan 27, 2025
1 parent 28e194c commit 25db50e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
16 changes: 0 additions & 16 deletions cloudbuild/nightly/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,6 @@ steps:
- 'CLUSTER_SMALL_TEST_FILE=${_CLUSTER_SMALL_TEST_FILE}'
- 'SINK_PARALLELISM_SMALL_BOUNDED_JOB=${_SINK_PARALLELISM_SMALL_BOUNDED_JOB}'

# 7. Start the query read e2e test.
- name: 'gcr.io/$PROJECT_ID/dataproc-flink-bigquery-connector-nightly'
id: 'e2e-bounded-query-test'
waitFor: ['e2e-bounded-table-api-all-datatypes-test']
entrypoint: 'bash'
args: ['/workspace/cloudbuild/nightly/nightly.sh', 'e2e_bounded_query_test']
env:
- 'GCS_JAR_LOCATION_FILE=${_GCS_JAR_LOCATION_FILE}'
- 'PROJECT_ID=${_PROJECT_ID}'
- 'PROJECT_NAME=${_PROJECT_NAME}'
- 'DATASET_NAME=${_WRITE_DATASET_NAME}'
- 'QUERY=${_QUERY}'
- 'PROPERTIES_SMALL_BOUNDED_JOB=${_PROPERTIES_SMALL_BOUNDED_JOB}'
- 'REGION_SMALL_TEST_FILE=${_REGION_SMALL_TEST_FILE}'
- 'CLUSTER_SMALL_TEST_FILE=${_CLUSTER_SMALL_TEST_FILE}'

# 8. Start the large table e2e test.
- name: 'gcr.io/$PROJECT_ID/dataproc-flink-bigquery-connector-nightly'
id: 'e2e-bounded-large-table-test'
Expand Down
10 changes: 2 additions & 8 deletions cloudbuild/nightly/nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ run_read_only_test(){
DATASET_NAME=$5
TABLE_NAME=$6
AGG_PROP_NAME=$7
QUERY=$8
# Deprecated: QUERY=$8
MODE=$9
PROPERTIES=${10}
# Get the final region and the cluster name.
export REGION=$(cat "$REGION_FILE")
export CLUSTER_NAME=$(cat "$CLUSTER_FILE")
export GCS_JAR_LOCATION=$(cat "$GCS_JAR_LOCATION_FILE")
# Run the simple bounded table test.
source cloudbuild/nightly/scripts/table_read.sh "$PROJECT_ID" "$CLUSTER_NAME" "$REGION" "$PROJECT_NAME" "$DATASET_NAME" "$TABLE_NAME" "$AGG_PROP_NAME" "$QUERY" "$MODE" "$PROPERTIES"
source cloudbuild/nightly/scripts/table_read.sh "$PROJECT_ID" "$CLUSTER_NAME" "$REGION" "$PROJECT_NAME" "$DATASET_NAME" "$TABLE_NAME" "$AGG_PROP_NAME" "" "$MODE" "$PROPERTIES"
}

# Function to run the test to check BQ Table Read.
Expand Down Expand Up @@ -176,12 +176,6 @@ case $STEP in
exit
;;

# Run the query bounded e2e test.
e2e_bounded_query_test)
run_read_only_test_delete_cluster "$PROJECT_ID" "$REGION_SMALL_TEST_FILE" "$CLUSTER_SMALL_TEST_FILE" "$PROJECT_NAME" "$DATASET_NAME" "" "" "$QUERY" "bounded" "$PROPERTIES_SMALL_BOUNDED_JOB"
exit
;;

# Run the large table bounded e2e test.
e2e_bounded_large_table_test)
# Run the large table test.
Expand Down
4 changes: 2 additions & 2 deletions cloudbuild/nightly/scripts/table_read.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PROJECT_NAME=$4
DATASET_NAME=$5
TABLE_NAME=$6
AGG_PROP_NAME=$7
QUERY_STRING=$8
# Deprecated: QUERY_STRING=$8
MODE=$9
PROPERTIES=${10}

Expand Down Expand Up @@ -54,7 +54,7 @@ fi

# Now check the success of the job
# Mode helps in checking for unbounded job separately.
python3 cloudbuild/nightly/scripts/python-scripts/parse_logs.py -- --job_id "$JOB_ID" --project_id "$PROJECT_ID" --cluster_name "$CLUSTER_NAME" --region "$REGION" --project_name "$PROJECT_NAME" --dataset_name "$DATASET_NAME" --table_name "$TABLE_NAME" --query "$QUERY_STRING" --mode "$MODE"
python3 cloudbuild/nightly/scripts/python-scripts/parse_logs.py -- --job_id "$JOB_ID" --project_id "$PROJECT_ID" --cluster_name "$CLUSTER_NAME" --region "$REGION" --project_name "$PROJECT_NAME" --dataset_name "$DATASET_NAME" --table_name "$TABLE_NAME" --mode "$MODE"
ret=$?
if [ $ret -ne 0 ]
then
Expand Down

0 comments on commit 25db50e

Please sign in to comment.