Skip to content

Alizer SelectDevFileFromTypes matches PHP project as nodejs project #1219

@yangcao77

Description

@yangcao77

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area alizer

What versions of software are you using?

Go project

Operating System and version:

Go Pkg Version:

Node.js project

Operating System and version:

Node.js version:

Yarn version:

Project.json:

Web browser

Operating System and version:

Browser name and version:

Bug Summary

Describe the bug:

With latest Alizer, please run this main.go file, this simplifies how HAS runs Alizer
main.txt

The result:

alizerDevfileTypes is [{nodejs-basic JavaScript Node.js [Node.js Express] []} {code-with-quarkus Java Quarkus [Java Quarkus] []} {java-springboot-basic Java springboot [Java Spring] []} {python-basic Python Python [Python Pip Flask] []} {go-basic Go Go [Go] []} {dotnet-basic .NET dotnet [.NET] []}] 
lenth of results 1 
**************
component devfile-stack-php-laravel,path: /Users/stephanie/Downloads/devfile-stack-php-laravel/ 
 languages: [{PHP [inc] 100 [Laravel] [] true false}] 
**************
detectedType: {nodejs-basic JavaScript Node.js [Node.js Express] []} 
detectedDevfileEndpoint: https://registry.devfile.io/devfiles/nodejs-basic 

With previous version of Alizer:

alizerDevfileTypes is [{nodejs-basic JavaScript Node.js [Node.js Express]} {code-with-quarkus Java Quarkus [Java Quarkus]} {java-springboot-basic Java springboot [Java Spring]} {python-basic Python Python [Python Pip Flask]} {go-basic Go Go [Go]} {dotnet-basic .NET dotnet [.NET]}] 
lenth of results 0 

Seems like latest Alizer detects the PHP component, but cannot filter out when calling SelectDevFileFromTypes

To Reproduce:

Expected behavior

Alizer can detect PHP as a component, but should not match it to any devfile.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Additional context

Any workaround?

Suggestion on how to fix the bug

Metadata

Metadata

Assignees

Labels

area/alizerEnhancement or issue related to the alizer repokind/bugSomething isn't working

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions