TypeSpec Brownfield Conversion - introduce info-level FYI `Next steps to merge` message
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
This issue tracks the following work item:
> Work item 9: EngSys to validate the infoblurb functionality. It must be neither a warning nor an error!
From `TypeSpec Brownfields Conversion Specification`.
Currently `FYI` `Next steps to merge` messages show with warning emoji per this code:
- https://devdiv.visualstudio.com/DevDiv/_git/openapi-alps?path=/private/openapi-kebab/src/bots/pipeline/pipelineEventListener/renderNextStepsToMerge.ts&version=GBmain&line=193&lineEnd=193&lineStartColumn=18&lineEndColumn=20&lineStyle=plain&_a=contents
``` typescript
failingChecksNextStepsText =
checksToDisplay.map(check =>
(checkKind == "required")
? `
${check.name} has failed. ${check.troubleshootingGuide}: `
${check.name} has failed. ${check.troubleshootingGuide}).join("")
```
Need to add another "info" level.
Collection of "FYI" messages for failing checks is here:
https://devdiv.visualstudio.com/DevDiv/_git/openapi-alps?path=/public/swagger-validation-common/src/checksWorkflowInfo.ts&version=GBmain&line=40&lineEnd=55&lineStartColumn=1&lineEndColumn=78&lineStyle=plain&_a=contents
``` typescript
/**
* Names of GitHub checks that are FYI (For Your Information).
* Such checks, even though are not marked as 'required' in GitHub branch policies,
* will still be mentioned in the "Next Steps to Merge" comment and
* "automated merging requirements met" check.
*
* A check can be both 'required' and 'FYI'. This scenario occurs if
* branch policies of some repo branches make the check required,
* but for some other branches we only want to treat it as FYI.
*
* The same CheckWorkflowInfo.troubleshootingGuide is output in the 'Next Steps to Merge'
* comment, no matter if the check was required or not for given PR branch policy.
*
* For more implementation details, see extractRequiredAndFyiAndAutomatedMergingRequirementsMetCheckRuns.
*/
export const fyiCheckNames: string[] = ["TypeSpec Requirement (data-plane)"];
```
Message of the current singular "FYI" check failure message:
https://devdiv.visualstudio.com/DevDiv/_git/openapi-alps?path=/public/swagger-validation-common/src/tsgs.ts&version=GBmain&line=60&lineEnd=66&lineStartColumn=1&lineEndColumn=65&lineStyle=plain&_a=contents
``` typescript
export const typeSpecRequirementDataPlaneTsg =
`TypeSpec usage is required for all new (greenfield) services. `
+ `This is currently enforced as a warning for data-plane specs, but will be made a blocking error in the near future. `
+ `For information on converting from OpenAPI specs to TypeSpec specs or on data-plane (DP) policies, `
+ `refer to aka.ms/azsdk/typespec. `
+ `If you have general questions on resource provider (RP) policies, `
+ `refer to aka.ms/rphelp`
```
Related:
- https://github.com/Azure/azure-sdk-tools/issues/8408
Contributor guide
Assessment
This issue has not been assessed yet.