<commit_before>#!/bin/bash
: "${taito_util_path:?}"
: "${taito_plugin_path:?}"
: "${taito_command:?}"

# Automatic authentication on 'env apply'
if [[ $taito_command == "env-apply" ]] && [[ "${taito_mode:-}" != "ci" ]]; then
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"
  echo "Authenticating"
  "${taito_plugin_path}/util/auth.sh"
fi && \

# Kubernetes credentials for ci
if [[ "${taito_mode:-}" == "ci" ]] && \
   [[ ${taito_commands_only_chain:-} == *"kubectl/"* ]]; then
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"
  echo "Getting GCP credentials for Kubernetes access"
  "${taito_plugin_path}/util/get-credentials-kube.sh"
fi && \

# Database proxy
if [[ ${taito_provider:-} == "gcp" ]] && \
   [[ ${gcp_db_proxy_enabled:-} != "false" ]] && \
   [[ ${taito_requires_database_connection:-} == "true" ]]; then
  proxy_running=$(pgrep "cloud_sql_proxy")
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"<commit_msg>fix: always retrieve missing kubernetes creds<commit_after>#!/bin/bash
: "${taito_util_path:?}"
: "${taito_plugin_path:?}"
: "${taito_command:?}"

# Automatic authentication on 'env apply'
if [[ $taito_command == "env-apply" ]] && [[ "${taito_mode:-}" != "ci" ]]; then
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"
  echo "Authenticating"
  "${taito_plugin_path}/util/auth.sh"
fi && \

# Kubernetes credentials for ci
if [[ "${taito_mode:-}" == "ci" ]] && \
   [[ ${kubernetes_name:-} ]] && \
   [[ ! -d "${HOME}/.kube" ]] && \
   [[ ! -d "/root/.kube" ]]; then
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"
  echo "Getting GCP credentials for Kubernetes access"
  "${taito_plugin_path}/util/get-credentials-kube.sh"
fi && \

# Database proxy
if [[ ${taito_provider:-} == "gcp" ]] && \
   [[ ${gcp_db_proxy_enabled:-} != "false" ]] && \
   [[ ${taito_requires_database_connection:-} == "true" ]]; then
  proxy_running=$(pgrep "cloud_sql_proxy")
  echo
  echo -e "${taito_command_context_prefix:-}${H1s}gcp${H1e}"
{'fraction_non_alphanumeric': 0.22865554465161925, 'fraction_numerical': 0.005888125613346418, 'mean_word_length': 4.727528089887641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6240606', 'n_tokens_mistral': 831, 'n_tokens_neox': 792, 'n_words': 131}