-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Consistent/expanded usage of the resource term #3994
Conversation
f25b2f1
to
70d2923
Compare
Marking as ready for review now that the non-static changes are in. |
@@ -1011,4 +1012,9 @@ public static URL appendListOptionParams(URL base, ListOptions listOptions) { | |||
return urlBuilder.build(); | |||
} | |||
|
|||
@Override | |||
public Stream<R> resources() { | |||
return list().getItems().stream().map(this::resource); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of the map/peek? It will set the last listed item as the current item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map does not perform a peek, it will convert from a stream of HasMetadata to a stream of Resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, GH interface is playing dirty again.
@@ -0,0 +1,15 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks unintentional. I'll back that out as this file is going away in the other pr.
also making PodResource non-generic
resource # Conflicts: # kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/ResourceTest.java
SonarCloud Quality Gate failed. |
Description
This implements #3973, it is layered on top of the changes for #3875 to minimize conflicts - so only the last commit is of interest and this will get rebased prior to inclusion.
The change here is instead of withItem, we'll use resource, then instead getResources off of a resourceList, we'll use resources, and finally there's the addition of a convenience method resources, which serves the same purpose as the resourceList method.
This requires making watchlistdeletable more generic as we need the resource type. It also makes podresource non-generic as that is not needed.
Type of change
test, version modification, documentation, etc.)
Checklist