-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Eventgrid arm package is not packaged due to matching service and dat… #14301
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,14 +112,31 @@ function isPackageFolderPath(folderPath: string, packagesToIgnore: string[]): bo | |
return result; | ||
} | ||
|
||
function shouldProcessFolderPath(folderPath: string, folderNamesToIgnore: string[]): boolean { | ||
if (!contains(folderNamesToIgnore, getName(folderPath))) { | ||
// If current path is not in folder to ignore list then process it. | ||
return true; | ||
Comment on lines
+116
to
+118
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. I think this returns true for the track 1 perf test packages since it isn't a rush package. 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. @HarshaNalluru : Do we need any more change in this PR or is it good to merge? 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. This looks good. (perf track 1 can be handled in a separate PR.) But I think if you can elaborate in comments with examples on what gets filtered at each step, it would help a lot. |
||
} | ||
|
||
// if current folder name is in folder to ignore list then make sure this path is package root path | ||
// eventgrid service name and dataplane package name are same and it is added in ignore list | ||
// So this causes an issue to skip processing eventgrid service folder itself | ||
const packageJsonFilePath: string = joinPath(folderPath, "package.json"); | ||
if (!fileExistsSync(packageJsonFilePath)) { | ||
return true; | ||
} | ||
|
||
// Skip current path since it is package root path and also added in ignore folder list | ||
return false; | ||
} | ||
|
||
export const packagesToIgnore: string[] = generateDataplaneList().packageList; | ||
export var folderNamesToIgnore: string[] = generateDataplaneList().folderList; | ||
folderNamesToIgnore.push("node_modules"); | ||
|
||
export function getPackageFolderPaths(packagesFolderPath: string): string[] | undefined { | ||
return getChildFolderPaths(packagesFolderPath, { | ||
recursive: true, | ||
condition: (folderPath: string) => isPackageFolderPath(folderPath, packagesToIgnore), | ||
folderCondition: (folderPath: string) => !contains(folderNamesToIgnore, getName(folderPath)) | ||
folderCondition: (folderPath: string) => shouldProcessFolderPath(folderPath, folderNamesToIgnore) | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks harder to understand.
Would it help better if you add a comment above with an example?
Such as..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, at other places too.