Skip to content

Commit

Permalink
fix rover error handling (#763)
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Prasek <[email protected]>
  • Loading branch information
prasek authored Jan 25, 2024
1 parent eace2dd commit d99e8ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ echo "======================================="
source "$(dirname $0)/subgraphs.sh"
source "$(dirname $0)/graph-api-env.sh"


# note: use --allow-invalid-routing-url to allow localhost without confirmation prompt

for subgraph in ${subgraphs[@]}; do
echo "---------------------------------------"
echo "subgraph: ${subgraph}"
echo "---------------------------------------"
url="url_$subgraph"
schema="schema_$subgraph"
(set -x; ${ROVER_BIN:-'rover'} subgraph publish ${APOLLO_GRAPH_REF} --routing-url "${!url}" --schema "${!schema}" --name ${subgraph} --convert)
(set -x; ${ROVER_BIN:-'rover'} subgraph publish ${APOLLO_GRAPH_REF} \
--routing-url "${!url}" \
--schema "${!schema}" \
--name ${subgraph} \
--allow-invalid-routing-url \
--convert)
echo ""
done
4 changes: 4 additions & 0 deletions .scripts/unpublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ if grep -Eq 'error:(.+) Graph has no implementing services' unpublish.log; then
echo "Success, all subgraphs removed!"
rm unpublish.log
exit 0
elif grep -Eq 'error:(.+) invalid input syntax for uuid: ""' unpublish.log; then
echo "Success, no subgraphs found!"
rm unpublish.log
exit 0
else
cat unpublish.log
rm unpublish.log
Expand Down

0 comments on commit d99e8ed

Please sign in to comment.