Skip to content

Commit

Permalink
Allow the use of ignoreVersionMismatch in non-dev configuration (#6347
Browse files Browse the repository at this point in the history
) (#6354)

Signed-off-by: Miki <[email protected]>
Co-authored-by: ZilongX <[email protected]>
(cherry picked from commit 6ab9065)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent fb86f6b commit 696c927
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/core/server/opensearch/opensearch_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,7 @@ export const configSchema = schema.object({
),
apiVersion: schema.string({ defaultValue: DEFAULT_API_VERSION }),
healthCheck: schema.object({ delay: schema.duration({ defaultValue: 2500 }) }),
ignoreVersionMismatch: schema.conditional(
schema.contextRef('dev'),
false,
schema.boolean({
validate: (rawValue) => {
if (rawValue === true) {
return '"ignoreVersionMismatch" can only be set to true in development mode';
}
},
defaultValue: false,
}),
schema.boolean({ defaultValue: false })
),
ignoreVersionMismatch: schema.boolean({ defaultValue: false }),
disablePrototypePoisoningProtection: schema.maybe(schema.boolean({ defaultValue: false })),
});

Expand Down Expand Up @@ -216,7 +204,7 @@ export class OpenSearchConfig {
public readonly healthCheckDelay: Duration;

/**
* Whether to allow opensearch-dashboards to connect to a non-compatible opensearch node.
* Whether to allow opensearch-dashboards to connect to an opensearch node of a different version.
*/
public readonly ignoreVersionMismatch: boolean;

Expand Down

0 comments on commit 696c927

Please sign in to comment.