[Cross Cluster Replication] NP Shim#60121
Conversation
Updated the client code to properly encode requests to the server. Did first E2E test. Route tests are probably broken, need to fix them.
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
alisonelizabeth
left a comment
There was a problem hiding this comment.
Thanks for working on this @jloleysens!
I left a couple minor comments in the code. I also found two bugs that I think need to be addressed.
- I cannot edit a follower index and get the following error:
- It looks like the
Followerbadge is missing in Index Management. I checkedmaster, and it is working as expected, so I believe there was a regression in this PR.
| import { extractQueryParams } from '../services/query_params'; | ||
| import { getRemoteClusterName } from '../services/get_remote_cluster_name'; | ||
| import { API_STATUS } from '../constants'; | ||
| import { API_STATUS, INDEX_ILLEGAL_CHARACTERS_VISIBLE } from '../constants'; |
There was a problem hiding this comment.
I think you should be able to import INDEX_ILLEGAL_CHARACTERS_VISIBLE once #60186 is merged.
There was a problem hiding this comment.
Yeah I saw this guy coming up! I'll resolve once it is merged.
| import { ManagementAppMountParams } from '../../../../../../../../src/plugins/management/public'; | ||
|
|
||
| // @ts-ignore | ||
| import { BASE_PATH } from '../../../../common/constants'; |
There was a problem hiding this comment.
is this @ts-ignore needed?
There was a problem hiding this comment.
Nope! Placeholder from when it was a JS file!
| esBase = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}`; | ||
| }; | ||
|
|
||
| export const autoFollowPatternUrl = () => `${esBase}/ccr-put-auto-follow-pattern.html`; |
There was a problem hiding this comment.
nit: now that these are functions, maybe consider renaming to use a verb, e.g., getAutoFollowPatternUrl?
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| let esBase: () => string; |
There was a problem hiding this comment.
| let esBase: () => string; | |
| let esBase: string; |
|
|
||
| // @ts-ignore | ||
| import { pauseAutoFollowPattern, resumeAutoFollowPattern } from '../../store/actions'; | ||
| import { pauseAutoFollowPattern, resumeAutoFollowPattern } from '../../store/actions/index'; |
There was a problem hiding this comment.
is this change necessary?
There was a problem hiding this comment.
And by 👍 I mean no of course 😄
Also migrated to the a more NP friendly version of index mgmt extension.
|
@elasticmachine merge upstream |
|
@alisonelizabeth Thanks for taking a look!
Hmm, curious, I remember seeing this on the create and then I changed the request body to be a string. Perhaps I hadn't pushed that change - I am able to create and edit auto follow patterns and create follower indices (but not edit them, it looks disallowed by the UI). Would you mind taking another look?
Very well caught! It looks like I introduced a logic regression for the data enricher on the server side! Just pushed a fix 👍 |
|
@jloleysens thanks for fixing the issue with the badge, looks good now!
What do you mean by "it looks disallowed"? Maybe we have something set up differently? It is possible on my end, and I am still seeing the same error that I mentioned above. As you said, create/edit auto-follow patterns works as expected. |
|
@alisonelizabeth Ah ok I see, I was referring to the the greyed out text fields, but I see there is an advanced section that can be edited. |
alisonelizabeth
left a comment
There was a problem hiding this comment.
Latest changes LGTM. Thanks @jloleysens!
|
@elasticmachine merge upstream |
|
Waiting for #60186 to merge, will need to clean up duplication of ui/indices code |
|
@jloleysens I just merged #60186 |
…-cluster-replication * 'master' of github.com:elastic/kibana: (89 commits) Sort by name when fetching alerts and connectors (elastic#60506) Make slack param validation handle empty messages (elastic#60468) [Alerting] Adds navigation by consumer and alert type to alerting (elastic#58997) Introduce search interceptor (elastic#60523) [ML] Add functional tests for file data visualizer (elastic#60413) [APM] Optimize service map query (elastic#60412) [SIEM][Detection Engine] Adds lists feature flag and list values to the REST interfaces Enhancement/update esdocs datasource (elastic#59512) [junit] only include stdout in report for failures (elastic#60530) Update dependency nock to v12 (elastic#60422) upgrade execa to get stdout/stderr in error messages (elastic#60537) skip flaky suite (elastic#60471) [Ingest] Agent Config Details - Data sources list ui (elastic#60429) [SIEM] Create ML Rules (elastic#58053) skip flaky suite (elastic#60559) fix agent type (elastic#60554) Fixed default message for index threshold includes both threshold values (elastic#60545) [Ingest] Add support for `yaml` field types (elastic#60440) Solved the issue for a GROUP BY expression validation (elastic#60558) [Maps] Mark instance state as readonly (elastic#60557) ... # Conflicts: # x-pack/legacy/plugins/cross_cluster_replication/public/np_ready/app/components/auto_follow_pattern_form.js # x-pack/legacy/plugins/cross_cluster_replication/public/np_ready/app/components/follower_index_form/follower_index_form.js # x-pack/legacy/plugins/cross_cluster_replication/public/np_ready/app/components/follower_index_form/follower_index_form.test.js # x-pack/legacy/plugins/cross_cluster_replication/public/np_ready/app/services/auto_follow_pattern_validators.js # x-pack/legacy/plugins/cross_cluster_replication/public/np_ready/app/services/input_validation.js
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Public in WiP state, removed all 'ui/' imports * First iteration of public shimmed and working * A whole lotta WIP server side * Server-side to using the NP router + client side changes Updated the client code to properly encode requests to the server. Did first E2E test. Route tests are probably broken, need to fix them. * Removed unused error wrapping code * Update client Jest tests * Add breadcrumbs service mock * Fix server side Jest tests * Add helper functions file for server side Jest tests * Fix API integration tests * Fixed boolean logic mistake in due to refactor in index mgmt ext. Also migrated to the a more NP friendly version of index mgmt extension. * Remove unused import * Clean up some cruft and refactor URL variable names * Fix stringification of body and fix boolean server logic * Fix mocha Folder called __tests__ with Jest tests was breaking mocha. * Refactor to Jest test * Fix types issues in jest test * Migrate to new config-schema API Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Public in WiP state, removed all 'ui/' imports * First iteration of public shimmed and working * A whole lotta WIP server side * Server-side to using the NP router + client side changes Updated the client code to properly encode requests to the server. Did first E2E test. Route tests are probably broken, need to fix them. * Removed unused error wrapping code * Update client Jest tests * Add breadcrumbs service mock * Fix server side Jest tests * Add helper functions file for server side Jest tests * Fix API integration tests * Fixed boolean logic mistake in due to refactor in index mgmt ext. Also migrated to the a more NP friendly version of index mgmt extension. * Remove unused import * Clean up some cruft and refactor URL variable names * Fix stringification of body and fix boolean server logic * Fix mocha Folder called __tests__ with Jest tests was breaking mocha. * Refactor to Jest test * Fix types issues in jest test * Migrate to new config-schema API Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: [ML] Use a new ML endpoint to estimate a model memory (elastic#60376) [Logs UI] Correctly update the expanded log rate table rows (elastic#60306) fixes drag and drop flakiness (elastic#60625) Removing isEmptyState from embeddable input (elastic#60511) [Cross Cluster Replication] NP Shim (elastic#60121) Clear changes when canceling an edit to an alert (elastic#60518) Update workflow syntax (elastic#60626) Updating project assigner workflows to v2.0.0 of the action and back to default tokens (elastic#60577) migrate saved objects management edition view to react/typescript/eui (elastic#59490)




Summary
Initial shimming of Cross Cluster Replication.
Future Work (for move out of legacy)
Checklist
For maintainers