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

job directory should be deleted at the end of the flow #79

Closed
rnetser opened this issue Oct 24, 2023 · 0 comments · Fixed by #80
Closed

job directory should be deleted at the end of the flow #79

rnetser opened this issue Oct 24, 2023 · 0 comments · Fixed by #80
Assignees

Comments

@rnetser
Copy link
Collaborator

rnetser commented Oct 24, 2023

job dir is not deleted; running report twice - second run will fail

2023-10-24T13:12:26.477078 cli.objects.jira_base INFO Jira authentication successful...
2023-10-24T13:12:26.749765 cli.objects.job INFO Downloading log files...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/.virtualenvs/firewatch/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/git/firewatch/cli/report/__init__.py", line 90, in report
    job = Job(
          ^^^^
  File "/home/rnetser/git/firewatch/cli/objects/job.py", line 74, in __init__
    self.logs_dir = self._download_logs(
                    ^^^^^^^^^^^^^^^^^^^^
  File "/home/rnetser/git/firewatch/cli/objects/job.py", line 232, in _download_logs
    with open(file, "xb") as target:
         ^^^^^^^^^^^^^^^^
FileExistsError: [Errno 17] File exists: '/tmp/1652281746718199808/logs/addon-install/build-log.txt'
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 a pull request may close this issue.

2 participants