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

[tools] console log issue from filter log #33075

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

JackTn
Copy link
Member

@JackTn JackTn commented Mar 7, 2025

Add logIssuesToADO function to export log issues from filter log

Copy link

openapi-pipeline-app bot commented Mar 7, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named Protected Files has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide

Copy link

PR validation pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

const fullLogFileName = path.join(logFolder, `${fileNamePrefix}-full.log`);
const filteredLogFileName = path.join(logFolder, `${fileNamePrefix}-filtered.log`);
const htmlLogFileName = path.join(logFolder, `${fileNamePrefix}-${commandInput.sdkRepoName.substring("azure-sdk-for-".length)}-gen-result.html`);
return { fullLogFileName, filteredLogFileName, htmlLogFileName };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the unused code, such as other logfiles?

* @param commandInput
* @param specConfigPath
*/
function logIssuesToADO(commandInput: SpecGenSdkCmdInput, specConfigPath: string): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function logIssuesToADO(commandInput: SpecGenSdkCmdInput, specConfigPath: string): void {
function logIssuesToPipeline(commandInput: SpecGenSdkCmdInput, specConfigPath: string): void {

* @param {string | undefined} readmePath The readmePath to extract the prefix from.
* @returns {string} The formatted prefix.
*/
function extractPathFromSpecConfig(tspConfigPath: string | undefined, readmePath: string | undefined): string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we still need this logic to find the log file name in case of batch run. Can you add a comment saying "this function is copied from 'spec-gen-sdk'" and add the source code link?

Copy link
Member

@raych1 raych1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For functions generateSdkForSpecPr and generateSdkForSingleSpec,

Both tspConfigPath and readmePath can be non-empty at the same time, can you update the log group message:

logMessage(`Generating SDK from ${tspConfigPath} ${readmePath}` , LogLevel.Group);
``

In addition, resolve the lint errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants