mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-16 19:28:21 +00:00
MINOR - Pass Airflow host on every failed /status call (#19022)
This commit is contained in:
parent
79b2888bb5
commit
15e64b5a12
@ -287,27 +287,30 @@ public class AirflowRESTClient extends PipelineServiceClient {
|
|||||||
if (response.statusCode() == 401 || response.statusCode() == 403) {
|
if (response.statusCode() == 401 || response.statusCode() == 403) {
|
||||||
return buildUnhealthyStatus(
|
return buildUnhealthyStatus(
|
||||||
String.format(
|
String.format(
|
||||||
"Authentication failed for user [%s] trying to access the Airflow APIs.",
|
"Authentication failed for user [%s] trying to access the Airflow APIs at [%s]",
|
||||||
this.username));
|
this.username, serviceURL.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// APIs URL not found
|
// APIs URL not found
|
||||||
if (response.statusCode() == 404) {
|
if (response.statusCode() == 404) {
|
||||||
return buildUnhealthyStatus(
|
return buildUnhealthyStatus(
|
||||||
String.format(
|
String.format(
|
||||||
"Airflow APIs not found. Please validate if the OpenMetadata Airflow plugin is installed correctly. %s",
|
"Airflow APIs not found at [%s]. Please validate if the OpenMetadata Airflow plugin is installed correctly. %s",
|
||||||
DOCS_LINK));
|
serviceURL.toString(), DOCS_LINK));
|
||||||
}
|
}
|
||||||
|
|
||||||
return buildUnhealthyStatus(
|
return buildUnhealthyStatus(
|
||||||
String.format(
|
String.format(
|
||||||
"Unexpected status response: code [%s] - [%s]",
|
"Unexpected status response at [%s]: code [%s] - [%s]",
|
||||||
response.statusCode(), response.body()));
|
serviceURL.toString(), response.statusCode(), response.body()));
|
||||||
|
|
||||||
} catch (IOException | URISyntaxException e) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
String exceptionMsg;
|
String exceptionMsg;
|
||||||
if (e.getMessage() != null) {
|
if (e.getMessage() != null) {
|
||||||
exceptionMsg = String.format("Failed to get Airflow status due to [%s].", e.getMessage());
|
exceptionMsg =
|
||||||
|
String.format(
|
||||||
|
"Failed to get Airflow status at [%s] due to [%s].",
|
||||||
|
serviceURL.toString(), e.getMessage());
|
||||||
} else {
|
} else {
|
||||||
exceptionMsg =
|
exceptionMsg =
|
||||||
String.format(
|
String.format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user