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

Group output if running under GitHub Actions #68

Open
javierhonduco opened this issue Apr 30, 2024 · 4 comments
Open

Group output if running under GitHub Actions #68

javierhonduco opened this issue Apr 30, 2024 · 4 comments

Comments

@javierhonduco
Copy link
Contributor

A small but very useful thing to do when the output in CI systems is very large is to group parts of the output in sections that can be unfolded by the user. In GitHub Actions this can be accomplished by surrounding the output with ::group:: and ::endgroup:: (see the docs). The GITHUB_ACTIONS environment variable is set if running in this CI system.

If nobody implements this in the next few days and Daniel is happy with this change I will put a PR when I have some spare cycles 😄 .

@danobi
Copy link
Owner

danobi commented May 1, 2024

Makes sense to me! Originally I was thinking that kind of stuff would go into https://github.com/danobi/vmtest-action. But if that action is not actually useful feel free to put it in vmtest.

@danielocfb
Copy link

Introducing a group for boot output would be fine, but I feel like the script output should just manifest untouched. I'd also very much prefer this functionality be implemented in the corresponding action.

All that being said, if you compile a minimal kernel without printk support, there is not much output to begin with :P

@javierhonduco
Copy link
Contributor Author

Introducing a group for boot output would be fine, but I feel like the script output should just manifest untouched.

Was thinking of implementing this in Rust, not in the init script, would that be ok by you?

I'd also very much prefer this functionality be implemented in the corresponding action.

While I think having all the GitHub specific functionality in one place would be ideal, I am currently using vmtest without an Action and I would prefer to keep it this way if possible.

@danielocfb
Copy link

Introducing a group for boot output would be fine, but I feel like the script output should just manifest untouched.

Was thinking of implementing this in Rust, not in the init script, would that be ok by you?

Of course. My main worry is that we end up putting GitHub Action specific logic into this crate, which really shouldn't have any knowledge of GitHub Actions.

But what I meant by my comment is that there are conceptually two "types" of output: the kernel's boot up stuff (+ some vmtest messages) and then whatever output it is that the user's command emitted. I'd prefer if we left the user's command's output untouched.

Off the top of my head, perhaps the best solution would be to have the means to redirect either of the two outputs, e.g., by providing file descriptors to use. This would be a generic approach that you could hook into to insert ::group:: markers as and where needed, at the call site. Just a thought.

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

No branches or pull requests

3 participants