Skip to content

Conversation

@caseywilliams
Copy link
Contributor

Update the string docs for the upload_file boltlib function to mention
that the function is able to upload directories as well as files.

@caseywilliams
Copy link
Contributor Author

Appveyor failure looks unrelated (I hope)?

@caseywilliams caseywilliams force-pushed the docs/upload_file-directories branch from 8a6a06b to 589a5b4 Compare June 7, 2019 23:45
@caseywilliams caseywilliams changed the title (docs) Mention directories upload_file docs (docs) Mention directories in upload_file strings Jun 7, 2019
@puppetcla
Copy link

CLA signed by all contributors.

@donoghuc
Copy link
Contributor

donoghuc commented Jun 10, 2019

We generate https://github.com/puppetlabs/bolt/blob/master/pre-docs/plan_functions.md with a rake task based on puppet-strings documentation in plan function definitions. You can run bundle exec rake docs and commit the markdown. (Travis is failing because the markdown is not up to date with strings source

bolt/.travis.yml

Lines 52 to 57 in 46434af

- |
if ! bundle exec rake docs; then
false
elif ! git diff --exit-code; then
false
fi
).

I was looking for places in the docs where we may clarify this, but I think it is missing. Maybe we could add it to:

https://github.com/puppetlabs/bolt/blob/master/pre-docs/bolt_command_reference.md#bolt-command-reference
https://github.com/puppetlabs/bolt/blob/df2bffe56a3fa3b144bcb121c3fea6750bd55fa2/pre-docs/running_bolt_commands.md#upload-files-to-remote-nodes

@adreyer
Copy link
Contributor

adreyer commented Jun 10, 2019

unfortunately this needs a ticket or it won't get copy pasted into the real docs

@caseywilliams caseywilliams force-pushed the docs/upload_file-directories branch from 589a5b4 to 4842fbd Compare June 10, 2019 18:04
@caseywilliams caseywilliams changed the title (docs) Mention directories in upload_file strings (BOLT-1379) (docs) 'file upload' can handle directories Jun 10, 2019
@caseywilliams
Copy link
Contributor Author

Ok, thanks both - I've created a JIRA ticket and regenerated the markdown, and added mentions of directories in several other places.

@caseywilliams caseywilliams force-pushed the docs/upload_file-directories branch from 4842fbd to 576624f Compare June 10, 2019 18:16
@caseywilliams
Copy link
Contributor Author

I'm not sure I understand why Travis is failing

@donoghuc
Copy link
Contributor

@casey it is unrelated to this PR. We have a regression in the puppet-resource_api gem. We are working on a fix for now. Thanks!


def upload_file(targets, source, destination, options = {})
description = options.fetch('_description', "file upload from #{source} to #{destination}")
description = options.fetch('_description', "file or directory upload from #{source} to #{destination}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this logging/outputting is intended more to map to the action file upload rather than describe to the user the behavior of the action. I would lean toward leaving that part out and instead just focus on documenting what to expect with file upload.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, removed the executor changes

The 'file upload' command and the 'upload_file' function are able to
upload directories as well as individual files - these changes
explicitly mention that in the docs.
@caseywilliams caseywilliams force-pushed the docs/upload_file-directories branch from 576624f to 072d954 Compare June 11, 2019 18:44
@donoghuc donoghuc merged commit fa5a7d9 into puppetlabs:master Jun 11, 2019
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.

4 participants