gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
933 stars 63 forks source link

0.0.15 no longer creates PRs. #77

Closed mkowaliszyn-coursera closed 2 years ago

mkowaliszyn-coursera commented 2 years ago

Describe the bug The latest version, 0.0.15, no longer creates PRs. I tried same command with 0.0.14 binary and it works fine.

To Reproduce Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used.

    ./git-xargs   --branch-name mkow-test4  --repos ./java-apps.txt   --commit-message "My message"   --pull-request-title "My title"   --loglevel DEBUG   `pwd`/scripts/myScript.sh

Expected behavior The PR should be created.

Nice to have

Additional context Add any other context about the problem here.

Teminal output:

$ git-xargs   --branch-name mkow-test2  --repos ./java-apps.txt   --commit-message "My message"   --pull-request-title "My title"   --loglevel DEBUG   ***/updateServiceInfra.sh
[git-xargs] INFO[2022-06-23T14:48:59-04:00] git-xargs running...
[git-xargs] DEBU[2022-06-23T14:48:59-04:00] Looking up filename provided repo             Name=cplus-messaging-application Organization=****
[git-xargs] DEBU[2022-06-23T14:48:59-04:00] Successfully fetched repo                     Name=cplus-messaging-application Organization=***
[git-xargs] DEBU[2022-06-23T14:48:59-04:00] Repo will have all targeted scripts run against it  Repository=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:48:59-04:00] Attempting to clone repository using GITHUB_OAUTH_TOKEN  Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:00-04:00] Enumerating objects: 951, done.
Counting objects: 100% (130/130), done.
Compressing objects: 100% (78/78), done.
Total 951 (delta 44), reused 106 (delta 28), pack-reused 821  Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:00-04:00] Created branch                                Branch Name=refs/heads/mkow-test2 Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:00-04:00]                                               Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:01-04:00] Executing command against local clone of repo...  Command="[***updateServiceInfra.sh]" Directory=***/workspace/git-xargs-cplus-messaging-application1237588432 Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:31-04:00] Output of command [***/scripts/updateServiceInfra.sh] for repo cplus-messaging-application in directory ***/workspace/git-xargs-cplus-messaging-application1237588432:
[git-xargs] DEBU[2022-06-23T14:49:31-04:00] Local repository worktree no longer clean, will stage and add new files and commit changes  Repo=cplus-messaging-application
[git-xargs] DEBU[2022-06-23T14:49:32-04:00] Successfully pushed local branch to remote origin  Repo=cplus-messaging-application
[git-xargs] INFO[2022-06-23T14:49:32-04:00] Repository successfully processed             Repo name=cplus-messaging-application

*****************************************************************
  GIT-XARGS RUN SUMMARY @ 2022-06-23 18:49:32.233789 +0000 UTC
  Runtime in seconds: 32
*****************************************************************

COMMAND SUPPLIED

[/***/updateServiceInfra.sh]

REPO SELECTION METHOD USED FOR THIS RUN - (see README.md for more information)

repos-file
 REPOS SUPPLIED VIA --repos FILE FLAG
│───────────────────│─────────────────────────────│
│ ORGANIZATION NAME │ URL                         │
│───────────────────│─────────────────────────────│
│ ***      │ cplus-messaging-application │
│───────────────────│──────────────────[git-xargs] DEBU[2022-06-23T14:49:32-04:00] pullRequestWorker received pull request job. Delay: 0 seconds. Retries: 0 for repo: cplus-messaging-application on branch: refs/heads/mkow-test2
[git-xargs] DEBU[2022-06-23T14:49:32-04:00] openPullRequest received job with retries: 0. Config max retries for this run: 3
───────────│

 ALL REPOS THAT WERE TARGETED FOR PROCESSING AFTER FILTERING MISSING / MALFORMED REPOS
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ REPO NAME                   │ REPO URL                                                    │
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ cplus-messaging-application │ https://***/cplus-messaging-application │
│─────────────────────────────│─────────────────────────────────────────────────────────────│

 REPOS THAT WERE SUCCESSFULLY CLONED TO THE LOCAL FILESYSTEM
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ REPO NAME                   │ REPO URL                                                    │
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ cplus-messaging-application │ https://***/cplus-messaging-application │
│─────────────────────────────│─────────────────────────────────────────────────────────────│

 REPOS THAT SHOWED FILE CHANGES TO THEIR WORKING DIRECTORY FOLLOWING COMMAND EXECUTION
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ REPO NAME                   │ REPO URL                                                    │
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ cplus-messaging-application │ https://***/cplus-messaging-application │
│─────────────────────────────│─────────────────────────────────────────────────────────────│

 REPOS WHOSE SPECIFIED BRANCHES DID NOT EXIST ON THE REMOTE, AND SO WERE FIRST CREATED LOCALLY
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ REPO NAME                   │ REPO URL                                                    │
│─────────────────────────────│─────────────────────────────────────────────────────────────│
│ cplus-messaging-application │ https://***/cplus-messaging-application │
│─────────────────────────────│─────────────────────────────────────────────────────────────│

Note the async log output from the PR creation thread in the report.

mkowaliszyn-coursera commented 2 years ago

Additional: I've had some team members report that 0.0.15 does work for them, and others that it did not. It may matter, but I and another developer are on M1 Mac hardware.

grawinkel commented 2 years ago

I see the same issue with 0.0.15, 0.0.16. On Intel Mac. 0.0.14 works fine for me.

zackproser commented 2 years ago

Thanks for the bug reports! I have an idea as to what is causing this. Started a PR to fix in #85 which might be worth trying out if you have the time.

zackproser commented 2 years ago

@mkowaliszyn-coursera if you have a chance - would you mind giving v0.1.0 a shot and let me know if it resolves the issues you were seeing? Thanks!