Skip to content

Commit 4ea7469

Browse files
authored
Fix regions and add clarity in Lambda Layer release workflow (#458)
*Issue #, if available:* New regions were added to both `COMMERCIAL_REGIONS` and the default `aws_region` lists. From this PR, removing them from `COMMERCIAL_REGIONS` was missed: - #411 > The new regions should be added to the default list, not the commercial region env variable *Description of changes:* 1. Remove new regions from `COMMERCIAL_REGIONS` 2. Rename `COMMERCIAL_REGIONS` to `LEGACY_COMMERCIAL_REGIONS` 3. Add comments for clarity By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent d458cf8 commit 4ea7469

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/release-lambda.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ on:
1212
default: 'us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1'
1313

1414
env:
15-
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1
15+
# Legacy list of commercial regions to deploy to. New regions should NOT be added here, and instead should be added to the `aws_region` default input to the workflow.
16+
LEGACY_COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
1617
LAYER_NAME: AWSOpenTelemetryDistroPython
1718

1819
permissions:
@@ -63,21 +64,21 @@ jobs:
6364
steps:
6465
- name: role arn
6566
env:
66-
COMMERCIAL_REGIONS: ${{ env.COMMERCIAL_REGIONS }}
67+
LEGACY_COMMERCIAL_REGIONS: ${{ env.LEGACY_COMMERCIAL_REGIONS }}
6768
run: |
68-
COMMERCIAL_REGIONS_ARRAY=(${COMMERCIAL_REGIONS//,/ })
69+
LEGACY_COMMERCIAL_REGIONS_ARRAY=(${LEGACY_COMMERCIAL_REGIONS//,/ })
6970
FOUND=false
70-
for REGION in "${COMMERCIAL_REGIONS_ARRAY[@]}"; do
71+
for REGION in "${LEGACY_COMMERCIAL_REGIONS_ARRAY[@]}"; do
7172
if [[ "$REGION" == "${{ matrix.aws_region }}" ]]; then
7273
FOUND=true
7374
break
7475
fi
7576
done
7677
if [ "$FOUND" = true ]; then
77-
echo "Found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
78+
echo "Found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
7879
SECRET_KEY="LAMBDA_LAYER_RELEASE"
7980
else
80-
echo "Not found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
81+
echo "Not found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
8182
SECRET_KEY="${{ matrix.aws_region }}_LAMBDA_LAYER_RELEASE"
8283
fi
8384
SECRET_KEY=${SECRET_KEY//-/_}

0 commit comments

Comments
 (0)