potiuk commented on code in PR #24:
URL:
https://github.com/apache/airflow-site-archive/pull/24#discussion_r2439567946
##########
scripts/transfer_utils.py:
##########
@@ -167,3 +168,29 @@ def sort_priority_tuples(tuples: list[tuple[str, str]]) ->
list[tuple[str, str]]
sorted_tuples.append(tup)
tuples.remove(tup)
return sorted_tuples + sorted(tuples, key=lambda x: x[0])
+
+
+def get_cloudfront_distribution(destination_location: str):
+ if "live-docs" in destination_location:
+ return "E26P75MP9PMULE"
+ return "E197MS0XRJC5F3"
+
+def invalidate_cloudflare_cache(destination_location: str):
+ cloudfront_client = boto3.client("cloudfront")
Review Comment:
Cloudfront client is global :). It does not use region (always `us-east-1`
is used under the hood):
https://repost.aws/questions/QUM6TvAnMOQ8q8Ej_0-rh_pw/is-cloudfront-works-only-in-virginia-region-us-east-1
> Yes CloudFront is global but it considers us-east-1 as global region. The
ACM certificates must be imported from here and the same is distributed across
all geographic regions.
https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html
--
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]