diff --git a/cloudbuild_CI.yaml b/cloudbuild_CI.yaml index 5ec4559f8..81f2cbb10 100644 --- a/cloudbuild_CI.yaml +++ b/cloudbuild_CI.yaml @@ -42,9 +42,7 @@ steps: - '--project ${PROJECT_ID}' - '--image_tag ${COMMIT_SHA}' - '--run_unit_tests' - - '--run_preprocessor_tests' - - '--run_bq_to_vcf_tests' - - '--run_all_tests' + - '--run_presubmit_tests' - '--test_name_prefix cloud-ci-' id: 'test-gcp-variant-transforms-docker' entrypoint: '/opt/gcp_variant_transforms/src/deploy_and_run_tests.sh' diff --git a/gcp_variant_transforms/libs/bigquery_util.py b/gcp_variant_transforms/libs/bigquery_util.py index 1431fd57d..2905a9e03 100644 --- a/gcp_variant_transforms/libs/bigquery_util.py +++ b/gcp_variant_transforms/libs/bigquery_util.py @@ -676,7 +676,7 @@ def get_flatten_table_schema(self, schema_file_path): bq_command) else: logging.info('Successfully extracted the schema of flatten table.') - if _delete_table(full_table_id) == 0: + if delete_table(full_table_id) == 0: logging.info('Successfully deleted temporary table: %s', full_table_id) else: logging.error('Was not able to delete temporary table: %s', full_table_id) diff --git a/gcp_variant_transforms/vcf_to_bq.py b/gcp_variant_transforms/vcf_to_bq.py index e2d5305c4..970b2ac4a 100644 --- a/gcp_variant_transforms/vcf_to_bq.py +++ b/gcp_variant_transforms/vcf_to_bq.py @@ -536,7 +536,7 @@ def run(argv=None): load_avro = bigquery_util.LoadAvro(avro_root_path, known_args.output_table, suffixes, not known_args.append) - _ = load_avro.start_loading() + not_empty_variant_suffixes = load_avro.start_loading() except Exception as e: logging.error('Something unexpected happened during the loading of AVRO ' 'files to BigQuery: %s', str(e)) @@ -561,14 +561,14 @@ def run(argv=None): if known_args.sample_lookup_optimized_output_table: flatten_call_column = bigquery_util.FlattenCallColumn( - known_args.output_table, suffixes) + known_args.output_table, not_empty_variant_suffixes) try: flatten_schema_file = tempfile.mkstemp(suffix=_BQ_SCHEMA_FILE_SUFFIX)[1] if not flatten_call_column.get_flatten_table_schema(flatten_schema_file): raise ValueError('Failed to extract schema of flatten table') # Create output flatten tables if needed if not known_args.append: - for suffix in suffixes: + for suffix in not_empty_variant_suffixes: output_table_id = bigquery_util.compose_table_name( known_args.sample_lookup_optimized_output_table, suffix) bigquery_util.create_output_table(output_table_id,