Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FivetranOperatorAsync waits forever in case of reschedule #21

Closed
joshzana opened this issue Mar 21, 2023 · 6 comments · Fixed by #25
Closed

FivetranOperatorAsync waits forever in case of reschedule #21

joshzana opened this issue Mar 21, 2023 · 6 comments · Fixed by #25
Assignees

Comments

@joshzana
Copy link

joshzana commented Mar 21, 2023

We ran into a case where we triggered a Fivetran sync of Hubspot and it hit a Hubspot API error:

From the fivetran logs:

{
  "event" : "warning",
  "data" : {
    "type" : "retry_api_call",
    "message" : "Retrying last failed API call after 78 seconds, Reason :HTTP 500 Internal Server Error"
  },
  "created" : "2023-03-20T20:01:14.545Z",
  "connector_type" : "hubspot",
  "connector_id" : "feeling_against",
  "connector_name" : "hubspot_fivetran",
  "sync_id" : "c316efc5-92a6-46a9-b759-60dbe5972b27"
}

and later:

{
  "event" : "status",
  "data" : {
    "status" : "RESCHEDULED",
    "reason" : "Rescheduled for 2023-03-20T20:54:53.894Z, reason: Rescheduled the sync due to server error",
    "rescheduledAt" : "2023-03-20T20:54:54.041Z"
  },
  "created" : "2023-03-20T20:25:47.512Z",
  "connector_type" : "hubspot",
  "connector_id" : "feeling_against",
  "connector_name" : "hubspot_fivetran",
  "sync_id" : "c316efc5-92a6-46a9-b759-60dbe5972b27"
}

According to fivetran docs:

Fivetran reschedules syncs in two situations:
Fivetran has reached the request limit for your application's API.
Fivetran has exceeded the set number of API calls we have provisioned for your connector.
In either rescheduling scenario, the sync automatically pauses and resumes the following day, once the daily API limit has > been restored.

In our case, the triggerer on our end just kept polling forever. Almost a day later, we noticed this, and cancelled the run, letting the next run trigger again.

It would be better if the fivetran sensor failed the task right away, and then we could use our own retry or schedule logic to decide what to do from there.

@phanikumv phanikumv self-assigned this Mar 31, 2023
@pbhuss
Copy link

pbhuss commented Apr 5, 2023

Related PR on the package the async operator is derived from
fivetran/airflow-provider-fivetran#69

@LukaDevic
Copy link

Partial implementation can be found in package from which provider is derived from:
https://github.com/fivetran/airflow-provider-fivetran/pull/76/files

@phanikumv phanikumv assigned sunank200 and unassigned phanikumv May 19, 2023
@phanikumv
Copy link
Contributor

@sunank200 can you please work on this during next week

@joshzana
Copy link
Author

Thank you for fixing! Any idea when we can get a pypi release with this fix in it?

@phanikumv
Copy link
Contributor

@joshzana we plan to do a release tomorrow

@sunank200
Copy link
Contributor

@joshzana we just did a release now. Please check:https://pypi.org/project/airflow-provider-fivetran-async/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants