ctx.download_resource creates directories needlessly

Description

When target_path is None, the download_resource function is expected to download the resource into a temporary file.

What it actually ends up doing, is downloading the resource into a temporary file located in a brand new temporary directory:

https://github.com/cloudify-cosmo/cloudify-plugins-common/blob/4.2/cloudify/manager.py#L156

The results:

  • Way too many directories created for no reason

  • In order to do proper cleanup, the caller needs to know that they should delete the temporary file's directory, and not just the temporary file itself

Assignee

Isaac Shabtay

Reporter

Isaac Shabtay

Labels

None

Bug Type

None

Target Version

None

Severity

None

Fix versions

Affects versions

Configure