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

Add retries on creating archive tar #161

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

shanejbrown
Copy link
Contributor

@shanejbrown shanejbrown commented Sep 12, 2024

What does this PR do?

Add retries around the archive tarfile.

What issues does this PR fix or reference?

Minimizes the possibility of an error when multiple buildrunner processes are running concurrently in the same directory. It still possible but is less likely.

15:35:31 Traceback (most recent call last):
15:35:31 File "/bin/buildrunner", line 14, in
15:35:31 sys.exit(cli.main(sys.argv))
15:35:31 File "/usr/lib64/buildrunner/lib/python3.9/site-packages/buildrunner/cli.py", line 414, in main
15:35:31 build_runner.run()
15:35:31 File "/usr/lib64/buildrunner/lib/python3.9/site-packages/buildrunner/init.py", line 373, in run
15:35:31 self.get_source_archive_path()
15:35:31 File "/usr/lib64/buildrunner/lib/python3.9/site-packages/buildrunner/init.py", line 261, in get_source_archive_path
15:35:31 tfile.add(self.build_dir, arcname="", filter=_exclude_working_dir)
15:35:31 File "/usr/lib64/python3.9/tarfile.py", line 1994, in add
15:35:31 self.add(os.path.join(name, f), os.path.join(arcname, f),
15:35:31 File "/usr/lib64/python3.9/tarfile.py", line 1994, in add
15:35:31 self.add(os.path.join(name, f), os.path.join(arcname, f),
15:35:31 File "/usr/lib64/python3.9/tarfile.py", line 1972, in add
15:35:31 tarinfo = self.gettarinfo(name, arcname)
15:35:31 File "/usr/lib64/python3.9/tarfile.py", line 1851, in gettarinfo
15:35:31 statres = os.lstat(name)
15:35:31 FileNotFoundError: [Errno 2] No such file or directory: '/raid/build/workspace/services_PR-83/.git/index.lock'
script returned exit code 1

Previous Behavior

New Behavior

Merge requirements satisfied?

  • I have updated the documentation or no documentation changes are required.
  • I have added tests to cover my changes.
  • I have updated the base version in setup.py (if appropriate).

@shanejbrown shanejbrown merged commit d636fdd into adobe:main Sep 12, 2024
9 checks passed
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