-
Notifications
You must be signed in to change notification settings - Fork 243
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 push" doesn't delete OpenShift objects when component name is changed #2172
Comments
Besides changing the component name, the behaviour is ditto same when we change the project of the component using |
I feel this is expected behaviour and if we want to have a cleanup process in place, we should ask In my opinion the orphaned objects shouldn't be deleted without consent |
+1. Makes sense to me.
And along the same lines, orphaned objects shouldn't be allowed to linger around without consent. That's what prompted me to open this issue. 😉 |
But how would you detect that the name was changed?
Problem is that we can't detect if that the component was orphaned due to name or project change. First, we need to make a list of the configuration options that can't be easily changed without side effects.
Then we have two options
|
+1
We could add comments in the
All we could do is add a warning message
How do we make the last thing happen, i.e.,
You mean the user should delete the old component while we already create a new one when they do |
Yes. Whenever the user triggers |
IMO since the user has already changed the name, I don't think we should prompt for confirmation. If you change the name of your component, you know what you're doing. I don't think we should even warn the user, maybe in verbose output, but that's it. If changed by config, we should at least confirm that we are going to be changing the component when using |
@cdrage So you mean no confirmation message prompt, just delete the old component and create the new one after triggering the |
@mik-dass Yes, that's correct, deleting the old component and re-creating it (in my opinion). But we have to be 100% sure that's what is intended, as to not have |
@kadel WDYT? |
I believe, it would be helpful to have at least a prompt or a warning message. We're talking about the users who are not really aware of OpenShift. A warning message would be helpful, IMO. |
Let's start asking the user to confirm when
Of course, the |
/kind feature What does does this PR do / why we need it: Adds a warning message while component name or project name of the component name is changed in the config Which issue(s) this PR fixes: Fixes redhat-developer#2172 How to test changes / Special notes to the reviewer: - Create a component - Change the component name or project name in the config odo config set name <value> or odo config set project <value> - Check if the warning message is displayed properly or not Signed-off-by: mik-dass <mrinald7@gmail.com>
/kind feature What does does this PR do / why we need it: Adds a warning message while component name or project name of the component name is changed in the config Which issue(s) this PR fixes: Fixes redhat-developer#2172 How to test changes / Special notes to the reviewer: - Create a component - Change the component name or project name in the config odo config set name <value> or odo config set project <value> - Check if the warning message is displayed properly or not Signed-off-by: mik-dass <mrinald7@gmail.com>
/kind feature What does does this PR do / why we need it: Adds a warning message while component name or project name of the component name is changed in the config Which issue(s) this PR fixes: Fixes redhat-developer#2172 How to test changes / Special notes to the reviewer: - Create a component - Change the component name or project name in the config odo config set name <value> or odo config set project <value> - Check if the warning message is displayed properly or not Signed-off-by: mik-dass <mrinald7@gmail.com>
/kind feature What does does this PR do / why we need it: Adds a warning message while component name or project name of the component name is changed in the config Which issue(s) this PR fixes: Fixes redhat-developer#2172 How to test changes / Special notes to the reviewer: - Create a component - Change the component name or project name in the config odo config set name <value> or odo config set project <value> - Check if the warning message is displayed properly or not Signed-off-by: mik-dass <mrinald7@gmail.com>
/kind feature What does does this PR do / why we need it: Adds a warning message while component name or project name of the component name is changed in the config Which issue(s) this PR fixes: Fixes #2172 How to test changes / Special notes to the reviewer: - Create a component - Change the component name or project name in the config odo config set name <value> or odo config set project <value> - Check if the warning message is displayed properly or not Signed-off-by: mik-dass <mrinald7@gmail.com>
[kind/bug]
What versions of software are you using?
odo version
: masterHow did you run odo exactly?
odo config set name fancy-name
and pushed it usingodo push --config
.Actual behavior
OpenShift objects from component with old name don't get deleted
Expected behavior
Shouldn't these objects get deleted? Otherwise, how exactly will these orphaned objects be deleted? By orphaned, I mean that objects that have no corresponding odo component.
The text was updated successfully, but these errors were encountered: