Skip to content

Add alizer support for filtering devfiles by arch #1181

Closed as not planned
Closed as not planned
@thepetk

Description

@thepetk

Which area this feature is related to?

/area alizer

Which functionality do you think we should add?

After the introduction of specific CLI parameters like --log or --min-version (#1170) we can add another filtering for --arch. This way we can match devfiles regarding their architecture.

Why is this needed? Is your feature request related to a problem?

Along other pros this will also unblock redhat-developer/odo#6805 (comment)

Detailed description:

Like --min-version and --max-version we can have another parameter which will be passed to the MatchDevfiles function:

import "github.com/redhat-developer/alizer/pkg/apis/recognizer"
filter := map[string]interface{} {
        "arch": "amd64",
}
devfiles, err := recognizer.SelectDevFilesFromTypesWithArgs("myproject", devfiles, filter)

And the overall CLI usage can be:

./alizer devfile --arch amd64 <path>

Describe the solution you'd like

The best solution for this is to pass a parameter to the URL that fetches all devfiles from registry. As a result an update inside the recognizer.GetUrlWithVersions introduced here: devfile/alizer#5

Acceptance Criteria

  • Make sure a new CLI arg is added and the new model.DevfileFilters are passed to the component_recognizer.go
  • Add test cases for those filters.
  • Add new documentation for this new cli arg.

Metadata

Metadata

Assignees

Labels

area/alizerEnhancement or issue related to the alizer repolifecycle/rottenRotten items. These items have been stale for 60 days and are now closed.lifecycle/staleStale items. These items have not been updated for 90 days.

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions