brigadecore / brigade

Event-driven scripting for Kubernetes
https://brigade.sh/
Apache License 2.0
2.41k stars 246 forks source link

cli: test connection to api server before returning to caller #1777

Closed snprajwal closed 2 years ago

snprajwal commented 2 years ago

Closes #1707

netlify[bot] commented 2 years ago

✔️ Deploy Preview for brigade-docs ready!

🔨 Explore the source changes: 513bbff28229a6fc0168f3f763a9704cc7891cd1

🔍 Inspect the deploy log: https://app.netlify.com/sites/brigade-docs/deploys/61ddaca3ec124400087983d8

😎 Browse the preview: https://deploy-preview-1777--brigade-docs.netlify.app

krancour commented 2 years ago

@snprajwal thanks for the contribution! This looks great.

The only change I would ask for is that the getClient() function's signature be modified to take an arg like testConnection bool.

Most calls to getClient() should pass false because testing the connection every time will slow things down quite a bit, but it would be nice to have the option to test the client in advance for cases like what you were running into -- brig term, specifically.

krancour commented 2 years ago

/brig run

krancour commented 2 years ago

@snprajwal this is great! Thank you so much!