odo: devfile component created out of java-quarkus component contains url with invalid name `8080/http`
/kind bug
What versions of software are you using?
Operating System: Linux
Output of odo version: odo 2.0.0
How did you run odo exactly?
Validation
✓ Checking devfile existence [32581ns]
✓ Checking devfile compatibility [42265ns]
✓ Creating a devfile component from registry: DefaultDevfileRegistry [47653ns]
✓ Validating devfile component [96807ns]
Starter Project
✓ Downloading starter project quarkus-ex from https://github.com/odo-devfiles/quarkus-ex [687ms]
Please use `odo push` command to create the component with source deployed
Actual behavior
In not pushed state odo describe returns 8080/http name for the URL
{
"kind": "Component",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "java-quarkus",
"namespace": "myproject",
"creationTimestamp": null
},
"spec": {
"app": "app",
"type": "java-quarkus",
"urls": {
"kind": "List",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {},
"items": [
{
"kind": "url",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "8080/http",
"creationTimestamp": null
},
"spec": {
"port": 8080,
"secure": false,
"kind": "route"
},
"status": {
"state": "Not Pushed"
}
}
]
},
"storages": {
"kind": "List",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {},
"items": [
{
"kind": "storage",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "m2",
"creationTimestamp": null
},
"spec": {
"size": "3Gi",
"path": "/home/user/.m2",
"containerName": "tools"
}
}
]
},
"ports": [
"5858"
]
},
"status": {
"state": "Not Pushed"
}
}
even with url name '8080/http` devfile validation goes through without errors
odo" push
Validation
✓ Validating the devfile [40656ns]
Creating Kubernetes resources for component java-quarkus
✓ Waiting for component to start [5s]
Applying URL changes
✓ URL 8080-http: http://8080-http-java-quarkus-myproject.apps-crc.testing/ created
Syncing to component java-quarkus
✓ Checking files for pushing [1ms]
✓ Syncing files to the component [146ms]
Executing postStart event commands for component java-quarkus
✓ Executing init-compile command "mvn -Dmaven.repo.local=/home/user/.m2/repository compile" [39s]
Executing devfile commands for component java-quarkus
✓ Executing dev-run command "mvn -Dmaven.repo.local=/home/user/.m2/repository quarkus:dev", if not running [1s]
Pushing devfile component java-quarkus
✓ Changes successfully pushed to component
After push odo describe returns 8080-http name for the component’s URL
odo describe -o json
{
"kind": "Component",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "java-quarkus",
"namespace": "myproject",
"creationTimestamp": null
},
"spec": {
"app": "app",
"type": "java-quarkus",
"urls": {
"kind": "List",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {},
"items": [
{
"kind": "url",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "8080-http",
"creationTimestamp": null
},
"spec": {
"host": "8080-http-java-quarkus-myproject.apps-crc.testing",
"protocol": "http",
"port": 8080,
"secure": false,
"kind": "route",
"path": "/"
},
"status": {
"state": "Pushed"
}
}
]
},
"storages": {
"kind": "List",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {},
"items": [
{
"kind": "storage",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "m2",
"creationTimestamp": null
},
"spec": {
"size": "3Gi",
"path": "/home/user/.m2",
"containerName": "tools"
}
}
]
},
"env": [
{
"name": "PROJECTS_ROOT",
"value": "/projects"
},
{
"name": "DEBUG_PORT",
"value": "5858"
}
],
"ports": [
"5858"
]
},
"status": {
"state": "Pushed"
}
}
Expected behavior
If 8080/http should be originally 8080-http right after component is created. That name 8080/http with ‘/’ should be caught during validation rather than replaced to 8080-http during deployment.
Any logs, error output, etc?
N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (25 by maintainers)
I like the idea that odo is smart enough to do this but I also see that is kind of work would make it less transparent to odo. So while we get to the conclusion of things I have opened a PR to rename
8080/httpto8080-http. registry PR link - https://github.com/odo-devfiles/registry/pull/58