Skip to content

Commit d18f754

Browse files
authored
Fix Lambda canary sample app (#312)
*Description of changes:* Fix Lambda canary sample app By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent c214672 commit d18f754

File tree

3 files changed

+39
-41
lines changed

3 files changed

+39
-41
lines changed

.github/workflows/node-lambda-retry.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,22 @@ jobs:
3636
aws-region: ${{ inputs.aws-region }}
3737
caller-workflow-name: ${{ inputs.caller-workflow-name }}
3838

39-
# TODO: will publish metrics after data quality issue is fixed
40-
# publish-metric-attempt-1:
41-
# needs: [ node-lambda-attempt-1, node-lambda-attempt-2 ]
42-
# if: always()
43-
# uses: ./.github/workflows/enablement-test-publish-result.yml
44-
# secrets: inherit
45-
# with:
46-
# aws-region: ${{ inputs.aws-region }}
47-
# caller-workflow-name: ${{ inputs.caller-workflow-name }}
48-
# validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}
49-
#
50-
# publish-metric-attempt-2:
51-
# needs: [ node-lambda-attempt-1, node-lambda-attempt-2, publish-metric-attempt-1 ]
52-
# if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
53-
# uses: ./.github/workflows/enablement-test-publish-result.yml
54-
# secrets: inherit
55-
# with:
56-
# aws-region: ${{ inputs.aws-region }}
57-
# caller-workflow-name: ${{ inputs.caller-workflow-name }}
58-
# validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}
39+
publish-metric-attempt-1:
40+
needs: [ node-lambda-attempt-1, node-lambda-attempt-2 ]
41+
if: always()
42+
uses: ./.github/workflows/enablement-test-publish-result.yml
43+
secrets: inherit
44+
with:
45+
aws-region: ${{ inputs.aws-region }}
46+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
47+
validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}
48+
49+
publish-metric-attempt-2:
50+
needs: [ node-lambda-attempt-1, node-lambda-attempt-2, publish-metric-attempt-1 ]
51+
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
52+
uses: ./.github/workflows/enablement-test-publish-result.yml
53+
secrets: inherit
54+
with:
55+
aws-region: ${{ inputs.aws-region }}
56+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
57+
validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}

.github/workflows/python-lambda-retry.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,22 @@ jobs:
5959
otel-source: ${{ inputs.otel-source }}
6060
cpu-architecture: ${{ inputs.cpu-architecture }}
6161

62-
# TODO: will publish metrics after data quality issue is fixed
63-
# publish-metric-attempt-1:
64-
# needs: [ python-lambda-attempt-1, python-lambda-attempt-2 ]
65-
# if: always()
66-
# uses: ./.github/workflows/enablement-test-publish-result.yml
67-
# secrets: inherit
68-
# with:
69-
# aws-region: ${{ inputs.aws-region }}
70-
# caller-workflow-name: ${{ inputs.caller-workflow-name }}
71-
# validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}
72-
#
73-
# publish-metric-attempt-2:
74-
# needs: [ python-lambda-attempt-1, python-lambda-attempt-2, publish-metric-attempt-1 ]
75-
# if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
76-
# uses: ./.github/workflows/enablement-test-publish-result.yml
77-
# secrets: inherit
78-
# with:
79-
# aws-region: ${{ inputs.aws-region }}
80-
# caller-workflow-name: ${{ inputs.caller-workflow-name }}
81-
# validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}
62+
publish-metric-attempt-1:
63+
needs: [ python-lambda-attempt-1, python-lambda-attempt-2 ]
64+
if: always()
65+
uses: ./.github/workflows/enablement-test-publish-result.yml
66+
secrets: inherit
67+
with:
68+
aws-region: ${{ inputs.aws-region }}
69+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
70+
validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}
71+
72+
publish-metric-attempt-2:
73+
needs: [ python-lambda-attempt-1, python-lambda-attempt-2, publish-metric-attempt-1 ]
74+
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
75+
uses: ./.github/workflows/enablement-test-publish-result.yml
76+
secrets: inherit
77+
with:
78+
aws-region: ${{ inputs.aws-region }}
79+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
80+
validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}

terraform/python/lambda/lambda/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module "hello-lambda-function" {
1717

1818
architectures = compact([var.architecture])
1919
function_name = var.function_name
20-
handler = "index.handler"
20+
handler = "lambda_function.lambda_handler"
2121
runtime = var.runtime
2222

2323
create_package = false

0 commit comments

Comments
 (0)