Skip to content

copy log file to the temp dir before removing project directory#182

Merged
wonder-sk merged 8 commits intomasterfrom
preserve-log
Oct 30, 2023
Merged

copy log file to the temp dir before removing project directory#182
wonder-sk merged 8 commits intomasterfrom
preserve-log

Conversation

@alexbruy
Copy link
Copy Markdown
Contributor

@alexbruy alexbruy commented Oct 10, 2023

When project download fails for some reason we remove project directory and raise an exception. This exception than catched in the plugin and error message is shown. However, in some cases (namely, when unexpected error occurs) this message is very basic and it is hard to say what is going on.

The support team proposed that we keep log file as it might contain useful information and provide an option in the plugin to send that log to developers. To make this possible in the client we create a copy of the log file in the system temporary directory before cleaning up failed download. The path to the log file is added to the exception as an attribute and can pluign can check for it and act accordingly.

Fixes #155
Fixes #156

Copy link
Copy Markdown
Contributor

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

Could you please also add a test to verify this is working? I'm thinking of e.g. 1. start async download, 2. cause failure - create a directory inside the project's dir that has the same name as a file of the project, so that copying that file will fail, 3. check that we have non-empty log file referenced by the job...

@alexbruy
Copy link
Copy Markdown
Contributor Author

Included changes from #184

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.

Client log does not store info about exceptions during download/pull/push No log is kept after a failed download

2 participants