airbyte
airbyte copied to clipboard
POST `/v1/jobs/get` responding with `Null` failureSummary even in case of Failed jobs.
Environment
- Airbyte version: 0.38.4-alpha
- OS Version / Instance: macOS, Ubuntu 18.04, AWS EC2
- Deployment: Docker
- Source Connector and version: source-snowflake:0.1.12
- Destination Connector and version: destination-csv:0.2.9 or destination-s3:0.3.5
- Step where error happened: Sync job
Current Behavior
Get Job api does not contain failureSummary even for failed job.
If credentials of snowflake instance are changed after successful creation of connection. The sync jobs fail due to invalid credentials. When we try to fetch failure details via v1/jobs/get, it does not contain any information about the errors that caused the failures.
Field failureSummary is set to null in job/get response.
Exception messages from net.snowflake.client.jdbc.SnowflakeSQLException exception are not captured in failureSummary json object of response.
Expected Behavior
We are polling job apis to capture and monitor the state and statistics of running, completed and failed jobs.
We expect the failed jobs to have meaningful details such as origin, type, externalMessage, internalMessage which are part of job response schema.
Clearly described failure details help us to guide our customer to resolve issues such as invalid credentials.
It much easier to parse and build alerts based on failure struture defined in your response schema.
"failureSummary": {
"failures": [
{
"failureOrigin": "source",
"failureType": "config_error",
"externalMessage": "string",
"internalMessage": "string",
"stacktrace": "string",
"retryable": false,
"timestamp": 0
}],
"partialSuccess": false
}
If above details are missing then It is very difficult to go through the java stacktrace which is a part of response and then identify the error strings associated with it. Also, looking through stack trace from api response log lines such as
2022-06-09 09:35:15 source > Exception in thread "main" net.snowflake.client.jdbc.SnowflakeSQLException: Incorrect username or password was specified.
2022-06-09 09:35:15 source > at net.snowflake.client.core.SessionUtil.newSession(SessionUtil.java:614)
2022-06-09 09:35:15 source > at net.snowflake.client.core.SessionUtil.openSession(SessionUtil.java:284)
2022-06-09 09:35:15 source > at net.snowflake.client.core.SFSession.open(SFSession.java:446)
2022-06-09 09:35:15 source > at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initialize(DefaultSFConnectionHandler.java:104)
2022-06-09 09:35:15 source > at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initializeConnection(DefaultSFConnectionHandler.java:79)
is not a efficient and definite approach.
Attached the logs and v1/job/get response.
Logs
Attached log of job
logs-16468.txt
Attached v1/job/get request and response. You can see failureSummary is null in attempts['attempt']
Req_Response_log.txt
Steps to Reproduce
- Create snowflake source with user/pass as credentials and s3 or csv destination (any simple destnation would do)
- Create connection to sync any table
- Change snowflake user or password so that credentials in source are now invalid.
- Trigger sync and note down sync job id.
- Check
v1/job/getfor that sync job. It would show failureSummary as null and you can see invalid username or password related error in java stacktrace in log lines which is difficult to parse by a code.
This issue is mostly visible when it encounters net.snowflake.client.jdbc.SnowflakeSQLException exception.
Are you willing to submit a PR?
Not yet.
@grishick @misteryeo Please check.
as far as I understand POST /v1/jobs/get is a request to OSS platform API (@evantahler am I understanding this correctly?)
Would you be able to upgrade to a newer version of the Airbyte platform? Since 0.38.4-alpha (mid-May) we've been spending time making our error messages better, and we do now show the stack trace (and more!) in those failureSummaries.
@evantahler That's a good thing !! I would definitely try newer version. Could you provide a stable version without any breaking changes in v1 apis ? We are on 0.38.4-alpha. I refer to https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html for api doc. We use following endpoints in our workflows:
/api/v1/jobs/get
/api/v1/destination_definitions/list
/api/v1/destinations/create
/api/v1/destinations/update
/api/v1/scheduler/sources/check_connection
/api/v1/scheduler/destinations/check_connection
/api/v1/source_definitions/list
/api/v1/sources/create
/api/v1/sources/update
/api/v1/sources/discover_schema
/api/v1/web_backend/connections/create
/api/v1/web_backend/connections/update
/api/v1/connections/sync
/api/v1/connections/delete
/api/v1/workspaces/create
/api/v1/workspaces/list
Hi @ameyabapat-bsft!
At the moment, we don't offer long-term support for our APIs, and we do regularly change them as we work on new features. However, you can see a list of what's changed in our changelogs. In the future, Airbyte Cloud will make available an API that's more stable. That said, the new features in the platform are probably worth the upgrade, and I don't think we've changed /too/ much in the past few months!
Closing, as our APIs now include failureSummary data
@evantahler yes, I tested with recent version and it contains the correct failureSummary. Thanks