mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 04:56:54 +00:00
* Fix #14590: Improve airflow plugin error message * Update openmetadata-service/src/main/java/org/openmetadata/service/clients/pipeline/airflow/AirflowRESTClient.java Co-authored-by: Ayush Shah <ayush@getcollate.io> * Update msg * Update RichTextEditorPreviewer in AirflowMessageBanner component --------- Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com>
This commit is contained in:
parent
2b62784e78
commit
dcd3d47c2b
@ -54,6 +54,8 @@ public class AirflowRESTClient extends PipelineServiceClient {
|
||||
private static final String TIMEOUT_KEY = "timeout";
|
||||
private static final String TRUSTSTORE_PATH_KEY = "truststorePath";
|
||||
private static final String TRUSTSTORE_PASSWORD_KEY = "truststorePassword";
|
||||
private static final String DOCS_LINK =
|
||||
"Follow [this guide](https://docs.open-metadata.org/deployment/ingestion/openmetadata) for further details.";
|
||||
|
||||
protected final String username;
|
||||
protected final String password;
|
||||
@ -292,7 +294,9 @@ public class AirflowRESTClient extends PipelineServiceClient {
|
||||
// APIs URL not found
|
||||
if (response.statusCode() == 404) {
|
||||
return buildUnhealthyStatus(
|
||||
"Airflow APIs not found. Please follow the installation guide.");
|
||||
String.format(
|
||||
"Airflow APIs not found. Please validate if the OpenMetadata Airflow plugin is installed correctly. %s",
|
||||
DOCS_LINK));
|
||||
}
|
||||
|
||||
return buildUnhealthyStatus(
|
||||
@ -301,12 +305,16 @@ public class AirflowRESTClient extends PipelineServiceClient {
|
||||
response.statusCode(), response.body()));
|
||||
|
||||
} catch (IOException | URISyntaxException e) {
|
||||
return buildUnhealthyStatus(
|
||||
String.format("Failed to get REST status due to [%s].", e.getMessage()));
|
||||
String exceptionMsg;
|
||||
if (e.getMessage() != null) {
|
||||
exceptionMsg = String.format("Failed to get Airflow status due to [%s].", e.getMessage());
|
||||
} else {
|
||||
exceptionMsg = "Failed to connect to Airflow.";
|
||||
}
|
||||
return buildUnhealthyStatus(String.format("%s %s", exceptionMsg, DOCS_LINK));
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return buildUnhealthyStatus(
|
||||
String.format("Failed to get REST status due to [%s].", e.getMessage()));
|
||||
return buildUnhealthyStatus(String.format("Failed to connect to Airflow. %s", DOCS_LINK));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,12 +10,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Space, SpaceProps, Typography } from 'antd';
|
||||
import { Space, SpaceProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, { FC } from 'react';
|
||||
import { ReactComponent as IconRetry } from '../../../assets/svg/ic-retry-icon.svg';
|
||||
import { useAirflowStatus } from '../../../hooks/useAirflowStatus';
|
||||
import RichTextEditorPreviewer from '../../common/RichTextEditor/RichTextEditorPreviewer';
|
||||
import './airflow-message-banner.less';
|
||||
|
||||
const AirflowMessageBanner: FC<SpaceProps> = ({ className }) => {
|
||||
@ -32,7 +33,10 @@ const AirflowMessageBanner: FC<SpaceProps> = ({ className }) => {
|
||||
data-testid="no-airflow-placeholder"
|
||||
size={16}>
|
||||
<IconRetry className="align-middle" height={24} width={24} />
|
||||
<Typography.Text>{reason}</Typography.Text>
|
||||
<RichTextEditorPreviewer
|
||||
enableSeeMoreVariant={false}
|
||||
markdown={reason ?? ''}
|
||||
/>
|
||||
</Space>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user