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

refactor: Introduce OperationContext, to limit the use of reflection. #1433

Merged
merged 8 commits into from
Mar 15, 2019

Conversation

iocanel
Copy link
Member

@iocanel iocanel commented Mar 14, 2019

This pull request, eliminates constructing objects using reflection.
Also simplifies the constructors of operation object by using a single argument.

There are still places that are using reflections, that will be eliminated later in the process).

@centos-ci
Copy link

Can one of the admins verify this patch?

@geoand
Copy link
Contributor

geoand commented Mar 14, 2019

Darn tests are failing... :(

@rohanKanojia rohanKanojia self-assigned this Mar 15, 2019
@rohanKanojia rohanKanojia force-pushed the reflection branch 2 times, most recently from e06122e to 9a932ac Compare March 15, 2019 09:37
@@ -34,6 +35,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

@Ignore
Copy link
Member

Choose a reason for hiding this comment

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

Why is this test ignored?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ignored that test because it was hunging forever and forgot to deal with it.

+ Wait till resource is deleted from cluster in failing tests
*/
package io.fabric8.kubernetes.client.dsl.base;

import io.fabric8.kubernetes.api.model.HasMetadata;
Copy link
Member

Choose a reason for hiding this comment

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

unused import ;-P

Copy link
Member

Choose a reason for hiding this comment

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

This guy is super picky @iocanel :-D

Copy link
Member Author

Choose a reason for hiding this comment

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

LoL

return new CustomResourceOperationContext(client, config, plural, namespace, name, apiGroupName, apiGroupVersion, cascading,item, labels, labelsNot, labelsIn, labelsNotIn, fields, resourceVersion, reloadingFromServer, gracePeriodSeconds, crd, type, listType, doneableType);
}

public CustomResourceOperationContext withRolling(boolean rolling) {
Copy link
Member

Choose a reason for hiding this comment

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

I might be wrong here, but can Custom resources can be rollable too 😲

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so.

Besides these methods doesn't seem to have any effect at all. I'll remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants