-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add notice annotation level and support more annotation fields #1175
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f1b6ca5
Add Notice Command
luketomlinson 350ac77
Add Feature Flag For Enhanced Annotations
luketomlinson a4cb119
Fix tests
luketomlinson b7b8dc0
Add validation for columns and lines
luketomlinson 99bacb7
Fix order to match service
luketomlinson 52cc77f
Remove console.write
luketomlinson e33b238
Make Validation Better
luketomlinson 4b57dd1
Cleanup
luketomlinson db13a22
Handle empty/whitespace strings
luketomlinson 38b0650
Add more validation for line/column ranges
luketomlinson aa1f00f
Make Validation Debug, Not Throw
luketomlinson 76bc6b7
Change casing to :camel: from :snake:
luketomlinson 81bb5ad
Give notice a well known tag
luketomlinson 8ba5e0e
Cleanup
luketomlinson e2ec486
Sanitize invalid commands rather than fail
luketomlinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -516,6 +516,24 @@ public void AddIssue(Issue issue, string logMessage = null) | |
| } | ||
|
|
||
| _record.WarningCount++; | ||
| } | ||
| else if (issue.Type == IssueType.Notice) | ||
| { | ||
|
|
||
| // tracking line number for each issue in log file | ||
|
luketomlinson marked this conversation as resolved.
|
||
| // log UI use this to navigate from issue to log | ||
| if (!string.IsNullOrEmpty(logMessage)) | ||
| { | ||
| long logLineNumber = Write(WellKnownTags.Notice, logMessage); | ||
| issue.Data["logFileLineNumber"] = logLineNumber.ToString(); | ||
| } | ||
|
|
||
| if (_record.NoticeCount < _maxIssueCount) | ||
| { | ||
| _record.Issues.Add(issue); | ||
| } | ||
|
|
||
| _record.NoticeCount++; | ||
| } | ||
|
|
||
| _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); | ||
|
|
@@ -841,6 +859,7 @@ private void InitializeTimelineRecord(Guid timelineId, Guid timelineRecordId, Gu | |
| _record.State = TimelineRecordState.Pending; | ||
| _record.ErrorCount = 0; | ||
| _record.WarningCount = 0; | ||
| _record.NoticeCount = 0; | ||
|
|
||
| if (parentTimelineRecordId != null && parentTimelineRecordId.Value != Guid.Empty) | ||
| { | ||
|
|
@@ -1012,6 +1031,7 @@ public static class WellKnownTags | |
| public static readonly string Command = "##[command]"; | ||
| public static readonly string Error = "##[error]"; | ||
| public static readonly string Warning = "##[warning]"; | ||
| public static readonly string Notice = "##[notice]"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we might want to make the UI changes first before we start writing this.... actually i guess it doesnt matter because no one will be using this initially. So we have some time to make that change in parallel |
||
| public static readonly string Debug = "##[debug]"; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ public enum IssueType | |
| Error = 1, | ||
|
|
||
| [EnumMember] | ||
| Warning = 2 | ||
| Warning = 2, | ||
|
|
||
| [EnumMember] | ||
| Notice = 3 | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.