ferruzzi commented on code in PR #38693: URL: https://github.com/apache/airflow/pull/38693#discussion_r1552532744
########## tests/system/providers/amazon/aws/example_bedrock.py: ########## @@ -16,17 +16,61 @@ # under the License. from __future__ import annotations +import json from datetime import datetime +from botocore.exceptions import ClientError + +from airflow.decorators import task from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.providers.amazon.aws.operators.bedrock import BedrockInvokeModelOperator +from airflow.providers.amazon.aws.hooks.bedrock import BedrockHook +from airflow.providers.amazon.aws.operators.bedrock import ( + BedrockCustomizeModelOperator, + BedrockInvokeModelOperator, +) +from airflow.providers.amazon.aws.operators.s3 import ( + S3CreateBucketOperator, + S3CreateObjectOperator, + S3DeleteBucketOperator, +) +from airflow.providers.amazon.aws.sensors.bedrock import BedrockCustomizeModelCompletedSensor +from airflow.utils.trigger_rule import TriggerRule from tests.system.providers.amazon.aws.utils import SystemTestContextBuilder -sys_test_context_task = SystemTestContextBuilder().build() +# Externally fetched variables: +ROLE_ARN_KEY = "ROLE_ARN" +sys_test_context_task = SystemTestContextBuilder().add_variable(ROLE_ARN_KEY).build() DAG_ID = "example_bedrock" + +# Creating a custom model takes nearly two hours. If SKIP_LONG_TASKS is True then set Review Comment: Negative. That is the smallest possible job I can come up with (feeding the smallest model one datapoint to learn), there is no cancel command, and it can not be deleted until it is in a terminal state, whether that is a successful build or a failed job. -- 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]
