Eric Albanese
03/22/2024, 9:11 PMprefect-airbyte
lately? I think Airbyte deprecated an old API address endpoint for health checks that the package uses, and every execution fails because of itJack P
03/22/2024, 9:16 PMEric Albanese
03/22/2024, 9:17 PMashby_sync_connection = AirbyteConnection.load("airbyte-connection-ashby-core")
sync_result = run_connection_sync(airbyte_connection=ashby_sync_connection)
I get this error when trying to trigger
File "/Users/albanese/prefect/venv/lib/python3.10/site-packages/prefect_airbyte/client.py", line 58, in check_health_status
response.raise_for_status()
File "/Users/albanese/prefect/venv/lib/python3.10/site-packages/httpx/_models.py", line 761, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url '<https://airbyte.myserver.com:8006/api/v1/health/>'
I think what is wrong is that the Airbyte connection is creating a base URL of <https://airbyte.myserver.com:8006/api/v1/>
. However the Airbyte docs show the API address for a health check as <https://api.airbyte.com/health>
and lacks any sort of /api/v1
prefixJack P
03/22/2024, 9:18 PMJack P
03/22/2024, 9:20 PMEric Albanese
03/22/2024, 9:23 PMJack P
03/22/2024, 9:26 PMairbyte-connection-ashby-core
is wrong. Did you create that block in Prefect Cloud, and are loading it in basically?Eric Albanese
03/22/2024, 9:26 PMJack P
03/22/2024, 9:28 PMEric Albanese
03/22/2024, 9:29 PMAPI Version
part blank but then it returns an error of '404 Not Found' for url '<https://airbyte.xxx.com:8006/api//health/>'
with the api placeholder stillJack P
03/22/2024, 9:33 PMserver = AirbyteServer(
username=settings.AIRBYTE_USERNAME,
password=settings.AIRBYTE_PASSWORD,
server_host=server_host,
server_port=8000,
api_version="v1",
)
So v1 is right. but let's backup. You are receiving
File "/Users/albanese/prefect/venv/lib/python3.10/site-packages/prefect_airbyte/client.py", line 58, in check_health_status
response.raise_for_status()
File "/Users/albanese/prefect/venv/lib/python3.10/site-packages/httpx/_models.py", line 761, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url '<https://airbyte.myserver.com:8006/api/v1/health/>'
I feel like that makes sense though, unless you redacted it, which is totally fine/makes sense. Shouldn't myserver
be your VMs IP?Eric Albanese
03/22/2024, 9:34 PMJack P
03/22/2024, 9:36 PMEric Albanese
03/22/2024, 9:38 PM<http://10.xxxx/health>
works but <http://10.xxxx:8006/api/v1/health>
returns a 404 🤔Jack P
03/22/2024, 9:40 PMEric Albanese
03/22/2024, 9:40 PMJack P
03/22/2024, 9:40 PMJack P
03/22/2024, 9:41 PMEric Albanese
03/22/2024, 9:42 PMJack P
03/22/2024, 9:42 PMJack P
03/22/2024, 9:44 PMprefect_airbyte
and prefect
packages in a virtual environment?Eric Albanese
03/22/2024, 9:45 PMJack P
03/22/2024, 9:46 PMJack P
03/22/2024, 9:47 PMEric Albanese
03/22/2024, 9:51 PM(venv) ➜ prefect_airbyte git:(main) ✗ python flow_airbyte.py
14:50:09.100 | INFO | prefect.engine - Created flow run 'precise-myna' for flow 'airbyte-syncs'
14:50:09.102 | INFO | Flow run 'precise-myna' - View at <https://app.prefect.cloud/account/x>
14:50:10.670 | INFO | Flow run 'precise-myna' - Created subflow run 'mellow-rabbit' for flow 'run-connection-sync'
14:50:10.671 | INFO | Flow run 'mellow-rabbit' - View at <https://app.prefect.cloud/account/x>
14:50:11.213 | INFO | Flow run 'mellow-rabbit' - Created task run 'trigger-0' for task 'trigger'
14:50:11.214 | INFO | Flow run 'mellow-rabbit' - Executing 'trigger-0' immediately...
14:50:11.584 | INFO | Task run 'trigger-0' - Triggering Airbyte Connection f8e3d2e8-728a-46f2-8ef8-26300af0c1f1, in workspace at '<http://localhost:8000/api/v1>'
14:50:12.506 | INFO | Task run 'trigger-0' - Finished in state Completed()
14:50:12.696 | INFO | Flow run 'mellow-rabbit' - Created task run 'wait_for_completion-0' for task 'wait_for_completion'
14:50:12.697 | INFO | Flow run 'mellow-rabbit' - Executing 'wait_for_completion-0' immediately...
14:50:13.138 | INFO | Task run 'wait_for_completion-0' - running
Jack P
03/22/2024, 9:52 PMhttps://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNXo2eHRpa2d4aTl0OGd3M3BlYmk5YnJ1eGp[…]dSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/cnEXsCkEEhPWKoIgEL/giphy.gif▾
Jack P
03/22/2024, 9:53 PMEric Albanese
03/22/2024, 9:53 PM<http://localhost:8006/api/v1/health>
returns a 404Jack P
03/22/2024, 9:54 PM<http://localhost:8006/api/v1/health>
returns a 404
happens when you run in post man right? And just to clarify, you did replace localhost with your VM's/airbyte host IP right?Eric Albanese
03/22/2024, 9:55 PMJack P
03/22/2024, 9:56 PMEric Albanese
03/22/2024, 9:59 PMJack P
03/22/2024, 10:00 PMJack P
03/22/2024, 10:00 PMJack P
03/22/2024, 10:00 PMEric Albanese
03/22/2024, 10:00 PMJack P
03/22/2024, 10:00 PMEric Albanese
03/22/2024, 10:00 PMJack P
03/22/2024, 10:01 PM