devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
257 stars 61 forks source link

Add alizer support for filtering devfiles by arch #1181

Open thepetk opened 1 year ago

thepetk commented 1 year ago

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 (https://github.com/devfile/api/issues/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 https://github.com/redhat-developer/odo/issues/6805#issuecomment-1623633934

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: https://github.com/devfile/alizer/pull/5

Acceptance Criteria

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.

thepetk commented 8 months ago

Re-opening as it still an legit issue

github-actions[bot] commented 2 days ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.