Open d-walsh opened 1 week ago
None
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
sweepai/handlers/on_check_suite.py
✓ https://github.com/d-walsh/sweep/commit/4f946868fa4f120ac0a3fb6cb3e5a3060cef6c74 Edit
Modify sweepai/handlers/on_check_suite.py with contents: In the `run_dockerfile_config` function:
Replace this line:
build_command = f"docker build -t {image_name} -f {dockerfile_path} --build-arg CODE_PATH=. ."
With:
build_command = f"docker build -t {image_name} -f {dockerfile_path} --build-arg CODE_PATH={cloned_repo.repo_dir} {cloned_repo.repo_dir}"
This passes the cloned repository path as the CODE_PATH build argument and build context so the Dockerfile can access the local sweepai files.
Dockerfile specified in DOCKERFILE_CONFIG_LOCATION
✗ https://github.com/d-walsh/sweep/commit/4f946868fa4f120ac0a3fb6cb3e5a3060cef6c74 [Edit](https://github.com/d-walsh/sweep/edit/sweep/change_dockerfile_to_use_local_files_for/Dockerfile specified in DOCKERFILE_CONFIG_LOCATION)
Create Dockerfile specified in DOCKERFILE_CONFIG_LOCATION with contents: Replace the line that installs the sweepai package: ```docker RUN pip install sweepai ```
With the following lines to copy the local sweepai files and install from requirements.txt:
COPY sweepai /app/sweepai
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
This copies the sweepai directory from the build context (the repo) into the image, copies the requirements.txt, and installs the dependencies from it.
If the project uses Poetry and pyproject.toml instead of requirements.txt, use:
COPY sweepai /app/sweepai
COPY pyproject.toml /app/pyproject.toml
COPY poetry.lock /app/poetry.lock
RUN pip install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --no-ansi
I have finished reviewing the code for completeness. I did not find errors for sweep/change_dockerfile_to_use_local_files_for
.
💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
It looks like an issue has occurred around fetching the files. The exception was fetch_relevant_files() got multiple values for argument 'images'. If this error persists contact team@sweep.dev.
@d-walsh, editing this issue description to include more details will automatically make me relaunch. Please join our community forum for support (tracking_id=7056a2fce8)
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
Branch
No response