puppetlabs-stdlib icon indicating copy to clipboard operation
puppetlabs-stdlib copied to clipboard

Use the read method on the return of open_url to actually get the con…

Open gerases opened this issue 1 year ago • 10 comments

Summary

Use the read method on the return of open_url to actually get the content. Otherwise the following error is returned by puppetserver:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call,
 no implicit conversion of Tempfile into String (file: <file_path>, line: 8, column: 15) on node <node_name>

gerases avatar Mar 05 '24 17:03 gerases

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 05 '24 17:03 CLAassistant

I am not found of doubles, but something like:

Yep, will do within a few days, thank you. Do you agree it's a bug though?

gerases avatar Mar 14 '24 14:03 gerases

Yep, will do within a few days, thank you.

Thanks!

Do you agree it's a bug though?

Yup!

smortex avatar Mar 14 '24 18:03 smortex

@smortex, I decided to use StringIO in the tests. I'm not sure how to restart the build though.

gerases avatar Mar 15 '24 04:03 gerases

Also I see there's no way to test using a docker image, which is a bit of a hassle. Is there a plan to add that similar to other repos of vox pupuli? By the way, why "pupuli" (which is incorrect) and not "populi"?

gerases avatar Mar 15 '24 14:03 gerases

@gerases puppetlabs/stdlib uses Litmus to spin up SUTs (systems under test), whereas Vox Pupuli uses Beaker. But as Beaker, Litmus supports Docker (and Podman I think?) Containers for SUTs. I just don't know how to use Litmus.

And Vox Pupuli is correct, it's just not 'people', but 'puppet': https://latin-dictionary.net/search/english/puppet

bastelfreak avatar Mar 15 '24 17:03 bastelfreak

And Vox Pupuli is correct, it's just not 'people', but 'puppet': https://latin-dictionary.net/search/english/puppet

Oh, fantastic then. Didn't think of "pupulus". Thanks.

gerases avatar Mar 15 '24 17:03 gerases

@bastelfreak Could this be merged?

gerases avatar Apr 04 '24 21:04 gerases

I'm a bit hesitant on merging because I don't know if this change breaks the setup for other users. I need to test it and I currently don't have the time.

bastelfreak avatar Apr 04 '24 21:04 bastelfreak

I'm surprised I didn't link it, but https://github.com/puppetlabs/puppetlabs-stdlib/pull/1415 was my attempt to address it.

ekohl avatar Apr 05 '24 11:04 ekohl