Want to retrieve pr_reviewer.extra_instructions from S3 when running on Lambda
Feature request
When launching PR-Agent on Lambda, it's necessary to write extra_instructions in Lambda's environment variables. To update this, Lambda needs to be deployed and updated every time. I want to reduce this effort by retrieving a file from S3.
Motivation
I am creating a pipeline to deploy Lambda. I want to update Lambda and infrastructure resources only through this pipeline. Currently, I need to rebuild the Lambda container every time to update prompts, so I want to update resources in the simplest way possible. As one solution, I am considering managing prompts on S3.
:bulb: Auto-generated documentation-based answer:
This feature request is not currently addressed in the documentation. The user wants to retrieve pr_reviewer.extra_instructions from S3 when running PR-Agent on Lambda, instead of using environment variables that require redeployment.
Currently, the documentation shows that extra instructions can be configured through:
- Configuration files (
.pr_agent.toml) - Environment variables
- Command line parameters
For Lambda deployment, the documentation mentions using AWS Secrets Manager for sensitive configuration like API keys, but doesn't cover dynamic configuration retrieval from S3 for parameters like extra_instructions.
To implement this feature, you would need to:
- Modify the configuration loading mechanism to support S3 as a source
- Add S3 credentials and bucket configuration
- Implement S3 file retrieval in the configuration loader
This would be a valuable enhancement for Lambda deployments where you want to update prompts/instructions without redeploying the function.
Relevant Sources:
- https://qodo-merge-docs.qodo.ai//installation/github#deploy-as-a-lambda-function
- https://qodo-merge-docs.qodo.ai//usage-guide/additional_configurations#extra-instructions
- https://qodo-merge-docs.qodo.ai//tools/review#extra-instructions
- https://qodo-merge-docs.qodo.ai//usage-guide/configuration_options