Skip to content

Add strategy for devfile port detection to alizer enrichers #1156

Closed as not planned
@thepetk

Description

@thepetk

Which area/kind this issue is related to?

/area alizer

Issue Description

This is part of EPIC #1154 and is focusing on the update of alizer's strategies by supporting devfile port detection. As a result, someone will be able to choose the devfile port detection as part of the port-detection strategy and they will be able to get any ports defined inside a devfile. The steps required are the following:

  • Create a new const inside the model.go:
const Devfile     PortDetectionAlgorithm = 3
  • Update the component command's getPortDetectionStrategy to take into account the model.Devfile as part of the strategy.

  • In every DoEnrichComponent function we should update the switch in order to include the model.Devfile case. The enrichers are the following:

    1. dotnet_enricher.go
    2. go_enricher.go
    3. java_enricher.go
    4. javascript_enricher.go
    5. php_enricher.go
    6. python_enricher.go
  • The model.Devfile case should call the GetPortsFromDevfile function created in Implement alizer support for devfile port detection #1331.

Acceptance Criteria

  • The new strategy option of model.Devfile has been added to the compose command.
  • All enrichers are up-to-date and they support the new strategy option.
  • Test cases are created for changes in each enricher and for getPortDetectionStrategy
  • Update port detection and other documentation.

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.status/blocked

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions