Repository navigation
logs: Use resource builder and upstream code - #5233
Conversation
|
Do we have tests for these new types in another PR? |
No, I'll add any tests here. |
|
what PR is the upstream commit in? if none, please open one, then update the commit title to include the upstream PR number (e.g. |
|
I'd like to get this in to support #5305 |
There was a problem hiding this comment.
is there any way this could have a PodLogsNamespacer, not a factory? Requiring a factory makes it really hard to reuse this from other commands (as evidenced by the plumbing required to update the other commands that delegate to this).
edit: hmm, looks like it's the resource builder bits and the LogsForObject... I really wish we didn't need a whole factory for that
There was a problem hiding this comment.
Take methods or an interface.
There was a problem hiding this comment.
It's either the factory or a method and the resource builder. I opted for the first since it's cleaner but I don't feel strongly..
|
@smarterclayton actually we already test all new types against logs origin/test/end-to-end/core.sh Lines 151 to 155 in df76ab6 origin/test/end-to-end/core.sh Lines 22 to 30 in df76ab6 |
Upstream PR is kubernetes/kubernetes#10707, updated the commit message. |
|
LGTM, waiting on another round of feedback from @liggitt or @smarterclayton re: interfaces |
There was a problem hiding this comment.
I think it's more predictable to just tell the truth: the logs are no longer available. If we want to report something like what you have here (that the last deployment was successful) we could make it accurate by just fetching the RC to verify it exists and was successful. Thoughts?
There was a problem hiding this comment.
we could make it accurate by just fetching the RC to verify it exists and was successful
I like this. Personally I wouldn't mind leaving the output empty but someone will definitely request for it at some point.
There was a problem hiding this comment.
@ironcladlou updated to get the deployment and check if it's status is complete in case of no logs
|
[test] |
|
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6113/) |
There was a problem hiding this comment.
You still need this check to make sure that we don't have flag conflicts as we start adding our own log options.
|
structurally, this feels similar to the Scale operation... basically a polymorphic operation... can we figure out what we want the interface in the client to look like and do the same thing for both? Right now, this introduces: edit: @deads2k is convincing me this is a reasonable first step |
If I want to get build logs. I will use a |
|
I feel this is ready for a final review |
There was a problem hiding this comment.
Add a TODO to only inspect the string without retrieving the object.
|
Minor comments. lgtm otherwise. |
|
Evaluated for origin test up to 523c5e9 |
|
[merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3749/) (Image: devenv-rhel7_2539) |
|
Evaluated for origin merge up to 523c5e9 |
Merged by openshift-bot
@smarterclayton @deads2k @csrwng