-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix for using the official mysql image in composite stacks #3049
Conversation
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Can one of the admins verify this patch? |
ci-build |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1008/ |
@kaloyan-raev - we'd like to get this merged for M8 but there are conflicts, can you do a quick rebase? |
@bmicklea give me a few minutes. |
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.
-1 on current approach. Null value should not be returned as collection.
Conflicts: wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/compose/ComposeServiceImpl.java
I believe it is responsibility of MachineProviderImpl of DockerConnector to workaround situation with empty collections. |
Why? |
I agree with @kaloyan-raev that if user has not set anything it should be null, while an empty value is empty collection
There is no workaround, it's how it should work. Nothing entered, then it's null. |
Conflict resolved. |
For crosslink: This PR effects #3204 . |
Because we use that convention in our code. It makes methods that return collections free from NPE problems. It is very widespread in our code. Changed code was using that approach and personally I -1 on changing it to achieve what can be achieved in a different way. |
Moved to M9 |
@kaloyan-raev - are you able to update this PR based on the feedback? |
@bmicklea No. The feedback by @garagatyi raises a code styling complain, but does not suggest a working alternative. The |
@garagatyi - there is no mention of such Collections best practices in the wiki: https://github.com/eclipse/che/wiki/Coding-Guidelines. As such, @kaloyan-raev - +1 for merge. If we need to revisit our coding guidelines, we'll do so in the wiki, but not in this PR. We are in ramp down for 5.0 and want to GA this month. This issue is a pre-req for this, so will you be able to rebase and merge? This issue is also a blocker for other issues that we have for 5.0 GA. |
Github does not show any conflicts for this PR, so I don't think it needs another rebase. |
You are a committer now, so the PR owner is responsible for merging, updating any docs, and cleaning up the branches. cough cough. |
OK :-) I have to admit that I am not really sure when are the good days to merge things to master and when not. I am also not sure how it is decided for milestone assignments. |
The general rules for milestone assignments has been:
And then along the way, when we do our reviews a couple times a week, if we identify other items that we think are good for the release, then a PM adds them in. |
Thanks! |
Yes, this would be good to add. I think we have product managers, maintainers, and committers. I'll work on something over the holidays. |
…he#3049) * Avoid passing empty array for command and entrypoint to Docker API * Use official mysql docker image in the java-mysql stack Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
What does this PR do?
As discussed in #2991 Che has a problem running the official mysql docker image and works the issue around by crafting a custom codenvy/mysql.
I investigated the issue and found that Che is passing empty arrays for the
command
and theentrypoint
parameters of the/containers/create
Docker API method. This overrides the default entrypoint and command of the mysql docker image, which leads to failure during the container startup. Instead of passing empty arrays for these parameters, Che should leave them asnull
in the Java config object. This way thecommand
and theentrypoint
properties won't be included in the serialized JSON object passed to the Docker API, and the mysql container will be started with the correct entrypoint and command.In the second commit I modify the Java-MySQL stack to use the original mysql docker image.
What issues does this PR fix or reference?
Dockerfile for the codenvy/mysql image? #2991
Previous behavior
Stacks had to use the custom codenvy/mysql image in the Docker Compose definition.
New behavior
Stacks can use the official mysql image in the Docker Compose definition.
Signed-off-by: Kaloyan Raev kaloyan.r@zend.com