Comments (5)
Interesting bug based on your use case. I can't always assume the same filename is the same file, but I'm trying to understand if it makes sense to download the same file twice. Would it be more effective to download one archive and use the file resource to place it in multiple location (unless you need extraction). I'll give it some thought.
Your PR is currently failing spec test, so can not be merged.
from puppet-archive.
it doesn't make sense to download the same file twice, you're quite right. I am currently downloading one file to /tmp and using the file resource to place it in multiple locations yes.
originally I was using archive to download it multiple times - putting a jar file into specific webapps//WEB-INF/lib/ on tomcat - which depends on the dirs being created already - by tomcat exploding the war. And then i switched to using the one archive download, and file resources to place it in the correct locations, however I was getting issues with directories not pre-existing. Which I then thought "oh, archive must do a mkdir_p or something similar as it was working previously with the multiple archives downloading straight to the WEB-INF/lib folder" however it seems I'm wrong, and have issues with my resource orderings, timings etc.
This still seems to be a bug, even though how I came about it is not my actual use case anymore!
Thinking about your comments, I think it'd be wise to create a temp filename off a UUID? that way you will always know the temp file created there and then has a unique name?
from puppet-archive.
Yep, agree definitely a bug.
from puppet-archive.
So giving it more thought, the fix for this issues is to change the full filepath :path to namevar, but that's going to be a major breaking change, because path was intended to be the file directory not the full file path. To preserve the existing module behavior
- namevar does not get transformed to filename.
- munging of namevar extracts path and filename.
- use some form of uuid for tempfile (maybe cache by checksum & checksum_type)
I think this will preserve backwards compatibility, but I really wish I didn't have to deprecate and move to a different resource parameter that's somewhat inconsistent with Puppet file.
from puppet-archive.
After reviewing :path is actually full path for file, so this was not as big a change as originally expected.
This is fixed in #47. I believe it's backwards compatible (the archive namevar change, not the archive class changes). Please verify and review the 0.3.x branch.
from puppet-archive.
Related Issues (20)
- Do not add auth and cookie header when redirecting HOT 2
- Example in README doesn't make sense.
- uninitialized constant PuppetX::Bodeco::PUPPET HOT 4
- add support for Ubuntu 22.04
- Changing back and forth between different version of an archive does not re-extract HOT 1
- Enhancement: allow multiple sources
- curl provider: array of multiple headers does not work HOT 2
- Checksum not being verified HOT 1
- Files unpacked in `/tmp` HOT 2
- Missing gem with ruby 3.1 HOT 13
- Artifactory has no authentication for latest url and checksum
- Allow passwords to be deferred
- archive does not enforce `owner:group` HOT 2
- archive has stopped working for us HOT 4
- weird issue with the proxy settings if 'proxy_server' seems to be set not fully correct
- archive module reveals sensitive information
- Provider curl to wget
- archive extraction fails
- Add support for Azure Blob Storage HOT 1
- Feature request: Add support for username|password to be passed as Sensitive[String]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-archive.