-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Consolidate react-hooks/exhaustive-deps lint rules for O11y #184865
Consolidate react-hooks/exhaustive-deps lint rules for O11y #184865
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
50be82f
to
7bdf023
Compare
/ci |
7bdf023
to
8ab5a41
Compare
@elasticmachine merge upstream |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a few questions.
}) => { | ||
const model = findInventoryModel('host'); | ||
const model = useMemo(() => findInventoryModel('host'), []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we move this into useAsync
instead?
decimals: 1, | ||
subtitle: getSubtitle(options, chart), | ||
subtitle: getSubtitle ? getSubtitle(chart.value) : getSubtitleFromFormula(chart.value), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 !
// FIXME: this should be memoized upstream, but Dario | ||
// cannot find a reasonable fix, so he'll just leave | ||
// this in place. | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [params.chartType, params.dataset, dataViews, lens]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: dgieselaar#56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this!
[apiKeyEncoded, onboardingId, installShipperSetupStatus === FETCH_STATUS.SUCCESS] | ||
// FIXME: Dario could not find a reasonable fix for successfullyInstalledShipperSetup | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
[apiKeyEncoded, onboardingId, successfullyInstalledShipperSetup] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it stop complaining if you add successfullyInstalledShipperSetup
to the if
inside this useFetcher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah, it will then complain that it's not in the list of dependencies - it's a behavioral change as well which I would like to avoid to some extent.
@@ -24,14 +24,17 @@ export const PolicyLink = ({ name }: { name: string }) => { | |||
|
|||
const { data } = useFetcher(async () => { | |||
return ilmLocator?.getLocation({ page: 'policy_edit', policyName: name }); | |||
// FIXME: Dario thinks there is a better way to do this but | |||
// he's getting tired and maybe the Synthetics folks can fix it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 !
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Canvas Sharable Runtime
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Though
I tried removing all your comments in the file x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx
. and ran
node scripts/type_check.js --project /Users/achyutjhunjhunwala/Workspace/tug_kibana/kibana/x-pack/plugins/observability_solution/observability_onboarding/tsconfig.json
It gave no errors
@achyutjhunjhunwala you're running a type check 😄 this is a lint rule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…184865) Use one react-hooks/exhaustive-deps across our Obs plugins, for consistency reasons. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Use one react-hooks/exhaustive-deps across our Obs plugins, for consistency reasons.