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

feat(ado-improvements-1): Pipeline specific formatting #1051

Merged
merged 14 commits into from Feb 12, 2022

Conversation

DaveTryon
Copy link
Contributor

@DaveTryon DaveTryon commented Feb 12, 2022

Details

In #1048, it was pointed out that we have a requirement for pipeline-specific formatting. Summarizing from ADO docs and Workflow docs, we have the following matrix of formatting:

Concept ADO Workflow
error ##[error] ::error::
warning ##[warning] ::warning::
debug ##[debug] ::debug::
info none none
start group ##[group] ::group::
end group ##[endgroup] ::endgroup::

To this end, we've modified the Logger and LogLevel use the following API's, LogLevel, and generic tags:

Concept Logger API LogLevel Generic tag from Logger
error LogError error [error]
warning LogWarning warning [warning]
debug LogDebug debug [debug]
info LogInfo info [info]
start group StartGroup group [group]
end group EndGroup endgroup [endgroup]

Then we create pipeline-specific stdout transformers (adoStdoutTransformer and ghStdoutTransformer) to convert the generic output to the pipeilne-specific output.

Motivation

Improve #950, also includes changes from #1048 (which need this infrastucture to work correctly)

Context

There is some duplicated code between adoStdoutTransformer and ghStdoutTransformer. There are probably opportunities to improve this, but since it was a very small part of the whole change, and since I was having build problems, I left that for another PR.

I had a few false starts on this, so trying to review this per commit might add confusion, not clarity.

Pull request checklist

  • Addresses an existing issue: Needed for Task log output is too verbose, difficult to read #950
  • Added relevant unit test for your changes. (yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • Ran precheckin (yarn precheckin)

@DaveTryon DaveTryon requested a review from a team as a code owner February 12, 2022 00:43
@DaveTryon DaveTryon merged commit c88525c into microsoft:main Feb 12, 2022
@DaveTryon DaveTryon deleted the pipeline-specific-formatting branch February 12, 2022 01:28
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.

None yet

2 participants