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

Remove ApplyLabelSelectorDecorator from MinikubeHandler #14346

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

mrizzi
Copy link
Contributor

@mrizzi mrizzi commented Jan 17, 2021

Fixes #14345

@ghost ghost added the area/kubernetes label Jan 17, 2021
@geoand
Copy link
Contributor

geoand commented Jan 17, 2021

Thanks for this work!

TBH, I don't undestand why your changes is proper fix. I mean what happens if the the application does not provide a custom Deployment, won't the labels be missing?

@mrizzi
Copy link
Contributor Author

mrizzi commented Jan 18, 2021

If the user won't provide a custom Deployment, the "application"'s Deployment will be created anyway in the same way it's created when existing resource are provided so basically, at my understanding, using the MinikubeHandler.createDeployment method.
This method adds the selector block invoking createSelector(appConfig) in both cases.
AFAIK, the ApplyLabelSelectorDecorator "forces" the same selector on all the deployments which is not fine when a custom Deployment is provided.

@geoand
Copy link
Contributor

geoand commented Jan 18, 2021

Ah OK, got it.

Things were refactored so I think this makes sense.

@iocanel mind taking a look as well?

@gsmet
Copy link
Member

gsmet commented Jan 25, 2021

@iocanel ping? I would like to get it in 1.11.1.Final so we would need to merge it by tomorrow evening if you agree it's the right fix.

Thanks!

@iocanel
Copy link
Contributor

iocanel commented Jan 25, 2021

I have mixed feelings about it, as there is no guarantee or commitment that new Deployment resources will contain a selector. It's just happens to be currently the case.

We can merge but we need to further improve handling in the future.

@mrizzi
Copy link
Contributor Author

mrizzi commented Jan 26, 2021

@iocanel thanks for the info.
I think it's worth having this merged because, for sure, right now the extension has a bug that overwrites the selector: this makes any provided (and working) Deployment broken and not working anymore and hence making the minikube.json file created not working.

@mrizzi
Copy link
Contributor Author

mrizzi commented Jan 28, 2021

@iocanel @geoand @gsmet
Sorry to pester you guys but I would like to have this fix for #14345 merged.
The PR contains the test case for the issue I reported.
If it's not "fixing enough" and there's another case to be fixed, could someone provide the test so that we can have this PR to fix everything it's required and then merged?

@geoand
Copy link
Contributor

geoand commented Jan 28, 2021

@iocanel is the absolute expert here, so I'll defer to gimy

@gsmet
Copy link
Member

gsmet commented Jan 28, 2021

I would tend to agree with @mrizzi here. If it's fixing an issue without introducing any others, I would go for it. We can work on more structural changes later.

@iocanel could you check if we expect this patch to introduce issues or not? If not I would be in favor of merging it for 1.11.2.

@iocanel iocanel self-requested a review January 30, 2021 20:20
Copy link
Contributor

@iocanel iocanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does fix an issue, without introducing others.
While I am a bit reluctant for the reasons already mentioned, I think that any possible future breakage will be caught by the integraiton tests, that are added. So, lets merge.

@geoand geoand merged commit b8f4acd into quarkusio:master Feb 2, 2021
@ghost ghost added this to the 1.12 - master milestone Feb 2, 2021
@mrizzi mrizzi deleted the issues-14345 branch February 2, 2021 15:42
@mrizzi
Copy link
Contributor Author

mrizzi commented Feb 3, 2021

@gsmet could this be made available in 1.11.2 before 1.12 please?

@geoand
Copy link
Contributor

geoand commented Feb 3, 2021

The backport label has been added so it will be part of 1.11.2

@mrizzi
Copy link
Contributor Author

mrizzi commented Feb 3, 2021

Thanks @geoand

@gsmet gsmet modified the milestones: 1.12 - master, 1.11.2.Final Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube extensions overwrites existing Deployment's selector
4 participants