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

Display each command as a collapsable section under CI #2976

Merged
merged 4 commits into from
Nov 20, 2020

Conversation

cognifloyd
Copy link
Contributor

Follow up to #2967 based on #2975

Please see #2967 for screenshots.

PR Type

  • Feature Pull Request

@cognifloyd cognifloyd changed the title Section markers Console Sectioners Nov 17, 2020
@cognifloyd
Copy link
Contributor Author

That's a first stab at implementing Sectioners. get_sectioner() is a bit ugly and is not test friendly. I'll have to refactor that later. I've spent too much time on this right now.

@cognifloyd
Copy link
Contributor Author

Reworked according to comments in #2984.
I still need to re-add tests.

LOGGING_CONSOLE prints to stderr. The CI docs did not say anything about
reading from stderr, so using it for this is questionable.
For now, just use the main console instance.
@cognifloyd
Copy link
Contributor Author

Before I was wrapping execute_subcommand() so modifying the execute_subcommand test seemed logical, to make sure that for each of the wrapper functions, the functionality didn't change.

Doing so is not quite as obvious now.

I suppose we could decorate a mock function using logger.get_section_loggers() parametrized with each combo of envvars (and calling logger.get_section_loggers.cache_clear() between each run), and then ensure that that mock function returns correctly in each case.

Anyway, those are my thoughts, I'll come back to finish this later.

@ssbarnea ssbarnea changed the title Console Sectioners Display each command as a collapsable section for CI that support it Nov 20, 2020
@ssbarnea ssbarnea changed the title Display each command as a collapsable section for CI that support it Display each command as a collapsable section under CI Nov 20, 2020
@ssbarnea ssbarnea self-requested a review November 20, 2020 15:45
@ssbarnea ssbarnea merged commit 2b6cf67 into ansible:master Nov 20, 2020
@cognifloyd
Copy link
Contributor Author

lol. I just added tests.

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.

2 participants