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

fix no-restricted-imports #195456

Merged
merged 19 commits into from
Oct 15, 2024
Merged

fix no-restricted-imports #195456

merged 19 commits into from
Oct 15, 2024

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Oct 8, 2024

Summary

I noticed that our no-restricted-imports rules were not working on some parts of the codebase. Turns our the rule was overriden by mistake. This PR fixes the rules and places that were not following them:

  • lodash set for safety cc @elastic/kibana-security
  • react-use for a bit smaller bundles
  • router for context annoncement (useExecutionContext) and hopefully easier upgrade to newer version

cc @elastic/kibana-operations

@Dosant Dosant changed the title fix eslint import restrictions fix no-restricted-imports Oct 9, 2024
@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 9, 2024
@Dosant Dosant marked this pull request as ready for review October 9, 2024 14:20
@Dosant Dosant requested review from a team as code owners October 9, 2024 14:20
@Dosant
Copy link
Contributor Author

Dosant commented Oct 9, 2024

@elasticmachine merge upstream

Copy link
Contributor

@bhapas bhapas left a comment

Choose a reason for hiding this comment

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

Integration Assistant plugin LGTM

Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

Defend Workflows code changes LGTM 🚀 Thanks!

Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@szaffarano szaffarano left a comment

Choose a reason for hiding this comment

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

Security Data Analytics
LGTM 🚀

Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

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

thank you! 🙇

Copy link
Contributor

@jaredburgettelastic jaredburgettelastic left a comment

Choose a reason for hiding this comment

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

Entity Analytics changes LGTM

@Dosant
Copy link
Contributor Author

Dosant commented Oct 15, 2024

@elasticmachine merge upstream

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you Anton!

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 15, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: f80d6a3
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-195456-f80d6a3b0d68

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
integrationAssistant 579 451 -128
securitySolution 6017 5903 -114
synthetics 1154 1032 -122
total -364

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
integrationAssistant 961.0KB 878.4KB -82.6KB
securitySolution 20.8MB 20.4MB -385.8KB
synthetics 1.2MB 1.1MB -79.2KB
total -547.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
integrationAssistant 10.3KB 10.4KB +116.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 546 549 +3
synthetics 52 53 +1
total +4

Total ESLint disabled count

id before after diff
securitySolution 631 634 +3
synthetics 58 59 +1
total +4

History

@Dosant Dosant merged commit 1055120 into elastic:main Oct 15, 2024
54 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11345505432

@Dosant
Copy link
Contributor Author

Dosant commented Oct 16, 2024

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Dosant added a commit to Dosant/kibana that referenced this pull request Oct 16, 2024
## Summary

I noticed that our `no-restricted-imports` rules were not working on
some parts of the codebase. Turns our the rule was overriden by mistake.
This PR fixes the rules and places that were not following them:

- lodash set for safety
- react-use for a bit smaller bundles
- router for context annoncement (`useExecutionContext`) and hopefully
easier upgrade to newer version

(cherry picked from commit 1055120)

# Conflicts:
#	.github/CODEOWNERS
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 16, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

Dosant added a commit that referenced this pull request Oct 17, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [fix `no-restricted-imports`
(#195456)](#195456)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-15T11:55:53Z","message":"fix
`no-restricted-imports` (#195456)\n\n## Summary\r\n\r\nI noticed that
our `no-restricted-imports` rules were not working on\r\nsome parts of
the codebase. Turns our the rule was overriden by mistake.\r\nThis PR
fixes the rules and places that were not following them:\r\n\r\n- lodash
set for safety\r\n- react-use for a bit smaller bundles\r\n- router for
context annoncement (`useExecutionContext`) and hopefully\r\neasier
upgrade to newer
version","sha":"1055120d0f4640af67881b4909d4881681d9575d","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"number":195456,"url":"https://github.com/elastic/kibana/pull/195456","mergeCommit":{"message":"fix
`no-restricted-imports` (#195456)\n\n## Summary\r\n\r\nI noticed that
our `no-restricted-imports` rules were not working on\r\nsome parts of
the codebase. Turns our the rule was overriden by mistake.\r\nThis PR
fixes the rules and places that were not following them:\r\n\r\n- lodash
set for safety\r\n- react-use for a bit smaller bundles\r\n- router for
context annoncement (`useExecutionContext`) and hopefully\r\neasier
upgrade to newer
version","sha":"1055120d0f4640af67881b4909d4881681d9575d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195456","number":195456,"mergeCommit":{"message":"fix
`no-restricted-imports` (#195456)\n\n## Summary\r\n\r\nI noticed that
our `no-restricted-imports` rules were not working on\r\nsome parts of
the codebase. Turns our the rule was overriden by mistake.\r\nThis PR
fixes the rules and places that were not following them:\r\n\r\n- lodash
set for safety\r\n- react-use for a bit smaller bundles\r\n- router for
context annoncement (`useExecutionContext`) and hopefully\r\neasier
upgrade to newer
version","sha":"1055120d0f4640af67881b4909d4881681d9575d"}}]}]
BACKPORT-->

---------

Co-authored-by: Elastic Machine <[email protected]>
@kibanamachine kibanamachine added v8.17.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.