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

[APM] Prevent imports of server in public code #76264

Open
cauemarcondes opened this issue Aug 31, 2020 · 5 comments
Open

[APM] Prevent imports of server in public code #76264

cauemarcondes opened this issue Aug 31, 2020 · 5 comments
Labels
Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture

Comments

@cauemarcondes
Copy link
Contributor

cauemarcondes commented Aug 31, 2020

Following this fix #67210, now we need to remove all server imports from the public code.

All files that import from apm/server in the public folder, such as:

https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx#L14-L15

An easy way to track it is find all files that disabled @kbn/eslint/no-restricted-paths rule.

@cauemarcondes cauemarcondes added [zube]: Inbox Team:APM All issues that need APM UI Team support labels Aug 31, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv
Copy link
Member

What's missing?

@cauemarcondes
Copy link
Contributor Author

What's missing?

In the public directory, we have a lot of direct imports from apm/server which the error are disabled by // eslint-disable-next-line @kbn/eslint/no-restricted-paths

@sorenlouv
Copy link
Member

Okay, can you update the description with an example - so it's clear what's missing.

@sorenlouv
Copy link
Member

sorenlouv commented Aug 31, 2020

Looks like it's mostly types being imported in the client from the server. I'm wondering if we can use type-only imports to signal to eslint that this is not a problem.

If not, I don't think we should make larger refactorings to accommodate an eslint rule. It's perfectly fine to import types across server/client boundaries.

@ogupte ogupte added technical debt Improvement of the software architecture and operational architecture [zube]: Backlog and removed [zube]: Inbox labels Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

4 participants