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

Reorganize GMS factory namespace #1658

Closed
mars-lan opened this issue May 5, 2020 · 4 comments · Fixed by #1916
Closed

Reorganize GMS factory namespace #1658

mars-lan opened this issue May 5, 2020 · 4 comments · Fixed by #1916
Assignees
Labels
feature-request Request for a new feature to be added
Projects

Comments

@mars-lan
Copy link
Contributor

mars-lan commented May 5, 2020

Is your feature request related to a problem? Please describe.
With the current directory layout, factories for new entities will likely to end up in a brand new namespace and requires editing of https://github.com/linkedin/datahub/blob/master/gms/war/src/main/webapp/WEB-INF/beans.xml#L7 in order to be scanned correctly. See #1656 for an example.

Describe the solution you'd like
All factories should share a common namespace, e.g. com.linkedin.metadata.factories, similar to the rest.li resources (com.linkedin.metadata.resources) so they can be automatically picked up from the DI framework.

@mars-lan mars-lan added the feature-request Request for a new feature to be added label May 5, 2020
@mars-lan
Copy link
Contributor Author

mars-lan commented May 5, 2020

Another option is to use the @ComponentScan annotation instead of manually specifying the package in beans.xml: https://www.baeldung.com/spring-component-scanning

@liangjun-jiang
Copy link
Contributor

I just went through the whole process and am able to get it working. I am about to detail the process, and send a PR.

@mars-lan
Copy link
Contributor Author

mars-lan commented May 6, 2020

@loftyet thanks! Look forward to the PR. Feel free to expand https://github.com/linkedin/datahub/blob/master/docs/how/entity-onboarding.md.

@mars-lan
Copy link
Contributor Author

@liangjun-jiang are you still working on that PR or do you want us to do the refactoring?

@mars-lan mars-lan added this to To do in DataHub Jul 31, 2020
mars-lan pushed a commit to mars-lan/datahub that referenced this issue Oct 6, 2020
mars-lan pushed a commit to mars-lan/datahub that referenced this issue Oct 6, 2020
@mars-lan mars-lan assigned mars-lan and unassigned jywadhwani Oct 6, 2020
mars-lan pushed a commit to mars-lan/datahub that referenced this issue Oct 6, 2020
mars-lan pushed a commit to mars-lan/datahub that referenced this issue Oct 6, 2020
@mars-lan mars-lan moved this from To do to Review in progress in DataHub Oct 6, 2020
DataHub automation moved this from Review in progress to Done Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature to be added
Projects
DataHub
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants