mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 03:29:03 +00:00
Identify when Airflow DAG import errors in CI (#23589)
This commit is contained in:
parent
94104e0806
commit
f528616b2f
@ -10,6 +10,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
RED='\033[0;31m'
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
|
||||
|
||||
helpFunction()
|
||||
@ -116,6 +118,13 @@ until curl -s -f "http://localhost:9200/_cat/indices/openmetadata_team_search_in
|
||||
done
|
||||
|
||||
until curl -s -f --header 'Authorization: Basic YWRtaW46YWRtaW4=' "http://localhost:8080/api/v1/dags/sample_data"; do
|
||||
IMPORT_ERRORS="$(curl -s --header 'Authorization: Basic YWRtaW46YWRtaW4=' "http://localhost:8080/api/v1/importErrors")"
|
||||
echo $IMPORT_ERRORS | grep "/airflow_sample_data.py" > /dev/null;
|
||||
if [[ "$?" == "0" ]]; then
|
||||
echo -e "${RED}Airflow found an error importing \`sample_data\` DAG"
|
||||
printf '%s' "$IMPORT_ERRORS" | jq '.["import_errors"] | .[] | select(.filename | endswith("airflow_sample_data.py"))'
|
||||
exit 1
|
||||
fi
|
||||
echo 'Checking if Sample Data DAG is reachable...\n'
|
||||
sleep 5
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user