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

feat: disable bubbletea #2321

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: disable bubbletea #2321

wants to merge 5 commits into from

Conversation

jokestax
Copy link
Contributor

Description

add ci flag so to test the provisioning of cluster in argo workflows

How to test

provision any cluster using cli and add additional flag "--ci"

Copy link
Member

@patrickdappollonio patrickdappollonio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding to the comments I left, it seems possible to disable app-wide bubbletea from being "interactive" by setting the WithoutRenderer() flag. That imho is better than sprinkling in 300 places the if canRunBubbleTea statement:

https://github.com/charmbracelet/bubbletea/blob/1feb60b44b74d9a3a7dc54b90ffbecc8ffd6b40d/options.go#L169-L181

}
}()

<-done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this is a bit of a nasty cheat that more than one might have a hard time using in the future 😆

You're waiting here because nobody has sent data to it. But you also have the read inside the goroutine inside the case statement! Which one wins when done <- true happens inside the ticker.C?

The short answer is the asynchronous one, at the top level that simply returns. The second one, the one inside the for select will need an extra CPU cycle to leave the statement of the ticker.C then go back to the parent one, to finally read the "return" you have there, but at that point, the function is long gone.

May I propose you to use an errgroup or the tool we've been using so far for waiting for events from happening instead of generating yet another function "that waits for a condition"?

The other part this doesn't cover is that there is no timeout. This function will run forever if none of the conditions break the loop.

@@ -24,8 +24,8 @@ import (

func main() {
argsWithProg := os.Args

bubbleTeaBlacklist := []string{"completion", "help", "--help", "-h", "quota", "logs"}
fmt.Println(argsWithProg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a debugging statement, might want to remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants