Repository: PrefectHQ/prefect

Issue:
`AirbyteConnectionTask.run()` requires parameters that should be optional
## Description
<!-- A clear description of the bug -->
Some parameters that IMO should be optional in `AirbyteConnectionTask.run()` are required, forcing user to pass eg. `airbyte_server_host` in each task run rather than allowing this to be set up once for all syncs:


![image](https://user-images.githubusercontent.com/23084949/146691402-0b15995a-b93b-479a-815c-5a1006427182.png)



## Expected Behavior
<!-- What did you expect to happen instead? -->
I expect that these parameters could be set up at task initialization, as per below example.



## Reproduction
<!-- A minimal example that exhibits the behavior. -->
```python
from datetime import timedelta

from prefect import Flow, Parameter
from prefect.run_configs.docker import LocalRun
from prefect.storage.local import Local
from prefect.tasks.airbyte.airbyte import AirbyteConnectionTask

sync_airbyte_connection = AirbyteConnectionTask(
    airbyte_server_host="localhost",
    airbyte_server_port=8000,
    airbyte_api_version="v1",
    max_retries=3,
    retry_delay=timedelta(seconds=10)
)

with Flow("test", storage=Local(), run_config=LocalRun()) as flow:
    # Airbyte connection strings
    airbyte_poke_connection_id = Parameter("AIRBYTE_POKE_CONNECTION_ID")

    # Sync Poke API
    airbyte_poke_sync = sync_airbyte_connection(connection_id=airbyte_poke_connection_id)

flow.run(AIRBYTE_POKE_CONNECTION_ID="YOUR_POKE_CONNECTION_ID")
```



Discussion:
I can fix this since I need to improve the task's logging anyway.

Resolving patch:
diff --git a/src/prefect/tasks/airbyte/airbyte.py b/src/prefect/tasks/airbyte/airbyte.py
--- a/src/prefect/tasks/airbyte/airbyte.py
+++ b/src/prefect/tasks/airbyte/airbyte.py
@@ -95,6 +95,8 @@ def _get_connection_status(self, session, airbyte_base_url, connection_id):
             )
             self.logger.info(response.json())
 
+            response.raise_for_status()
+
             # check whether a schedule exists ...
             schedule = response.json()["schedule"]
             if schedule:
@@ -189,10 +191,10 @@ def _get_job_status(self, session, airbyte_base_url, job_id):
     )
     def run(
         self,
-        airbyte_server_host: str,
-        airbyte_server_port: int,
-        airbyte_api_version: str,
-        connection_id: str,
+        airbyte_server_host: str = None,
+        airbyte_server_port: int = None,
+        airbyte_api_version: str = None,
+        connection_id: str = None,
         poll_interval_s: int = 15,
     ) -> dict:
         """


Test patch:
diff --git a/tests/tasks/airbyte/test_airbyte.py b/tests/tasks/airbyte/test_airbyte.py
--- a/tests/tasks/airbyte/test_airbyte.py
+++ b/tests/tasks/airbyte/test_airbyte.py
@@ -21,6 +21,17 @@ def test_connection_id_must_be_provided(self):
         with pytest.raises(ValueError):
             task.run()
 
+    def test_optional_params_are_optional(self):
+        task = AirbyteConnectionTask(
+            connection_id="749c19dc-4f97-4f30-bb0f-126e53506960"
+        )
+        try:
+            task.run()
+        except ValueError as err:
+            assert False, str(err)
+        except Exception:
+            pass
+
     def test_invalid_connection_id(self):
         task = AirbyteConnectionTask()
         with pytest.raises(ValueError):