You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Start from an empty directory
mkdir -p /tmp/test-odo-init-from-empty-dir
cd /tmp/test-odo-init-from-empty-dir
# Run odo init interactively till the end.
odo init
Actual behavior
Devfile is downloaded as expected, but we are not prompting users to personalize its configuration (by updating endpoints or environment variables).
$ odo init
__
/ \__ Initializing a new component
\__/ \ Files: No source code detected, a starter project will be created in the current directory
/ \__/ odo version: v3.2.0
\__/
Interactive mode enabled, please answer the following questions:
? Select language: Java
? Select project type: Quarkus Java
✓ Downloading devfile "java-quarkus" from registry "DefaultDevfileRegistry" [1s]
? Which starter project do you want to use? redhat-product
? Enter component name: test-odo-init-from-empty-dir
✓ Downloading starter project "redhat-product" [2s]
Port configuration using flag is currently not supported
You can automate this command by executing:
odo init --name test-odo-init-from-empty-dir --devfile java-quarkus --devfile-registry DefaultDevfileRegistry --starter redhat-product
Your new component 'test-odo-init-from-empty-dir' is ready in the current directory.
To start editing your component, use 'odo dev' and open this folder in your favorite IDE.
Changes will be directly reflected on the cluster.
Expected behavior
The current behavior seems inconsistent, depending on whether the directory has source code or not.
When there is source code, odo prompts for Devfile personalization, as we can confirm below:
$ git clone https://github.com/gothinkster/node-express-realworld-example-app && cd node-express-realworld-example-app
$ odo init
__
/ \__ Initializing a new component
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
/ \__/ odo version: v3.2.0
\__/
Interactive mode enabled, please answer the following questions:
Based on the files in the current directory odo detected
Language: JavaScript
Project type: Node.js
The devfile "nodejs" from the registry "DefaultDevfileRegistry" will be downloaded.
? Is this correct? Yes
✓ Downloading devfile "nodejs" from registry "DefaultDevfileRegistry" [1s]
↪ Container Configuration "runtime":
OPEN PORTS:
- 3000
- 5858
ENVIRONMENT VARIABLES:
- DEBUG_PORT = 5858
? Select container for which you want to change configuration? NONE - configuration is correct
? Enter component name: conduit-node
Port configuration using flag is currently not supported
You can automate this command by executing:
odo init --name conduit-node --devfile nodejs --devfile-registry DefaultDevfileRegistry
Your new component 'conduit-node' is ready in the current directory.
To start editing your component, use 'odo dev' and open this folder in your favorite IDE.
Changes will be directly reflected on the cluster.
I think we should do the same thing even if there is no source code, because users may have an idea of how their application could look like in the end (regardless of whether they select a starter project or not).
Any logs, error output, etc?
—
The text was updated successfully, but these errors were encountered:
@rm3l I think current behavior should be the expected behavior,
According to current workflow, first we are downloading the devfile, and then we ask/download the starter project associated to it, does it make sense to update/edit the devfile if we will use the starter project?
/kind bug
What versions of software are you using?
Operating System:
Fedora 37
Output of
odo version
:ce42ce4
How did you run odo exactly?
Actual behavior
Devfile is downloaded as expected, but we are not prompting users to personalize its configuration (by updating endpoints or environment variables).
Expected behavior
The current behavior seems inconsistent, depending on whether the directory has source code or not.
When there is source code,
odo
prompts for Devfile personalization, as we can confirm below:I think we should do the same thing even if there is no source code, because users may have an idea of how their application could look like in the end (regardless of whether they select a starter project or not).
Any logs, error output, etc?
—
The text was updated successfully, but these errors were encountered: