Skip to content

[WIP] Add L2 CRCR deployment configuration#446

Draft
can-gaa-hou wants to merge 2 commits intopytorch:mainfrom
can-gaa-hou:crcr-l2
Draft

[WIP] Add L2 CRCR deployment configuration#446
can-gaa-hou wants to merge 2 commits intopytorch:mainfrom
can-gaa-hou:crcr-l2

Conversation

@can-gaa-hou
Copy link
Copy Markdown
Contributor

@can-gaa-hou can-gaa-hou commented Apr 15, 2026

Summary

This PR is an extension of L1 (#433), and it only adds another AWS Lambda function and some environment variables for handling result callbacks from DownStream CI. It is also associated with L2 implementation (pytorch/test-infra#7967) and should only be merged after L2 implementation is completed.

File to change

.github/workflows/
├── crcr-on-pr.yml                  # Add result callback environment variables
└── crcr-deploy-prod.yml            # Add result callback environment variables
crcr/
├── Terrafile                       # Add result callback zip file download from test-infra
└── aws/ 
    ├── variables.tf                # Add result callback environment variables
    ├── outputs.tf                  # Add result callback AWS Lambda function
    ├── secrets.tf                  # Add result callback secrets
    └──result.tf                    # Add result callback AWS Lambda function configuration

Test

Multiple deployments and verifications have been completed on a personal AWS environment.

cc @fffrog

Comment thread crcr/aws/result.tf Outdated
role = aws_iam_role.lambda.arn

runtime = "python3.13"
handler = "lambda_function.lambda_handler"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @can-gaa-hou and @fffrog,
The handler path should be callback.lambda_function.lambda_handler, not lambda_function.lambda_handler. The callback Makefile packages the zip as deployment/callback/lambda_function.py, so lambda_function.py is inside the callback/ directory, not at the zip root. The README in test-infra PR #7967 also confirms this: "Callback Lambda: callback.lambda_function.lambda_handler". As-is, this would cause a ModuleNotFoundError at runtime.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed.

@fffrog fffrog self-requested a review April 27, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants