From 9f15c8225f45b2d95f672e611e34a639d4529833 Mon Sep 17 00:00:00 2001 From: Matthew Tovbin Date: Wed, 29 Nov 2023 21:27:50 -0800 Subject: [PATCH] Minor fixes (#88) Co-authored-by: Chris Wu --- airbyte-local.sh | 6 ++++-- test/spec/airbyte-local_spec.sh | 7 ------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/airbyte-local.sh b/airbyte-local.sh index 501df6c..1d8e73e 100755 --- a/airbyte-local.sh +++ b/airbyte-local.sh @@ -321,7 +321,7 @@ function copyFarosConfig() { if [[ $src_docker_image == farosai/airbyte-faros-feeds-source* && $dst_docker_image == farosai/airbyte-faros-destination* ]]; then # Extract Faros API config from destination config faros_config=$(jq '{faros: {api_url: .edition_configs.api_url, api_key: .edition_configs.api_key, graph: .edition_configs.graph, graphql_api: .edition_configs.graphql_api} | with_entries(if .value==null then empty else . end)}' "$tempdir/$dst_config_filename") - debug "Updating source config with Faros API config from destination config: $(echo "$faros_config" | jq '.faros.api_key = "REDACTED"')" + debug "Updating source config with Faros API settings from destination config: $(echo "$faros_config" | jq -c '.faros.api_key = "REDACTED"')" # Merge Faros API config into source config jq --argjson faros_config "$faros_config" '$faros_config + .' "$tempdir/$src_config_filename" > "$tempdir/$src_config_filename.tmp" mv "$tempdir/$src_config_filename.tmp" "$tempdir/$src_config_filename" @@ -765,7 +765,9 @@ function specDst() { } function sync_local() { - debug "Writing source output to $output_filepath" + if [[ "$output_filepath" != "/dev/null" ]]; then + debug "Writing source output to $output_filepath" + fi new_source_state_file="$tempdir/new_state.json" readSrc | tee >(jq -cR $jq_color_opt --unbuffered 'fromjson? | select(.type != "RECORD" and .type != "STATE")' | diff --git a/test/spec/airbyte-local_spec.sh b/test/spec/airbyte-local_spec.sh index cb8c7f0..a07fcaa 100644 --- a/test/spec/airbyte-local_spec.sh +++ b/test/spec/airbyte-local_spec.sh @@ -201,13 +201,6 @@ Describe 'writing source output' --debug The output should include 'Writing source output to /tmp/out.txt' End - It 'does not write source output' - When run source ../airbyte-local.sh \ - --src 'farosai/dummy-source-image' \ - --dst 'farosai/dummy-destination-image' \ - --debug - The output should include 'Writing source output to /dev/null' - End End Describe 'building source catalog'