You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/05/07 13:48:22 UTC

[airflow-ci-infra] branch use-us-east-2-asg updated (4c8feeb -> 8fd1e05)

This is an automated email from the ASF dual-hosted git repository.

ash pushed a change to branch use-us-east-2-asg
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git.


 discard 4c8feeb  Use the cheaper ASG in Ohio
     new 8fd1e05  Use the cheaper ASG in Ohio

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4c8feeb)
            \
             N -- N -- N   refs/heads/use-us-east-2-asg (8fd1e05)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lambdas/scale_out_runner/app.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

[airflow-ci-infra] 01/01: Use the cheaper ASG in Ohio

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch use-us-east-2-asg
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git

commit 8fd1e05d33c461441f0b2c458fa52f4c8ed57232
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Fri May 7 14:47:32 2021 +0100

    Use the cheaper ASG in Ohio
---
 lambdas/scale_out_runner/.chalice/config.json | 3 ++-
 lambdas/scale_out_runner/app.py               | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lambdas/scale_out_runner/.chalice/config.json b/lambdas/scale_out_runner/.chalice/config.json
index bd29d8c..669f935 100644
--- a/lambdas/scale_out_runner/.chalice/config.json
+++ b/lambdas/scale_out_runner/.chalice/config.json
@@ -11,7 +11,8 @@
       "iam_policy_file": "prod_iam.json",
       "environment_variables": {
         "GH_WEBHOOK_TOKEN_ENCRYPTED": "AQICAHg1MGVq8MAqYXSkkgy6iL19KSI14nJw8DelmHFuRpAfvQEh/mniWicOD0N1aVuHhp+VAAAAfDB6BgkqhkiG9w0BBwagbTBrAgEAMGYGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMVqkAu70BaR2rDQ4qAgEQgDlIAxDrBlblL6XNKkJIs+zrNEMcGpS68JnoVh2s1oKEzbBXzYS16/9ZrW9CwUV4ULAd2EsGb90iz74=",
-        "ACTIONS_SQS_URL": "https://sqs.eu-central-1.amazonaws.com/827901512104/actions-runner-requests"
+        "ASG_NAME": "RunnerASG",
+        "ASG_REGION_NAME": "us-east-2"
       }
     }
   },
diff --git a/lambdas/scale_out_runner/app.py b/lambdas/scale_out_runner/app.py
index 2f40fb1..a02b341 100644
--- a/lambdas/scale_out_runner/app.py
+++ b/lambdas/scale_out_runner/app.py
@@ -30,6 +30,7 @@ app = Chalice(app_name='scale_out_runner')
 app.log.setLevel(logging.INFO)
 
 ASG_GROUP_NAME = os.getenv('ASG_NAME', 'AshbRunnerASG')
+ASG_REGION_NAME = os.getenv('ASG_REGION_NAME', None)
 TABLE_NAME = os.getenv('COUNTER_TABLE', 'GithubRunnerQueue')
 _commiters = set()
 GH_WEBHOOK_TOKEN = None
@@ -177,7 +178,7 @@ def increment_dynamodb_counter(delta: int = 1) -> int:
 
 
 def scale_asg_if_needed(num_queued_jobs: int) -> dict:
-    asg = boto3.client('autoscaling')
+    asg = boto3.client('autoscaling', region_name=ASG_REGION_NAME)
 
     resp = asg.describe_auto_scaling_groups(
         AutoScalingGroupNames=[ASG_GROUP_NAME],