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

[Bug] sync_community_teams.py file handling is too fragile #164

Closed
1 task done
TimidRobot opened this issue Mar 10, 2023 · 0 comments · Fixed by #170
Closed
1 task done

[Bug] sync_community_teams.py file handling is too fragile #164

TimidRobot opened this issue Mar 10, 2023 · 0 comments · Fixed by #170
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🔒 staff only Restricted to CC staff members 🏁 status: ready for work Ready for work

Comments

@TimidRobot
Copy link
Member

Description

Traceback (most recent call last):
  File "/Users/timidrobot/CreativeCommons/git/ccos-scripts/./sync_community_teams.py", line 36, in <module>
    main()
  File "/Users/timidrobot/CreativeCommons/git/ccos-scripts/./sync_community_teams.py", line 30, in main
    create_codeowners_for_data(get_community_team_data())
  File "/Users/timidrobot/CreativeCommons/git/ccos-scripts/ccos/teams/set_codeowners.py", line 63, in create_codeowners_for_data
    check_and_fix_repo(organization, repo, teams)
  File "/Users/timidrobot/CreativeCommons/git/ccos-scripts/ccos/teams/set_codeowners.py", line 109, in check_and_fix_repo
    set_up_repo(repo)
  File "/Users/timidrobot/CreativeCommons/git/ccos-scripts/ccos/teams/set_codeowners.py", line 210, in set_up_repo
    origin.pull()
  File "/Users/timidrobot/.local/share/virtualenvs/ccos-scripts-8EVzyQrj/lib/python3.10/site-packages/git/remote.py", line 1045, in pull
    res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
  File "/Users/timidrobot/.local/share/virtualenvs/ccos-scripts-8EVzyQrj/lib/python3.10/site-packages/git/remote.py", line 848, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/Users/timidrobot/.local/share/virtualenvs/ccos-scripts-8EVzyQrj/lib/python3.10/site-packages/git/cmd.py", line 604, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git pull -v -- origin

Expectation

The use of tempfile.TemporaryDirectory() would make this more robust/less fragile

Additional context

Resolution

  • I would be interested in resolving this bug.
@TimidRobot TimidRobot added 🟨 priority: medium Not blocking but should be fixed soon 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🔒 staff only Restricted to CC staff members 🏁 status: ready for work Ready for work labels Mar 10, 2023
@TimidRobot TimidRobot self-assigned this Mar 10, 2023
@TimidRobot TimidRobot added this to Ready for Development in Active Sprint via automation Mar 10, 2023
@TimidRobot TimidRobot changed the title [Bug] sync_community_teams file handling is too fragile [Bug] sync_community_teams.py file handling is too fragile Mar 13, 2023
Active Sprint automation moved this from Ready for Development to Done Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🔒 staff only Restricted to CC staff members 🏁 status: ready for work Ready for work
Projects
Active Sprint
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant