You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by cw...@apache.org on 2022/09/15 22:06:17 UTC
[druid] branch master updated: link to error docs (#13094)
This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 078b50ebe1 link to error docs (#13094)
078b50ebe1 is described below
commit 078b50ebe1951f113c96fe8e28290246028ab6b7
Author: Vadim Ogievetsky <va...@ogievetsky.com>
AuthorDate: Thu Sep 15 15:06:08 2022 -0700
link to error docs (#13094)
---
.../src/druid-models/workbench-query/workbench-query.ts | 7 -------
web-console/src/links.ts | 3 +++
.../__snapshots__/execution-error-pane.spec.tsx.snap | 7 ++++++-
.../execution-error-pane/execution-error-pane.tsx | 10 ++++++++--
4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/web-console/src/druid-models/workbench-query/workbench-query.ts b/web-console/src/druid-models/workbench-query/workbench-query.ts
index 4200874aaf..bf7ca26b29 100644
--- a/web-console/src/druid-models/workbench-query/workbench-query.ts
+++ b/web-console/src/druid-models/workbench-query/workbench-query.ts
@@ -576,13 +576,6 @@ export class WorkbenchQuery {
apiQuery.query = queryPrepend + apiQuery.query + queryAppend;
}
- const m = /(--:context\s.+)(?:\n|$)/.exec(apiQuery.query);
- if (m) {
- throw new Error(
- `This query contains a context comment '${m[1]}'. Context comments have been deprecated. Please rewrite the context comment as a context parameter. The context parameter editor is located in the "Engine" dropdown.`,
- );
- }
-
const ingestQuery = this.isIngestQuery();
if (!unlimited && !ingestQuery) {
apiQuery.context ||= {};
diff --git a/web-console/src/links.ts b/web-console/src/links.ts
index 4e1c7259e9..d9bd341d4f 100644
--- a/web-console/src/links.ts
+++ b/web-console/src/links.ts
@@ -63,6 +63,7 @@ export type LinkNames =
| 'DOCS_SQL'
| 'DOCS_RUNE'
| 'DOCS_API'
+ | 'DOCS_MSQ_ERROR'
| 'COMMUNITY'
| 'SLACK'
| 'USER_GROUP'
@@ -82,6 +83,8 @@ export function getLink(linkName: LinkNames): string {
return `${links.docsHref}/querying/querying.html`;
case 'DOCS_API':
return `${links.docsHref}/operations/api-reference.html`;
+ case 'DOCS_MSQ_ERROR':
+ return `${links.docsHref}/multi-stage-query/concepts.html#error-codes`;
case 'COMMUNITY':
return links.communityHref;
case 'SLACK':
diff --git a/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap b/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
index cf8bccd618..a1e518cb22 100644
--- a/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
+++ b/web-console/src/views/workbench-view/execution-error-pane/__snapshots__/execution-error-pane.spec.tsx.snap
@@ -8,7 +8,12 @@ exports[`ExecutionErrorPane matches snapshot 1`] = `
<p
className="error-message-text"
>
- TooManyWarnings:
+ <Memo(ExternalLink)
+ href="https://druid.apache.org/docs/latest/multi-stage-query/concepts.html#error-codes"
+ >
+ TooManyWarnings
+ </Memo(ExternalLink)>
+ :
Too many warnings of type CannotParseExternalData generated (max = 10)
</p>
<div>
diff --git a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
index da7e3173b3..b0368534cc 100644
--- a/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
+++ b/web-console/src/views/workbench-view/execution-error-pane/execution-error-pane.tsx
@@ -20,9 +20,10 @@ import { Callout } from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import React, { useState } from 'react';
-import { ClickToCopy } from '../../../components';
+import { ClickToCopy, ExternalLink } from '../../../components';
import { ShowValueDialog } from '../../../dialogs/show-value-dialog/show-value-dialog';
import { Execution } from '../../../druid-models';
+import { getLink } from '../../../links';
import { downloadQueryDetailArchive } from '../../../utils';
import './execution-error-pane.scss';
@@ -43,7 +44,12 @@ export const ExecutionErrorPane = React.memo(function ExecutionErrorPane(
return (
<Callout className="execution-error-pane" icon={IconNames.ERROR}>
<p className="error-message-text">
- {error.errorCode && <>{`${error.errorCode}: `}</>}
+ {error.errorCode && (
+ <>
+ <ExternalLink href={getLink('DOCS_MSQ_ERROR')}>{error.errorCode}</ExternalLink>
+ {': '}
+ </>
+ )}
{error.errorMessage || (exceptionStackTrace || '').split('\n')[0]}
{exceptionStackTrace && (
<>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org