We have a number of "in_container" scripts written in Bash, They are doing a number of houseekeeping stuff but since we already have Python 3.7+ inside the CI image, we could modularise them more and make them run from external and simplify entrypoint_ci (for example separate script for tests).
sys.exit(1)
        if airflow_package_spec:
            airflow_version = get_airflow_version_from_package(airflow_package_spec)
            if airflow_version:
                airflow_constraints_location = get_airflow_constraints_location(
                    airflow_skip_constraints=airflow_skip_constraints,
                    airflow_constraints_mode=airflow_constraints_mode,
                    airflow_constraints_location=airflow_constraints_location,
                    airflow_constraints_reference=airflow_constraints_reference,
                    airflow_package_version=airflow_version,
                    default_constraints_branch=default_constraints_branch,
                    github_repository=github_repository,
                    python_version=python_version,
                )
            if airflow_extras:
                airflow_package_spec += airflow_extras
    elif use_airflow_version == "none" or use_airflow_version == "":
        console.print("\n[bright_blue]Skipping airflow package installation\n")
        airflow_package_spec = None
        airflow_constraints_location = None
    elif use_airflow_version.startswith(ALLOWED_VCS_PROTOCOLS):
        console.print(f"\nInstalling airflow from remote spec {use_airflow_version}\n")
        if airflow_extras:
            airflow_package_spec = f"apache-airflow{airflow_extras} @ {use_airflow_version}"
        else:
            airflow_package_spec = use_airflow_version
        airflow_constraints_location = get_airflow_constraints_location(
            airflow_skip_constraints=airflow_skip_constraints,
            airflow_constraints_mode=airflow_constraints_mode,
            airflow_constraints_location=airflow_constraints_location,