vincbeck commented on code in PR #49804:
URL: https://github.com/apache/airflow/pull/49804#discussion_r2063306481
##########
providers/amazon/tests/system/amazon/aws/example_google_api_youtube_to_s3.py:
##########
@@ -73,28 +72,34 @@
YOUTUBE_VIDEO_FIELDS = "items(id,snippet(description,publishedAt,tags,title))"
SECRET_ARN_KEY = "SECRET_ARN"
+API_SERVER_URL_KEY =
"ECS_example_google_api_youtube_to_s3_ExecutionApiServerUrl"
Review Comment:
I am not sure this is valid and I wonder how it could work. We might want to
talk about it with @o-nikolas but I think we should:
- save the execution api endpoint in the same SSM parameter used to stored
system test external parameters. Use the same key across all system test, e.g.
`API_SERVER_URL`
- Update this line to `API_SERVER_URL_KEY = "API_SERVER_URL"`
##########
devel-common/src/tests_common/test_utils/api_client_helpers.py:
##########
@@ -49,3 +56,24 @@ def generate_access_token(username: str, password: str,
host: str) -> str:
assert access_token, f"Failed to get JWT token from redirect url {url}
with status code {login_response}"
return access_token
+
+
+def make_authenticated_rest_api_request(
+ path: str,
+ method: str,
+ body: dict | None = None,
+ api_username: str = "admin",
+ api_password: str = "admin",
+ api_server_url: str | None = None,
+):
+ if not api_server_url:
+ api_server_url = conf.get("api", "base_url",
fallback="http://localhost:8080")
+ api_server_url = api_server_url.rstrip("/")
+ token = generate_access_token(api_username, api_password, api_server_url)
Review Comment:
As mentioned in Slack, we might want to set `export
AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_ALL_ADMINS="True"` in AWS CI and call the
Airflow API with no credentials. That would simplify things
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]