-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify Cache Directory in Azure DevOps in Lambda Function Setup #450
Specify Cache Directory in Azure DevOps in Lambda Function Setup #450
Conversation
/describe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask, in general programming habits, the constant string is written in index or defined externally, how to make decisions?
Thank you for the question. I also believe that it should be defined externally. I think there are other ways as well:
Which method would be appropriate? |
Personally, I agree with the first one, but you can also listen to the owner. Does pr-agent have a division of owner CR? |
Thank you, I'll limit the updates to the Installation Guide for now. |
b95e75f
to
172b5f0
Compare
/describe |
/review |
PR Analysis
PR Feedback
How to use
|
@mrT23 Excuse me, may I ask how your Git Action above triggers PR Analysis work? 🌹 |
https://github.com/Codium-ai/pr-agent/blob/main/INSTALL.md#run-as-a-github-action if you are referring to the labels 'Review effort', see |
@koid |
@koid is this PR alive, or should I close it ? i repeat my question - how 'AZURE_DEVOPS_CACHE_DIR` is related to lambda function deployed on AWS ? |
I'm sorry, I noticed the mention late. In azure-devops, if the cache directory is not explicitly specified, it will be created under the home directory of the executing user. In the case of AWS Lambda, the executing user does not have write permissions for the home directory, leading to a failure in creating the cache directory. To address this issue, instructions on specifying a path where the executing user has write permissions as the cache directory are added to the README. |
@koid Maybe it is a very specific use case, but it is not a general instruction for any AWS lambda . Share a more logical and coherent instruction in order for it to be merged |
This is not a specific use case but a common limitation in Lambda. https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-reqs
As a prerequisite, in AWS Lambda, writable directories are restricted to those under /tmp. (Directories other than /tmp are treated as read-only.) The pr-agent supports Azure DevOps as a git provider, but the Azure DevOps library requires write permissions to local storage for caching purposes. When importing azure.devops.connection.Connection, the https://github.com/microsoft/azure-devops-python-api/blob/7.1.0b3/azure-devops/azure/devops/connection.py#L9 If the import of the
To avoid this, you need to specify AZURE_DEVOPS_CACHE_DIR to a writable directory (or you can specify it to /tmp, which is a writable directory under HOME) as a workaround. -- Perhaps, in terms of chronology, Lambda support was added first (#92), followed by the Azure DevOps Provider support (#265), which might explain why the Lambda specifications were not taken into consideration during #265. |
@koid i will add a link to that explanation in the readme, since without it, it won't be clear how the things are connected |
…y-in-azure-devops Specify Cache Directory in Azure DevOps in Lambda Function Setup
PR Type:
Documentation
PR Description:
This PR updates the documentation to include an additional step in the Lambda function setup process. The new step instructs users to specify the
AZURE_DEVOPS_CACHE_DIR
environment variable in the Lambda function to a writable location such as /tmp. This change is in response to issue #443.PR Main Files Walkthrough:
files:
INSTALL.md
: Added a new step in the Lambda function setup process instructing users to specify theAZURE_DEVOPS_CACHE_DIR
environment variable to a writable location. The step numbering was also updated accordingly.