Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odo add binding asks all the questions even though a binding with the provided name already exists in the Devfile #6269

Closed
valaparthvi opened this issue Oct 28, 2022 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@valaparthvi
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:
Fedora 35
Output of odo version:
v3.0.0

How did you run odo exactly?

  1. Setup cluster with SBO, another operator and a microservice instance
  2. Run odo add binding once.
  3. Run it again and provide the same name as before.

Actual behavior

➜  odo add binding                                     
? Do you want to list services from: current namespace
? Select service instance you want to bind to: mongodb-instance (PerconaServerMongoDB.psmdb.percona.com)
? Enter the Binding's name: go-framework-mongodb-instance
? How do you want to bind the service? Bind As Environment Variables
? Select naming strategy for binding names: DEFAULT
 ✗  errors while adding components:
component go-framework-mongodb-instance already exists in devfile 

Expected behavior

➜  go-framework odo add binding                                     
? Do you want to list services from: current namespace
? Select service instance you want to bind to: mongodb-instance (PerconaServerMongoDB.psmdb.percona.com)
? Enter the Binding's name: go-framework-mongodb-instance
 ✗  component go-framework-mongodb-instance already exists, please enter a different name
? Enter the Binding's name: go-framework-mongodb-instance-2
? How do you want to bind the service? Bind As Environment Variables
? Select naming strategy for binding names: DEFAULT
 ✓  Successfully added the binding to the devfile.
Run `odo dev` to create it on the cluster.
You can automate this command by executing:
  odo add binding --service mongodb-instance.PerconaServerMongoDB.psmdb.percona.com --name go-framework-mongodb-instance-2 --bind-as-files=false

odo add binding should probably ask for the name first to ensure a binding doesn't already exist with the same name, or in case it does, it should not error out and ask the user to re-enter the name with a different value.

Any logs, error output, etc?

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 28, 2022
@rm3l rm3l added this to odo Project Oct 28, 2022
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 28, 2022
@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Mar 10, 2023
@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 17, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been inactive for 30 days since being marked as stale.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 17, 2023
@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Aug 17, 2023
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Sep 7, 2023
@rm3l rm3l closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
Archived in project
Development

No branches or pull requests

3 participants