-
Notifications
You must be signed in to change notification settings - Fork 62
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
progress: auto-select progress based on the environment #765
Conversation
which was motivated by bootc having progress too. (And that relates to the larger overlap/duplication/desire-to-bridge between bootc progress and osbuild progress in containers/bootc#921 (comment) ) |
Thanks! Uh, that is rather embarrassing, I may indeed have just written my integration test incorrectly (had forgoten about -t) . I'm an idiot. Well, I guess it's good, it makes things easier. |
c6c9f84
to
03515f2
Compare
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! ❤️
pylint seems to be complaining in the integration tests. Can you take a look, Michael? |
This commit adds automatic progress bar selection based on checking if we run on a terminal or not. When running on a terminal we use the nice "terminalProgressBar". If that is not set we assuem we run in a script or CI/CD environment and select plainProgressBar. Thanks Colin for the hint about the bad integration test.
03515f2
to
fd3e60d
Compare
Moreover, I didn't see that the progress for Stage org.osbuild.container-deploy has one 100% percentage bar(until command finish), and only saw at the beginning, there is this one [stdout] [1 / 3] Stage org.osbuild.container-deploy [--------------->________________________________] 33.33% |
Is this in any way configurable by the user? My understanding is that this is hard-coded, whereas users may want to see the full output when manually building for learning and troubleshooting purposes. Thoughts? I will create an issue if folks think this is a valid requirement. |
Sure, go ahead. I think having an option for it makes sense. |
Yes I would be nice to have that in the build logs on GH Actions. |
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in osbuild#765 that a better README would have avoided. Hopefully this answers the questions :)
Something funky is going on there, the "plainProgressBar" should not contain "[/]" style spinners. So far the detection is based around if the running system is a terminal (and modelled after what bootc is doing in it's progress PR). We could tweak this further. In most CI/CD pipelines and automations (e.g. via cron/systemd-timers) the detection should be correct but maybe I'm missing something, I am definitely interested in learning more about why we got "plainProgressBar" here. The commandline would be nice, it seems from the image parts are cut(?). I opened #776 that adds some more documentation, sorry that this was not included earlier and caused some confusion here. In a nutshell: it is possible to override via "--progress=plain" to get the old behavior and we are happy to look into tweaking the auto-detection or the defaults (i.e. ensure we do what is best for our users). |
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in osbuild#765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in osbuild#765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in #765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in #765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in #765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in #765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds the missing documentation for `--progress` in the README. Not having this lead to some confusion, e.g. in questions in osbuild#765 that a better README would have avoided. Hopefully this answers the questions :)
This commit adds automatic progress bar selection based on checking
if we run on a terminal or not. When running on a terminal we use
the nice "terminalProgressBar". If that is not set we assuem
we run in a script or CI/CD environment and select plainProgressBar.
Thanks Colin for the hint about the bad integration test.