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

Capture GitCommandError in log file #1232

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Apr 25, 2023

Changes

Example of new log entry

           [helloworld] Generating application template...                                                                                                             create.py:755
           Assigning helloworld an application GUID of 93bbf2ae-12d0-580c-aeb0-965dc4c04b69                                                                           __init__.py:69
           Using app template: https://github.com/beeware/briefcase-windows-VisualStudio-template.git, branch v0.3.15                                                  create.py:251
           >>> Cmd('git') failed due to: exit code(128)                                                                                                                  base.py:776
           >>>   cmdline: git fetch -v -- origin                                                                                                                         base.py:776
           >>>   stderr: 'fatal: unable to access 'https://github.com/beeware/briefcase-windows-VisualStudio-template.git/': Could not resolve host: github.com'         base.py:776
                                                                                                                                                                         base.py:780
           *************************************************************************                                                                                     base.py:780
           ** WARNING: Unable to update template                                  **                                                                                     base.py:780
           *************************************************************************                                                                                     base.py:780
                                                                                                                                                                         base.py:780
              Briefcase is unable the update the application template. This                                                                                              base.py:780
              may be because your computer is currently offline. Briefcase will                                                                                          base.py:780
              use existing template without updating.                                                                                                                    base.py:780
                                                                                                                                                                         base.py:780
           *************************************************************************                                                                                     base.py:780
           Template branch v0.3.15 not found; falling back to development template                                                                                     create.py:266
           >>> Cmd('git') failed due to: exit code(128)                                                                                                                  base.py:776
           >>>   cmdline: git fetch -v -- origin                                                                                                                         base.py:776
           >>>   stderr: 'fatal: unable to access 'https://github.com/beeware/briefcase-windows-VisualStudio-template.git/': Could not resolve host: github.com'         base.py:776
                                                                                                                                                                         base.py:780
           *************************************************************************                                                                                     base.py:780
           ** WARNING: Unable to update template                                  **                                                                                     base.py:780
           *************************************************************************                                                                                     base.py:780
                                                                                                                                                                         base.py:780
              Briefcase is unable the update the application template. This                                                                                              base.py:780
              may be because your computer is currently offline. Briefcase will                                                                                          base.py:780
              use existing template without updating.                                                                                                                    base.py:780
                                                                                                                                                                         base.py:780
           *************************************************************************                                                                                     base.py:780
           Using existing template (sha 3c5ea03b6a703981ed328f29eb17311b8f3e0573, updated Fri Mar 10 20:09:30 2023)                                                      base.py:797

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16 rmartin16 marked this pull request as ready for review April 25, 2023 16:18
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - we'll have to see if this reveals anything interesting.

@freakboy3742 freakboy3742 merged commit 09cf80e into beeware:main Apr 25, 2023
@rmartin16 rmartin16 deleted the capture-git-error branch April 25, 2023 21:30
@rmartin16
Copy link
Member Author

Got an HTTP 429 today....

           [verify-pyside6] Generating application template...                                                                                                         create.py:781
           Using app template: https://github.com/beeware/briefcase-linux-appimage-template.git, branch v0.3.15                                                        create.py:252
           >>> Cmd('git') failed due to: exit code(128)                                                                                                                  base.py:786
           >>>   cmdline: git fetch -v -- origin                                                                                                                         base.py:786
           >>>   stderr: 'fatal: unable to access 'https://github.com/beeware/briefcase-linux-appimage-template.git/': The requested URL returned error: 429'            base.py:786
                                                                                                                                                                         base.py:787
           *************************************************************************                                                                                     base.py:787
           ** WARNING: Unable to update template                                  **                                                                                     base.py:787
           *************************************************************************                                                                                     base.py:787
                                                                                                                                                                         base.py:787
              Briefcase is unable the update the application template. This                                                                                              base.py:787
              may be because your computer is currently offline. Briefcase will                                                                                          base.py:787
              use existing template without updating.                                                                                                                    base.py:787
                                                                                                                                                                         base.py:787
           *************************************************************************                                                                                     base.py:787
           Template branch v0.3.15 not found; falling back to development template                                                                                     create.py:267
           >>> Cmd('git') failed due to: exit code(128)                                                                                                                  base.py:786
           >>>   cmdline: git fetch -v -- origin                                                                                                                         base.py:786
           >>>   stderr: 'fatal: unable to access 'https://github.com/beeware/briefcase-linux-appimage-template.git/': The requested URL returned error: 429'            base.py:786
                                                                                                                                                                         base.py:787
           *************************************************************************                                                                                     base.py:787
           ** WARNING: Unable to update template                                  **                                                                                     base.py:787
           *************************************************************************                                                                                     base.py:787
                                                                                                                                                                         base.py:787
              Briefcase is unable the update the application template. This                                                                                              base.py:787
              may be because your computer is currently offline. Briefcase will                                                                                          base.py:787
              use existing template without updating.                                                                                                                    base.py:787
                                                                                                                                                                         base.py:787
           *************************************************************************                                                                                     base.py:787
           Using existing template (sha 17db6923eba0dd8e47d2504724548b717dd43cc5, updated Mon Feb 13 07:58:18 2023)                                                      base.py:805
[22:00:56]                                                                                                                                                             create.py:784
           [verify-pyside6] Installing support package...                                                                                                              create.py:784
                                                                                                                                                                      __main__.py:40
           Unable to find '/home/runner/work/briefcase/briefcase/tests/apps/verify-pyside6/build/verify-pyside6/linux/appimage/briefcase.toml'                        __main__.py:41

https://github.com/beeware/briefcase/actions/runs/5073634768/jobs/9113045436

@freakboy3742
Copy link
Member

HTTP429 is a fun one... I wonder if our CI behavior is indistinguishable from a bot attack...

@rmartin16
Copy link
Member Author

yeah....although, if we force the caches to refresh more often, we could probably largely mitigate the negative outcomes from this....maybe just put the month and year on the cache like we did for winstore Python caches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants