Skip to content
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

(MODULES-10101) Use RunOnLastWeekOfMonth for which_occurrence = last #119

Merged
merged 1 commit into from
Feb 10, 2020
Merged

(MODULES-10101) Use RunOnLastWeekOfMonth for which_occurrence = last #119

merged 1 commit into from
Feb 10, 2020

Conversation

sanfrancrisko
Copy link
Contributor

@sanfrancrisko sanfrancrisko commented Feb 6, 2020

Description

We were not correctly determining the idempotency of a scheduled task that had a MonthlyDOWTrigger set to last:

'which_occurrence' => 'last'

The task was being correctly set on the Windows Server instances, but when we read back the task, we were determining that the Task.Definition.Triggers[i].WeeksOfMonth attribute was 0 (i.e. nothing defined). Instead, we should be checking the RunOnLastWeekOfMonth to determine if the task is set to run on the last week of the month.

NOTE: We are not changing how this parameter is configured, just how it is read back.

Tests

  • pdk validate successfully passes
  • Existing acceptance tests pass on all compatible OSs
  • New acceptance tests pass on all compatible OSs

@sanfrancrisko sanfrancrisko requested a review from a team as a code owner February 6, 2020 19:02
@codecov-io
Copy link

codecov-io commented Feb 6, 2020

Codecov Report

Merging #119 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
+ Coverage   95.41%   95.42%   +<.01%     
==========================================
  Files           6        6              
  Lines         829      830       +1     
==========================================
+ Hits          791      792       +1     
  Misses         38       38
Impacted Files Coverage Δ
lib/puppet_x/puppetlabs/scheduled_task/trigger.rb 95.03% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc24455...c1b9309. Read the comment docs.

@michaeltlombardi michaeltlombardi merged commit dfc0103 into puppetlabs:master Feb 10, 2020
@sanfrancrisko sanfrancrisko deleted the MODULES-10101 branch February 11, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants