New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout & progress tracking to update resource #34

Merged
merged 3 commits into from Oct 9, 2017

Conversation

Projects
None yet
2 participants
@Annih
Copy link
Contributor

Annih commented Oct 9, 2017

Implement a synchronous job system based on asynchronous actions to allow progress tracking of windows update install/download.

The underlying implementation also add the ability to support operation timeout and required reboots.

@Annih Annih force-pushed the update_progress branch from ec6e1d8 to 5557069 Oct 9, 2017

@Annih Annih requested a review from jmauro Oct 9, 2017

@jmauro

jmauro approved these changes Oct 9, 2017

# Base class for WUA jobs based on asynchronous API
# See http://msdn.microsoft.com/aa387099 for the API documentation
# This class is "abstract" and can't be instanciated directly.
# You have toinherit and implement the following protected methods:

This comment has been minimized.

@jmauro

jmauro Oct 9, 2017

Contributor

TYPO: to inherit

This comment has been minimized.

@Annih

Annih Oct 9, 2017

Contributor

ok

complete_job(job)
rescue ::Timeout::Error
job.RequestAbort unless job.IsCompleted
raise ::Timeout::Error, "The operation did not complete within the allotted timeout of #{timeout} seconds!"

This comment has been minimized.

@jmauro

jmauro Oct 9, 2017

Contributor

TYPO: Allocated?

This comment has been minimized.

@Annih

Annih Oct 9, 2017

Contributor

no alloted

Annih added some commits Oct 8, 2017

Add classes to run WUA jobs with progress tracking
Implement a synchronous job system based on asynchronous actions to
allow progress tracking.

Asynchronous API normally use callbacks, but they do not seem to be
compatible with the ruby WIN32OLE implementation.
A small hack consist to pass a valid WIN32OLE object as dummy callback
pointer to be able to call BeginInstall & BeginDownload methods.

These classes will be used in the next commit to refactor the update
resource.
Add timeout & progress tracking to update resource
Use the new job libraries to implement progress tracking within the
wsus_client_update resource.

The underlying implementation also add the ability to support timeout.
Properties have been added to the resource to controll this timeout for
each operation.
Update README.md and metadata.rb files
Update constraint on chef from 11+ to 12.6+.
Define source_url and issue_url.
Explicit support of Windows Server 2017 and Windows 10.
Describe new wsus_client_update properties.

@Annih Annih force-pushed the update_progress branch from 5557069 to 68833a9 Oct 9, 2017

@Annih Annih merged commit 68833a9 into master Oct 9, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Annih Annih deleted the update_progress branch Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment