Skip to content

odo init interactive mode: allow setting detected ports when Devfile has multiple container components #6264

Open
@rm3l

Description

@rm3l

/kind user-story

User Story

As an odo user, I want to be able to set the ports detected automatically by odo when calling odo init interactively even if the suggested Devfile has many container components So that I can have my Devfile initialized right away with the right ports without having to edit it later on.

#5863 added the ability to automatically detect my application ports from the source code and use that as ports when initializing a Devfile interactively, but odo currently shows a warning if the Devfile has multiple container components:

if nbContainerComponents > 1 {
klog.V(3).Infof("found more than 1 container components in Devfile at path %q => cannot find out which component needs to be updated."+
"This case will be handled in https://github.com/redhat-developer/odo/issues/6264", devfileobj.Ctx.GetAbsPath())
fmt.Fprintln(w, "\nApplication ports detected but the current Devfile contains multiple container components. Could not determine which component to update. "+
"Please feel free to customize the Devfile configuration.")
return devfileobj, nil
}

As discussed in #6211 (comment), there might be issues with Devfiles that have more than one container components.
#6919 handles the simpler case of a Devfile that has at most one container component, and the goal of this issue is to handle the case where the Devfile has more than one container component when running odo init interactively. #6923 will handle the case for the non-interactive mode.

Acceptance Criteria

  • It should ...

Comments

Links

/kind user-story

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/initIssues or PRs related to `odo init`kind/user-storyAn issue of user-story kindlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-triageIndicates an issue or PR lacks a `triage/*` and requires one.priority/LowNice to have issue. It's not immediately on the project roadmap to get it done.

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions