-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
devfile/alizer
#28Labels
area/alizerEnhancement or issue related to the alizer repoEnhancement or issue related to the alizer repoarea/documentationImprovements or additions to documentationImprovements or additions to documentationdemoIssue or PR candidate for a demo at the end of the SprintIssue or PR candidate for a demo at the end of the Sprint
Description
Which area/kind this issue is related to?
/area alizer
/area documentation
Issue Description
This issue is part of the #250 EPIC and focuses on the optimization with specific paths for each detector (e.g mux_detector).
That said, after the import of the proposal for this epic (#251) we could introduce the same way for each detector for reading port detection related files:
// It returns a list of accepted paths or specific files from a given rootPath
func (b BeegoDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo {
return []model.ApplicationFileInfo{
{
Context: ctx,
Root: componentPath,
Dir: "conf",
File: "app.conf",
},
}
}
// And now on the DoPortsDetection we can directly read all potential files
func (b BeegoDetector) DoPortsDetection(component *model.Component, ctx *context.Context) {
fileContents, err := utils.GetApplicationFileContents(b.GetApplicationFileInfos(component.Path, ctx))
if err != nil {
return
}
}Having this feature will ensure that we only parse the necessary paths for port detection.
Acceptance Criteria
- All
detectorsare using theGetApplicationFileInfosfunction in order to fetch all files. - Ensure that all detectors are fetching only the necessary files for port detection.
- Tests for new
utilsfunctions have been added. - The port detection documentation is up-to-date
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/alizerEnhancement or issue related to the alizer repoEnhancement or issue related to the alizer repoarea/documentationImprovements or additions to documentationImprovements or additions to documentationdemoIssue or PR candidate for a demo at the end of the SprintIssue or PR candidate for a demo at the end of the Sprint
Type
Projects
Status
Done ✅