Skip to content

Commit

Permalink
Minor fixes (#88)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Wu <[email protected]>
  • Loading branch information
tovbinm and cjwooo authored Nov 30, 2023
1 parent 6b44e2d commit 9f15c82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 4 additions & 2 deletions airbyte-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")' |
Expand Down
7 changes: 0 additions & 7 deletions test/spec/airbyte-local_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 9f15c82

Please sign in to comment.