Skip to content

multiple components within the same app have route creation conflict #4957

@yangcao77

Description

@yangcao77

/kind bug

What versions of software are you using?

Operating System:

Output of odo version: odo v2.2.3 (b2ca2a8) - latest main branch

How did you run odo exactly?

odo create nodejs component-a
odo push

odo create nodejs component-b
odo push

Actual behavior

component-a created a route http-3000-app, and component-b is trying to create another http-3000-app, but failure since the route/URL already exist within the same namespace

Expected behavior

the routes odo create should be unique for each component. should append component name instead of app name. one app can have multiple components, and this will result into potential conflicts if I have multiple components under a single app contain the same endpoint name

Any logs, error output, etc?

release v2.2.3 works fine for me, since the route name was <endpointName>-<CmpName>
URL/route name now is <endpointName>-<AppName>
this is a regression introduced by: https://github.com/openshift/odo/pull/4858/files, at line https://github.com/mik-dass/odo/blob/e1391b26245af7a4d93e7a3fbb9a3c67a7b566b6/pkg/url/kubernetes.go#L280

which previously was :

routeName, err := util.NamespaceOpenShiftObject(url.Name, k.componentName)

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/HighImportant issue; should be worked on before any other issues (except priority/Critical issue(s)).v2Issue or PR that applies to the v2 of odo

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions