Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix text wrap issue with runtime spinner #1779

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions airflow/runtimes/container_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ const (
containerRuntimeNotFoundErrMsg = "Failed to find a container runtime. " +
"See the Astro CLI prerequisites for more information. " +
"https://www.astronomer.io/docs/astro/cli/install-cli"
containerRuntimeInitMessage = " Astro uses container technology to run your Airflow project. " +
"Please wait while we get things started…"
spinnerRefresh = 100 * time.Millisecond
containerRuntimeInitMessage = " Astro uses containers to run your project. Hang tight while we get started…"
spinnerRefresh = 100 * time.Millisecond
)

// ContainerRuntime interface defines the methods that manage
Expand Down
8 changes: 3 additions & 5 deletions airflow/runtimes/podman_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import (
)

const (
podmanStatusRunning = "running"
podmanStatusStopped = "stopped"
composeProjectLabel = "com.docker.compose.project"
podmanInitSlowMessage = " Sorry for the wait, this is taking a bit longer than expected. " +
"This initial download will be cached once finished."
podmanStatusRunning = "running"
podmanStatusStopped = "stopped"
composeProjectLabel = "com.docker.compose.project"
podmanMachineAlreadyRunningErrMsg = "astro needs a podman machine to run your project, " +
"but it looks like a machine is already running. " +
"Mac hosts are limited to one running machine at a time. " +
Expand Down
10 changes: 1 addition & 9 deletions airflow/runtimes/podman_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ package runtimes
import (
"errors"
"fmt"
"github.com/astronomer/astro-cli/airflow/runtimes/types"
"os"
"strings"
"time"

"github.com/astronomer/astro-cli/airflow/runtimes/types"

"github.com/briandowns/spinner"
)
Expand Down Expand Up @@ -122,12 +120,6 @@ func (rt PodmanRuntime) ensureMachine() error {
s.Suffix = containerRuntimeInitMessage
defer s.Stop()

// Update the message after a bit if it's still running.
go func() {
<-time.After(1 * time.Minute)
s.Suffix = podmanInitSlowMessage
}()

// Check if another, non-astro Podman machine is running
nonAstroMachineName := rt.isAnotherMachineRunning()
// If there is another machine running, and it has no running containers, stop it.
Expand Down