Skip to content

[WIP] Java Improvements#20

Closed
kameshsampath wants to merge 2 commits intoapache:masterfrom
kameshsampath:java-improvements/issue-18
Closed

[WIP] Java Improvements#20
kameshsampath wants to merge 2 commits intoapache:masterfrom
kameshsampath:java-improvements/issue-18

Conversation

@kameshsampath
Copy link

  • rebased docker image with fabric8 java openjdk8

  • Main class will be inferred from MANIFEST.MF if not provided via --main

This "Main class" implementation has two cascading changes via
* apache/openwhisk#3365
* apache/openwhisk-cli#233

Signed-off-by: Kamesh Sampath kamesh.sampath@hotmail.com

@kameshsampath
Copy link
Author

Java Action had few test run failures, this were caused because of the docker image update and existing test cases were expecting empty STDOUT but updated docker image logs the java command and flags.

The following logs were captured during those failed test runs, it will be useful to understand what changes were done to JavaContainerTests and why

All Tests failed
Partial Failure 1
Partial Failure 2

 - rebased docker image with fabric8 java openjdk8
 - Main class will be inferred from MANIFEST.MF if not provided via `--main`

Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
@kameshsampath kameshsampath force-pushed the java-improvements/issue-18 branch from 6951a58 to 44a6c4c Compare February 28, 2018 09:52
@kameshsampath
Copy link
Author

@csantanapr - can you please review and let me know what you think ?

Copy link
Member

@rabbah rabbah left a comment

Choose a reason for hiding this comment

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

Looks OK. Why the change to the logging? Can that be avoided?

@kameshsampath
Copy link
Author

@rabbah

Looks OK. Why the change to the logging? Can that be avoided?

Which one you refer to ? the logging from Proxy/JarLoader or via docker image startup

import static org.junit.Assert.fail;

/**
* @author kameshs
Copy link
Member

Choose a reason for hiding this comment

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

We generally don’t include authors in code.

Copy link
Author

Choose a reason for hiding this comment

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

thats a template generated ;) will remove it



private String encodeJarFile(String path) throws URISyntaxException, IOException {
/** START - This is to Simulation how it done via Proxy **/
Copy link
Member

Choose a reason for hiding this comment

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

Grammar: this is to simulate how it’s done ...
Same above.

Copy link
Author

Choose a reason for hiding this comment

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

am gonna remove those comments

env.take(1).toMap)

out.trim shouldBe empty
out.trim should fullyMatch regex """^exec -a 'javaAction-all.jar'(.*) -jar /deployments/javaAction-all.jar$"""
Copy link
Member

Choose a reason for hiding this comment

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

Here and below: why log these?

Copy link
Author

@kameshsampath kameshsampath Feb 28, 2018

Choose a reason for hiding this comment

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

these logs are from base docker image - just to easily debug whats the JVM options its started with. I would prefer to leave that logging it has been helpful in many of my previous cases when want to quickly find the JVM related args of a container

Copy link
Member

Choose a reason for hiding this comment

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

I suppose that’s useful - it counts against the users log limit for an action. How long is the output I don’t have a chance to run this atm.

Copy link
Author

Choose a reason for hiding this comment

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

its just at the start of the container and hardly max 2 lines

Copy link
Member

Choose a reason for hiding this comment

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

Thanks.

Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
@kameshsampath kameshsampath force-pushed the java-improvements/issue-18 branch from ba3f886 to b69bdf9 Compare March 1, 2018 10:07
Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

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

We should not move default image that users are currently extending and using to use ubuntu.

I think we should keep using ubuntu even if switching from oracle jdk to openjdk.
I prefered this approach #24

@@ -1,38 +1,10 @@
FROM buildpack-deps:trusty-curl
FROM docker.io/fabric8/java-jboss-openjdk8-jdk
Copy link
Member

Choose a reason for hiding this comment

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

I disagree to move to centos base image

@csantanapr csantanapr added the wip label Mar 5, 2018
@csantanapr
Copy link
Member

@Param-S could you help review this PR?

@mrutkows
Copy link
Contributor

Closing this PR since we are now based on "adoptopenjdk/openjdk8-openj9" which is the base image we agreed to be on.

@mrutkows mrutkows closed this Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants