From 6ec6411e83221c49b67991d61749038e9e1314f5 Mon Sep 17 00:00:00 2001 From: Neel Dalsania Date: Wed, 30 Aug 2023 20:05:55 +0530 Subject: [PATCH] Fix .astro folder not present in few images causing failure for parse command (#1375) * Fix .astro folder not present in few images causing failure for parse command * Fix typo in comments --- airflow/docker_image.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/airflow/docker_image.go b/airflow/docker_image.go index 5d64b7571..d4e558569 100644 --- a/airflow/docker_image.go +++ b/airflow/docker_image.go @@ -135,6 +135,19 @@ func (d *DockerImage) Pytest(pytestFile, airflowHome, envFile, testHomeDirectory if docErr != nil { return "", docErr } + // cp .astro folder + // on some machine .astro is being docker ignored, but not + // on every machine, hence to keep behavior consistent + // copying the .astro folder explicitly + args = []string{ + "cp", + airflowHome + "/.astro", + "astro-pytest:/usr/local/airflow/", + } + docErr = cmdExec(dockerCommand, stdout, stderr, args...) + if docErr != nil { + return "", docErr + } // start pytest container docErr = cmdExec(dockerCommand, stdout, stderr, []string{"start", "astro-pytest", "-a"}...) if docErr != nil {