Skip to content
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

Misleading error message about not being able to access the repository #1236

Open
iuliaturc opened this issue Feb 1, 2025 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@iuliaturc
Copy link

iuliaturc commented Feb 1, 2025

Description

I'm running patchflow GenerateREADME on a repo where I have write permissions (but I'm not an admin). At the end of the run, I'm getting a message saying that "Step CreatePR failed", but it's not true -- the PR does get successfully created. So I'm not sure where the 404 is coming from, but everything worked fine from what I can tell.

Full message:

Patchflow GenerateREADME loaded from patchwork.patchflows                                                                      
╭────────────────────────────────────────────── Patchflow GenerateREADME inputs ──────────────────────────────────────────────╮
│ Run started CallCode2Prompt                                                                                                 │
│ Run completed CallCode2Prompt                                                                                               │
│ Run started LLM                                                                                                             │
│ Run started PreparePrompt                                                                                                   │
│ Run completed PreparePrompt                                                                                                 │
│ Run started CallLLM                                                                                                         │
│ Step CallLLM message: Response truncated because of finish reason = length.                                                 │
│ Run warning CallLLM                                                                                                         │
│ Run started ExtractModelResponse                                                                                            │
│ Run completed ExtractModelResponse                                                                                          │
│ Run completed LLM                                                                                                           │
│ Run started ModifyCode                                                                                                      │
│ Run completed ModifyCode                                                                                                    │
│ Run started PR                                                                                                              │
│ Run started CommitChanges                                                                                                   │
│ Creating new branch "generatereadme-julia/pdoc".                                                                            │
│ Run completed CommitChanges                                                                                                 │
│ Run started PreparePR                                                                                                       │
│ Run completed PreparePR                                                                                                     │
│ Run started CreatePR                                                                                                        │
│ Creating PR from julia/pdoc to generatereadme-julia/pdoc                                                                    │
│ Step CreatePR failed                                                                                                        │
│ Step PR failed                                                                                                              │
│ Error running patchflow GenerateREADME: 404 {"message": "Not Found", "documentation_url":                                   │
│ "https://docs.github.com/rest/repos/repos#get-a-repository", "status": "404"}                                               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  Finished GenerateREADME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 0:00:15

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


Anything else?

No response

@patched-admin
Copy link
Contributor

Hi @iuliaturc we'll take a look at this. Thanks for raising the issue!

@patched-admin patched-admin added the bug Something isn't working label Feb 4, 2025
@CTY-git
Copy link
Contributor

CTY-git commented Feb 10, 2025

Hi @iuliaturc, this error likely signifies that we are unable to parse the repo_slug from your current repository.

Our PR creation will always overrides the previously created pull request with the same base branch and head branch. This is done by doing a force push with the new commit to the base branch. It is likely that what you saw created was the result of a previous patchwork run instance.

Are you able to provide your local repository's remote url by any chance? You can obtain this with git config --get remote.origin.url

@iuliaturc
Copy link
Author

Thanks for looking into this!

I'll send over the URL on Slack (it's not public and I don't own it, so I don't want to leak the name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants