mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-02 02:26:00 +00:00
* Fix(#9226): do not show error for public IP resolution * Add message when failure happens Co-authored-by: Sriharsha Chintalapani <harsha@getcollate.io>
This commit is contained in:
parent
a12f42d85e
commit
0aed07aeb8
@ -15,6 +15,7 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.ws.rs.core.Response;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.openmetadata.common.utils.CommonUtil;
|
||||
import org.openmetadata.schema.api.services.ingestionPipelines.TestServiceConnection;
|
||||
import org.openmetadata.schema.entity.services.ingestionPipelines.IngestionPipeline;
|
||||
@ -35,6 +36,7 @@ import org.openmetadata.service.exception.PipelineServiceVersionException;
|
||||
* to collect metadata, OpenMetadata to user metadata over APIs, etc.
|
||||
* </ul>
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class PipelineServiceClient {
|
||||
protected final URL serviceURL;
|
||||
protected final String username;
|
||||
@ -128,7 +130,11 @@ public abstract class PipelineServiceClient {
|
||||
return Map.of("ip", this.hostIp);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw PipelineServiceClientException.byMessage("Failed to get Pipeline Service host IP.", e.getMessage());
|
||||
LOG.error("Failed to get Pipeline Service host IP. {}", e.getMessage());
|
||||
return Map.of(
|
||||
"ip",
|
||||
"Failed to find the IP of Airflow Container. Please make sure https://api.ipify.org, "
|
||||
+ "https://api.my-ip.io/ip reachable from your network.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import Form from '@rjsf/antd';
|
||||
import CoreForm, { AjvError, FormProps, IChangeEvent } from '@rjsf/core';
|
||||
import { AxiosError } from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { isEmpty, startCase } from 'lodash';
|
||||
import { LoadingState } from 'Models';
|
||||
@ -23,7 +22,6 @@ import { getPipelineServiceHostIp } from '../../../axiosAPIs/ingestionPipelineAP
|
||||
import { ConfigData } from '../../../interface/service.interface';
|
||||
import { formatFormDataForRender } from '../../../utils/JSONSchemaFormUtils';
|
||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
import { Button } from '../../buttons/Button/Button';
|
||||
import { ArrayFieldTemplate } from '../../JSONSchemaTemplate/ArrayFieldTemplate';
|
||||
import { ObjectFieldTemplate } from '../../JSONSchemaTemplate/ObjectFieldTemplate';
|
||||
@ -71,7 +69,6 @@ const FormBuilder: FunctionComponent<Props> = ({
|
||||
setHostIp(data?.ip || '[unknown]');
|
||||
} catch (error) {
|
||||
setHostIp('[error - unknown]');
|
||||
showErrorToast(error as AxiosError);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user