potiuk commented on a change in pull request #8265:
URL: https://github.com/apache/airflow/pull/8265#discussion_r434407177
##########
File path: scripts/ci/_utils.sh
##########
@@ -1721,3 +1748,436 @@ function run_prepare_backport_readme() {
function get_airflow_version_from_production_image() {
docker run --entrypoint /bin/bash "${AIRFLOW_PROD_IMAGE}" -c 'echo
"${AIRFLOW_VERSION}"'
}
+
+function dump_kind_logs() {
+ echo
"###########################################################################################"
+ echo " Dumping logs from KIND"
+ echo
"###########################################################################################"
+
+ FILE_NAME="${1}"
+ kind --name "${KIND_CLUSTER_NAME}" export logs "${FILE_NAME}"
+}
+
+
+function send_kubernetes_logs_to_file_io() {
+ echo
"##############################################################################"
+ echo
+ echo " DUMPING LOG FILES FROM KIND AND SENDING THEM TO file.io"
+ echo
+ echo
"##############################################################################"
+ DUMP_DIR_NAME=$(date
"+%Y-%m-%d")_kind_${CI_BUILD_ID:="default"}_${CI_JOB_ID:="default"}
+ DUMP_DIR=/tmp/${DUMP_DIR_NAME}
+ dump_kind_logs "${DUMP_DIR}"
+ tar -cvzf "${DUMP_DIR}.tar.gz" -C /tmp "${DUMP_DIR_NAME}"
+ echo
+ echo " Logs saved to ${DUMP_DIR}.tar.gz"
+ echo
+ echo
"##############################################################################"
+ curl -F "file=@${DUMP_DIR}.tar.gz" https://file.io
+}
+
+function check_kind_and_kubectl_are_installed() {
+ SYSTEM=$(uname -s| tr '[:upper:]' '[:lower:]')
+ KIND_VERSION="v0.7.0"
+
KIND_URL="https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-${SYSTEM}-amd64"
+ KIND_PATH="${BUILD_CACHE_DIR}/bin/kind"
+ KUBECTL_VERSION="v1.15.3"
Review comment:
We want to have it works consistently. Those aer only used for tests. If
you do not pin them, there is a risk it will start failing randomly if some
inconsistencies are introduced. I am happy to bump it up and on our way to
support higher kubernetes versions with Helm chart we should definitely move
them up. For now I want to get it just working in a stable and repeatable way
and then we will take it from there.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]