Commit Graph

1042 Commits (307491c349de2eca95014afa78f17beb1e1cf86e)

Author SHA1 Message Date
Mykola Morhun 307491c349 CHE-5862: Set right handler on double click in Git Compare window (#5885)
Set right handler on double click in Git Compare window
2017-08-03 16:17:25 +03:00
Florent BENOIT 5bbbf9c337 Create routes in openshift with the same pattern than the urls provided by naming strategy (#5879)
* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-08-03 08:52:46 +02:00
Valeriy Svydenko 5f52277b2a CHE-5725: fixes for test running (#5877) 2017-08-02 14:55:05 +03:00
Valeriy Svydenko 6a317b5bff CHE-5379: fix wrong cursor placement for autocompletion (#5873) 2017-08-02 14:34:10 +03:00
Roman Nikitenko 5366375ca3 CHE-5654. Activate java reconciling when classpath is changed
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
2017-08-02 09:40:54 +03:00
Valeriy Svydenko 65c2201473 CHE-5725: Run all java tests from the project or package (#5804) 2017-08-01 16:56:13 +03:00
Anatoliy Bazko e4286e6196 CHE-5236: Treat decompiled class in a proper way (#5808) 2017-07-28 14:27:39 +00:00
Igor Vinokur c9c9a4a692 CHE-3415: Add ability to perform Git pull with rebase (#5787) 2017-07-27 09:33:33 +03:00
Mykola Morhun d5de61bfb9 CHE-3221: Fix git compare on submodules. (#5799)
* CHE-3221: Fix git compare on submodules.
2017-07-25 17:46:28 +03:00
Ilya Buziuk 7bc8a5e7f1 CHE-249: Setting workspace Pod terminationGracePeriodSeconds to zero
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2017-07-24 19:00:15 +02:00
Ilya Buziuk 849456b802 CHE-220: Improving 'removeContainer' API. Refactoring
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2017-07-24 18:59:33 +02:00
Roman Nikitenko 9380d2c73d CHE-5615. Fix NPE at detecting tests by java test runner
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
2017-07-24 15:45:14 +03:00
Roman Nikitenko e2b015899e CHE-5643. Add ability to select items in the quick fix window using keyboard
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
2017-07-24 15:43:10 +03:00
Mykola Morhun 84a4de633d CHE-5235: Fix step into when source cannot be obtained (#5768)
CHE-5235: Fix step into when source cannot be obtained.
2017-07-21 15:43:06 +03:00
Dmytro Kulieshov 888da450e6 fixed formatting (#5755)
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
2017-07-20 12:32:42 +03:00
Thomas Mäder 6e743678ea Fix LSP didChange parameters #4978 (#5002)
* Add document changing listener support

Signed-off-by: Thomas Mäder <tmader@redhat.com>

* Use document changin notification to compute correct didChange
parameters

Signed-off-by: Thomas Mäder <tmader@redhat.com>

* Make sure to use the proper document instance.

Signed-off-by: Thomas Mäder <tmader@redhat.com>

* Renamed DocumentChangeEvent->DocumentChangedEvent

Signed-off-by: Thomas Mäder <tmader@redhat.com>
2017-07-20 11:45:02 +03:00
Mykola Morhun 084c66c4e4 CHE-5152: Apply pagination in Git Reset window (#5726)
* CHE-5152: Apply pagination in Git Reset window
* CHE-5152: Apply max scroll fix for Git History window
* CHE-5152: Fix selection bug in GIt Reset window
2017-07-20 10:01:52 +03:00
Valeriy Svydenko 6c6e00e2bd Adapt JUnit4 runner according new API (#5710) 2017-07-20 09:49:34 +03:00
Roman Iuvshyn 185273f8b9 RELEASE: Set next development version (#5734)
* RELEASE: Set next development version
2017-07-19 12:45:32 +03:00
Florent BENOIT 4e872e0ed4 Adds a /workspace-logs folder linked to the persistent volume
Each pod has a dedicated folder matching the workspace id

for the project's source, it is currently using :

/projects ---> <PV>/<workspace-name>

and for the logs it's now using as well
/workspace-logs ---> <PR>/<workspace-name>-logs/

example : /workspace-logs/dev-machine-ws-agent/logs/catalina.log  for the log of the dev-machine workspace agent.

Change-Id: I2b9d533ba3df2cf55857d8c30d2de5df463a5902
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-07-18 15:23:49 +02:00
Yevhen Vydolob 3c2aa13b59 fix build (#5666)
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
2017-07-17 10:25:51 +03:00
Thomas Mäder 2a57ca8cf2 Use LSP for pom editor (#5641)
Signed-off-by: Thomas Mäder <tmader@redhat.com>
2017-07-14 17:15:14 +02:00
Oleksandr Andriienko 7b9c2a189a Update lsp4J lib to newer version. (#5292)
* #5360 Upgrade LSP4J library version to 0.2.0
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
2017-07-14 11:05:20 +03:00
Yevhen Vydolob 91b543547e #5380 use Orion annotation model instead 'showProblems' method (#5518)
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
2017-07-14 09:09:57 +03:00
Kaloyan Raev e1868db831 Rework Composer plugin to avoid using Everrest based Websocket calls (#5629)
* Rework Composer plugin to avoid using Everrest based Websocket calls

Fixes #5348

Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>

* Fix dependencies

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-13 22:06:24 +03:00
Sun Seng David Tan e0c9d06ac3 PR Panel: refactoring
Signed-off-by: Sun Seng David Tan <sutan@redhat.com>
2017-07-13 15:20:33 +02:00
Vitalii Parfonov 95a09d6544 Avoid using ProjectManager only for taking project root dir instead of we will use special properties (#5636)
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-13 15:39:50 +03:00
Vitalii Parfonov af4248f810 Fix using project path and fileUri (#5625)
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-13 10:03:33 +03:00
Alexander Garagatyi 2b45703841 Move mvn and svn tests execution to integration profile (#5596)
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-07-12 12:25:17 +03:00
Dmytro Kulieshov 20b4948b08 Rework Find Usages feature to avoid using Everrest based Websocket calls (#5550) 2017-07-11 10:57:58 +03:00
Vitalii Parfonov 599bd6b287 Fix dependencies (#5590)
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-11 10:02:45 +03:00
Oleksandr Garagatyi b7b756ca14 CHE-5555: try to fix occasionally failing tests on CI
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-07-10 22:29:11 +03:00
Vitalii Parfonov 3d25154964 Replace Window.open() with JS native call (#5584)
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-10 19:39:33 +03:00
Vitalii Parfonov 96498a7af9 Maven Server tests execution on integration phase (#5574)
* Maven Server tests execution on integration phase
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-10 14:46:50 +03:00
Thomas Mäder 9f88048572 Add support for using multiple language servers to be registered for the same files #4609 (#5442)
Add support for using multiple language servers for the same files.

Signed-off-by: Thomas Mäder <tmader@redhat.com>
2017-07-10 10:20:30 +02:00
Florent BENOIT 8c25c2ac7d Sort imports
Change-Id: Ia8e2b2facb565458a972f0bd42da6cc4a1d525c1
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-07-07 14:10:32 +02:00
Thomas Mäder 092505d915 Support for multiple highlights
Signed-off-by: Thomas Mäder <tmader@redhat.com>
2017-07-07 13:36:36 +02:00
Valeriy Svydenko a5b3b7b612 New runner for TestNG tests (#5472) 2017-07-06 16:20:58 +03:00
Valeriy Svydenko 2e8d802789 CHE-5350: change names of methods for WebSocket communication (#5543) 2017-07-06 14:38:09 +03:00
Vitalii Parfonov c22466c269 Move binding ServerIdleDetctor to the assembly module (#5541)
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-07-05 18:24:14 +03:00
Valeriy Svydenko ef74274eba CHE-5350: rework Maven plugin to avoid using Everrest Websocket (#5527) 2017-07-05 16:22:51 +03:00
Aleksandr Andriienko 00421dd624 CHE-5424: Fix refactor rename from 'Rename' window
Signed-off-by: Aleksandr Andriienko <oandriie@redhat.com>
2017-07-05 16:04:53 +03:00
Sun Seng David TAN 8049320348 Openshift connector improvements (#5052)
* CHE-4141 - Use Persistent Volumes Claims when creating workspaces

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Implement getContainerLogs method in OpenShiftConnector

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Implement createExec() and startExec() in OpenShiftConnector

Add implementations of createExec() and startExec(). Since OpenShift
does not separate the create and start steps, a holder class
KubernetesExecHolder is necessary, to pass information between
the call to createExec() (which just saves relevant information)
and startExec().

Additionally, adds KubernetesOutputAdapter, which parses the output
from OpenShift into LogMessages that can be handled by Che's
MessageProcessor<LogMessage> class.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Add implementation of getEvents() to avoid busy wait

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Update Dockerfile to avoid permissions issues

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Che server and workpaces exposed on the same single TCP port (#4351)

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Disabling usage of user account service in openshift-connector

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Update Docker Compose tests to fix test failure

Updating to Jackson 2.7.7 causes tests in the docker compose
plugin to fail. This is due to the fact that the tests expect
empty values in dictionaries to be parsed as the empty string,
whereas jackson 2.7.7 parses them as null (as specified by the
yaml spec).

Modifies the affected tests to explicitly use an empty string
(i.e. "") instead of an empty value.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Find an alternative to subPath in volumeMount

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Setting rwx permissions for all on /data/ in case it's not mounted

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Add support for resource limits when running on Openshift

Add resource limits to workspace Pods when running on OpenShift.
The memory limit is normally obtained from the API request to
create the workspace, however it can be overridden via the property
`che.openshift.workspace.memory.override`. The cpu limit used is
determined by the property `che.openshift.workspace.cpu.limit`.

In both cases, the value of the property is passed directly to
OpenShift, so any valid quantity is acceptable (e.g. 150Mi,
1Gi, 1024, etc).

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Fix dockerImageConfig is null (since v1.5 of OpenShift API)

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Add Nullable annotation to che.docker.ip.external

The property che.docker.ip.external can be null, but
OpenShiftConnector does not include the annotation. This
prevents Che from initialising if e.g. running on docker
without the property set.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* CHE-158 Adding TLS support for Workspace routes

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Adding property to set requests for RAM

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* CHE-158 Using '-' instead of '.' for generating OpenShift route Urls

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Fixing tests after changing Url generation logic

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Redirect insecure HTTP requests to TLS endpoint

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* CHE-180: Creating and closing OpenShiftClient in every method of OpenshiftConnector

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Update route naming to make it work on OSO

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Rework PVC management on OpenShift

- Change how subdirectories are created in pods to
  use a short, terminating job instead of a full deployment
- Add OpenShiftWorkspaceFilesCleaner class to properly
  notice workspace deleted events
- Add helper class to manage job pods. For creation, some
  effort is made to avoid attempting to create workspaces
  unnecessarily, but only exists in-memory
- Workspace deletions are batched together so that removing
  workspaces directories can be done when server is idled,
  avoiding unnecessary PVC mounts
- Add two new properties: che.openshift.jobs.image and
  che.openshift.jobs.memorylimit, which are used by
  OpenShiftPvcHelper to set up pods

Current issues:
- Since workspace directories are not deleted immediately,
  attempting to re-create a workspace with the same name
  will result in the previous instance's project to already
  be there. This should have a minor impact.
- Memory for which workspace dirs have been created is not
  persisted, resulting in potentially unnecessary jobs
- Openshift workspace files cleaner is included by overwriting
  binding in WsMasterModule instead of using a provider. This
  could be better, but OpenShift integration may be reaching a
  point where a custom module is a better solution.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Delete ReplicaSets explicitly when shutting down a workspace

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Fix OpenShiftConnectorTest

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Fix route server names if unknown should start with server-.

https://issues.jboss.org/browse/CHE-230

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Add property to control manual workspace dir creation in OpenShift

Add property 'che.openshift.precreate.workspace.dirs'. If property is
true, OpenShiftConnector will run a pod before launching workspaces
to create a subpath in the workspace's persistent volume with correct
permissions. If the property is false, this step is skipped.

This is necessary as in older versions of OpenShift/Kubernetes, subpaths
created as part of a volume mount are created with root permissions, and
so cannot be modified by workspace pods. More recent versions fix this,
creating subpath volumes with correct permissions, making the step above
unnecessary.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* CHE-102 - Idle detection of che-server and workspaces

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Add and modify tests for OpenShift helper classes

Add tests for the untested classes in openshift.client.kuberentes,
and update existing tests where necessary.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Recent changes required access to `/` which is impossible under OS 

Signed-off-by: David Festal <dfestal@redhat.com>

* adapt che-server entrypoint.sh to environments without write permissions in '/' (#5344)

* adapt che-server entrypoint.sh to environments without write permissions in '/'

* CHE-280: Adding container's state info to the 'inspectContainer' API

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Factorize code of `ServerEvaluationStrategy` classes, to use the Custom strategy as the basis of other strategies (#5366)

* Pull-up the local docker port management (use exposed ports)

Signed-off-by: David Festal <dfestal@redhat.com>

* Make all the strategies extend `CustomEvaluationStrategy`

Signed-off-by: David Festal <dfestal@redhat.com>

* Add a `workspaceIdWithoutPrefix` macro and use it for `single-port`

This macro is based on the `workspaceId` macro, but without the
`workspace` prefix.

Signed-off-by: David Festal <dfestal@redhat.com>

* Add the `isDevMachine` to allow conditions in the ST template.

This is required to allow the `single-port` strategy to have a different
url according to the type of machine. (see the work done for CHE-175 :
Support multi-container workspaces on OpenShift)

Signed-off-by: David Festal <dfestal@redhat.com>

* Small fixes after comments from @fbenoit

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix unnecessary space pointed out by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Remove unnecessary `else` as suggested by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Keep the method signatures compatible with the `condenvy` strategy

Signed-off-by: David Festal <dfestal@redhat.com>

* Align names of parameters of constructors (requested by @garagatyi)

Signed-off-by: David Festal <dfestal@redhat.com>

* Add a default implementation to avoid breaking the Codenvy build

Signed-off-by: David Festal <dfestal@redhat.com>

* Also rename the attributes

Signed-off-by: David Festal <dfestal@redhat.com>

* Use a constant for the `workspace` prefix string

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix formatting as requested by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Use a constant for the `isDevMachine` macro name

Signed-off-by: David Festal <dfestal@redhat.com>

* Add unit tests for `workspaceIdWithoutPrefixè and `isDevMachine` macros

Signed-off-by: David Festal <dfestal@redhat.com>

* Another requested formatting fix

Signed-off-by: David Festal <dfestal@redhat.com>

* Make new tests clearer

Signed-off-by: David Festal <dfestal@redhat.com>

* yet another formatting request

Signed-off-by: David Festal <dfestal@redhat.com>

* Respect the original order of imports

Signed-off-by: David Festal <dfestal@redhat.com>

* remove unnecessary `toString()`

Signed-off-by: David Festal <dfestal@redhat.com>

* use a lowercase `S` in the `server-` prefix

Signed-off-by: David Festal <dfestal@redhat.com>

* Multi-container workspace Support (#5110)

* Fix 2 NPE that prevented using *non-dev* additional machines

In the context of https://issues.jboss.org/browse/CHE-175

Signed-off-by: David Festal <dfestal@redhat.com>

* Name openshift resources based on the machine name for non-dev machines

This fixes https://issues.jboss.org/browse/CHE-259
and https://issues.jboss.org/browse/CHE-258

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix failing Traeffik tests...

... by:
- adding the new `CHE_IS_DEV_MACHINE` env variable in tests
- pulling up all the `CustomServerEvaluationStrategy` features in an
abstract `BaseServerEvaluationStrategy` (which all other Che strategies
extend) and have the `CustomServerEvaluationStrategy` class simply
extend this `BaseServerEvaluationStrategy`.

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix tests in the LocalDockerEvaluationStrategy...

... by correctly using the boolean attribute to manage the new use-case
introduced by @fbenoit in master.

Signed-off-by: David Festal <dfestal@redhat.com>

* Replace OSIO-specific `single-port` strategy by `docker-local-custom` 

This fixes redhat-developer/rh-che#113

Signed-off-by: David Festal <dfestal@redhat.com>
2017-07-04 18:11:32 +02:00
Vitalii Parfonov 7078a070a0 Avoid possible NPE (#5526)
Signed-off-by: Vitalii Parfonov <vparfonov@codenvy.com>
2017-07-04 12:41:04 +03:00
Igor Vinokur cb1348b26c CHE-5346 Rework git client-service (#5476)
1. Get rid of using Everrest based Websocket calls in `GitServiceClientImpl.java`.
2. Remove deprecated methods from git client service.
3. Get rid of `DevMachine devMachine` parameter from all git client service methods.
4. Rework Git clent side to use streams and lambdas.
2017-07-04 11:25:18 +03:00
Thomas Mäder 9027aa4780 Ability to register language servers for file names instead of extensions #5107 (#5156)
* Register languages by file name

Signed-off-by: Thomas Mäder <tmader@redhat.com>
2017-07-03 17:18:25 +02:00
Igor Vinokur 4977d61383 CHE-5469: Fix group by folders view in commit dialog (#5504) 2017-07-03 06:49:19 +00:00
Mykola Morhun f0717e0ed2 CHE-5505: Fix NPE in DockerConnector (#5510) 2017-06-30 16:21:22 +03:00
Mykola Morhun aea7a7fe31 CHE-5503: Remove unnecessary stacktrace (#5506) 2017-06-30 11:29:38 +03:00
Mykola Morhun c7c1ee807c CODENVY-2285: Add registry host in log on snapshot deletion failure (#5500) 2017-06-29 17:00:10 +03:00