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

CHE-3720: Decouple different agents on different maven modules #3830

Merged
merged 8 commits into from
Jan 25, 2017

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Jan 20, 2017

What does this PR do?

Adds module per agent

What issues does this PR fix or reference?

#3720

Previous behavior

All agents are located in the same folder

Tests written?

Yes

Changelog

Decouple different agents on different maven modules

@tolusha tolusha added kind/task Internal things, technical debt, and to-do tasks to be performed. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Jan 20, 2017
@tolusha tolusha self-assigned this Jan 20, 2017
@skabashnyuk
Copy link
Contributor

Can you describe new folders structure?

@tolusha
Copy link
Contributor Author

tolusha commented Jan 20, 2017

agents
  ├── che-core-api-agent
  ├── che-core-api-agent-shared
  ├── exec
  ├── ls-csharp
  ├── ls-json
  ├── ls-php
  ├── ls-python
  ├── ls-typescript
  ├── unison
  ├── ssh
  │  ├── pom.xml
  │  └── src
  │      └── main
  │         ├── java
  │         │   └── org
  │         │       └── eclipse
  │         │           └── che
  │         │               └── api
  │         │                   └── agent
  │         │                       ├── SshAgent.java
  │         │                       ├── SshAgentLauncher.java
  │         │                       └── SshAgentDescriptorModule.java
  │         └── resources
  │             ├── org.eclipse.che.ssh.json
  │             └── org.eclipse.che.ssh.script.sh
  └── pom.xml

@tolusha
Copy link
Contributor Author

tolusha commented Jan 20, 2017

also:

wsagent
  ...
  ├── che-core-api-debug
  ├── che-core-api-debug-shared
  ├── che-core-api-git
  ├── che-core-api-git-shared
  ├── che-core-api-languageserver
  ├── che-core-api-languageserver-shared
  ├── che-core-api-project
  ├── che-core-api-project-shared
  ├── che-core-git-impl-jgit
  ├── pom.xml
  ├── agent
  │   ├── pom.xml
  │   └── src
  │       ├── main
  │       │   ├── java
  │       │   │   └── org
  │       │   │       └── eclipse
  │       │   │           └── che
  │       │   │               └── api
  │       │   │                   └── agent
  │       │   │                       ├── WsAgent.java
  │       │   │                       ├── WsAgentLauncher.java
  │       │   │                       └── WsAgentDescriptorModule.java
  │       │   └── resources
  │       │       ├── org.eclipse.che.ws-agent.json
  │       │       └── org.eclipse.che.ws-agent.script.sh
  │       └── test
  │           └── java
  │               └── org
  │                   └── eclipse
  │                       └── che
  │                           └── api
  │                               └── agent
  │                                   └── WsAgentLauncherTest.java
  └── wsagent-local

@TylerJewell
Copy link

That documentation helps. I think @skabashnyuk - at the same time that this is merged, the wiki needs to be updated with an explanation of how this modifies the development workflow. We have sections at the end of that wiki that explain the repository layout, and they need to be updated with this information.

@codenvy-ci
Copy link

@codenvy-ci
Copy link

Build # 1729 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1729/ to view the results.

@tolusha
Copy link
Contributor Author

tolusha commented Jan 23, 2017

@TylerJewell
Does it mean the structure it is ok for you?

@codenvy-ci
Copy link

@TylerJewell
Copy link

@tolusha - I think the code structure of /wsagent folder is really for @gazarenkov to comment on. The /agents folder is ok for me.

this.agentIds = ImmutableList.copyOf(this.agents.keySet());
public AgentRegistryImpl(Set<Agent> agents) throws IOException {
this.agents = new HashMap<>(agents.size());
agents.forEach(a -> this.agents.put(a.getId(), a));

Choose a reason for hiding this comment

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

Here it is possible that someone declared 2 equal agents.
If all of them have equals and hashcode then multibinder will throw an error.
If multibinder is declared anywhere with support of duplicates then it won't throw exception.
If equals and hashcode is not overridden or overridden in a different ways then here duplicate agent will override previous one.

* @author Anatolii Bazko
*/
@Singleton
public class LSCSharpAgent implements Agent {

Choose a reason for hiding this comment

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

Looks like all the agents are very similar. Please consider creation of abstract base class for them.

Copy link

@garagatyi garagatyi 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. Great job!
Please consider improvements I commented.

@tolusha tolusha removed the request for review from skabashnyuk January 24, 2017 11:11
@codenvy-ci
Copy link

@codenvy-ci
Copy link

@skabashnyuk
Copy link
Contributor

ok

@tolusha tolusha removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jan 25, 2017
@tolusha tolusha merged commit c8dafb9 into master Jan 25, 2017
@tolusha tolusha deleted the CHE-3720 branch January 25, 2017 18:42
@tolusha tolusha added this to the 5.2.0 milestone Jan 25, 2017
@JamesDrummond JamesDrummond mentioned this pull request Feb 6, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants