Comments (4)
it's not that you shouldn't print anything when not a TTY, just that things like confirmation and things like "do this next" do not make sense in the context of a script
Got it, yeah I was thinking about reporting back to user like universal-crossplane v1.2.1-up.3 is installed!
. Agree that the long ones with instructions can be saved for TTY.
from up.
Very much agree that we can improve messaging for a number of commands, both on success and failure. I am working on a design for a framework for doing this so that we are consistent across all commands. Things that I think are important to support:
- Do not print confirmation (or any otherwise extraneous text) when not in a TTY (similar to how we refuse to prompt here)
- Add global flag for silencing all output
- Add global flag for forcing machine readable output -- for instance, I think it would be awesome if every command supported
--json
, making it such that the output of any command could be easily piped to utilities likejq
for consumption
from up.
Add global flag for forcing machine readable output
Yes, I love kubectl
's -o
flag.
Do not print confirmation (or any otherwise extraneous text) when not in a TTY
Is there a particular reason to not print out of TTY? I think most tools I've used print no matter you're in TTY or not. Not printing usually exists in tools whose job is to print something, like cat
or kubectl logs
.
from up.
@muvaf it's not that you shouldn't print anything when not a TTY, just that things like confirmation and things like "do this next" do not make sense in the context of a script because:
- Errors should be checked by exit code
- If the command is in a script, there is no need to tell what to do next
Basically, if not a TTY, verbosity should be reduced. As an example, with up cloud login
we might print something like "See what control planes exist in this account with up cloud xp list
or attach you UXP cluster with `up cloud xp attach". These commands would be helpful to a user in an interactive setting, but would be noise in the context of a CI pipeline or similar. Here is some good guidance on when to print what.
from up.
Related Issues (20)
- Expose new commands in usage
- No warning when `up` isn't in the PATH
- `up cfg` has no usefulness in Spaces-based Upbound HOT 2
- Name `up ctx` exported contexts with group and ctp
- Trailing whitespace is interpreted as a path HOT 1
- `up ctx . --short` doesn't include the organization name
- Add `Save to kubeconfig and quit` at control plane scope of `up ctx`
- `up ctp list`: `cannot view control planes` when at a group scope
- `up version` doesn't fail gracefully
- `unable to parse space info from context` when exporting space
- `up ctx` fails to grab a context when no kubecontext is set HOT 1
- Update README docs for new commands
- `up ctx` panics when new context matches current context
- `ctp configuration install` not working against Cloud Space MCPs HOT 1
- `up ctx` TUI hangs in disconnected Space with empty groups
- Make connection failure to ctp more understandable
- `up login` does not respond to Ctrl-C
- aarch64 ARCH not recognized
- Support explicit session token as env var for `up org token`
- up ctx unable to connect to self-hosted managed control plane
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from up.