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

progress: auto-select progress based on the environment #765

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Dec 19, 2024

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.

achilleas-k
achilleas-k previously approved these changes Dec 19, 2024
bib/internal/progress/progress.go Outdated Show resolved Hide resolved
@cgwalters
Copy link
Contributor

Ideally we would check for a terminal but with podman we never have one.

docker/podman run -t ?

See also https://github.com/containers/podman-bootc/pull/61/files#diff-000666f7f8953356d352cfc7388aac26f46bb3f75ef9f413b8908a7bf8eb2729R352

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) )

@mvo5
Copy link
Collaborator Author

mvo5 commented Dec 19, 2024

Ideally we would check for a terminal but with podman we never have one.

docker/podman run -t ?

See also https://github.com/containers/podman-bootc/pull/61/files#diff-000666f7f8953356d352cfc7388aac26f46bb3f75ef9f413b8908a7bf8eb2729R352

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.

@cgwalters
Copy link
Contributor

LGTM

@mvo5 mvo5 requested a review from achilleas-k December 20, 2024 08:11
ondrejbudai
ondrejbudai previously approved these changes Dec 20, 2024
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Thanks! ❤️

@ondrejbudai
Copy link
Member

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.
@mvo5 mvo5 enabled auto-merge December 20, 2024 10:09
@mvo5 mvo5 added this pull request to the merge queue Dec 20, 2024
Merged via the queue into osbuild:main with commit ce6decd Dec 20, 2024
10 of 12 checks passed
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.

4 participants