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

feat: first draft of copy dsl for pods. #1444

Merged
merged 5 commits into from
Mar 27, 2019
Merged

Conversation

iocanel
Copy link
Member

@iocanel iocanel commented Mar 19, 2019

No description provided.

@centos-ci
Copy link

Can one of the admins verify this patch?

@iocanel
Copy link
Member Author

iocanel commented Mar 23, 2019

@rohanKanojia: I managed to solve the issue that we were having. It seems that the root cause was that the exec command was failing silently and thus nothing was written in the streams.

So, I removed the commit, with the experiments on the ExecWebSocketListener, timeouts etc, since it was not required for this to work.

@iocanel iocanel changed the title [wip] feat: first draft of copy dsl for pods. feat: first draft of copy dsl for pods. Mar 23, 2019
Copy link
Member

@rohanKanojia rohanKanojia left a comment

Choose a reason for hiding this comment

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

Looks good with some minor comments, Thank you.

@@ -15,6 +15,9 @@
*/
package io.fabric8.kubernetes.client.dsl.internal;

import java.io.File;
import java.io.FileNotFoundException;
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 ;-)


private InputStream readFile(String source) throws Exception {
//Let's wrap the code to a callable inner class to avoid NoClassDef when loading this class.
try {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use lambdas :-) here? Since we're already on Java 8...

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 think not!

return new Callable<InputStream>() {
@Override
public InputStream call() throws Exception {
try {
Copy link
Member

Choose a reason for hiding this comment

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

Exception is never thrown in this block


//
//
// The copy and read utilities below have been inspired by Brendan Burns copy utilities on the offical kubernetes-client.
Copy link
Member

Choose a reason for hiding this comment

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

typo s/offical/official

Did you mean this PR: kubernetes-client/java#375 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes


import static junit.framework.TestCase.assertNotNull;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
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 :-)

@rohanKanojia rohanKanojia added the changelog missing A line to changelog.md regarding the change is not added label Mar 25, 2019
@iocanel iocanel removed the changelog missing A line to changelog.md regarding the change is not added label Mar 26, 2019
@rohanKanojia
Copy link
Member

[merge]

@fusesource-ci fusesource-ci merged commit ad28647 into fabric8io:master Mar 27, 2019
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.

4 participants