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

wrappers, tests/main/snap-service-timer: restore missing commit, add spread test for timer services #4758

Merged

Conversation

bboozzoo
Copy link
Collaborator

A spread test for timer services.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo
Copy link
Collaborator Author

Somehow this commit did not end up being merged bboozzoo@ccb91b2 Will push an update shortly.

@bboozzoo bboozzoo changed the title tests/main/snap-service-timer: spread test for timer services wrappers, tests/main/snap-service-timer: restore missing commit, add spread test for timer services Feb 27, 2018
… shipped in ubuntu-14.04

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Copy link
Collaborator

@zyga zyga left a comment

Choose a reason for hiding this comment

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

LGTM with some remarks

regular-timer:
command: bin/loop regular-timer
daemon: simple
timer: 0:00-24:00/96
Copy link
Collaborator

Choose a reason for hiding this comment

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

To help casual reviewers. Is it correct to say that this means # Run every 15 minutes.?

random-timer:
command: bin/loop random-timer
daemon: simple
timer: 0:00~24:00/96
Copy link
Collaborator

Choose a reason for hiding this comment

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

This one is # Run roughly every 15 minutes, with (some) random distribution.

@@ -560,8 +560,7 @@ X-Snappy=yes
[Timer]
Unit={{.ServiceFileName}}
{{ range .Schedules }}OnCalendar={{ . }}
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean we used to generate a broken service file that needs to be updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The piece of code that did this got merged just today. On top of this, the snap won't install as systemd will reject the timer file we produced.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
…tten

Increase compatibility with older systemd and make sure to do a daemon-reload
wheneven a new service file was written. Newer versions of systemd reload
automatically and print out a warning about on-disk service files being changed.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@codecov-io
Copy link

Codecov Report

Merging #4758 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4758      +/-   ##
==========================================
+ Coverage   78.74%   78.76%   +0.01%     
==========================================
  Files         468      468              
  Lines       33897    33901       +4     
==========================================
+ Hits        26693    26701       +8     
+ Misses       5041     5039       -2     
+ Partials     2163     2161       -2
Impacted Files Coverage Δ
wrappers/services.go 84.9% <100%> (ø) ⬆️
osutil/syncdir.go 81.42% <0%> (+0.26%) ⬆️
snap/info.go 85.02% <0%> (+0.5%) ⬆️
daemon/snap.go 87.67% <0%> (+0.64%) ⬆️
overlord/hookstate/hookmgr.go 73.14% <0%> (+1.14%) ⬆️

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 4e666f8...c3d3f52. Read the comment docs.

@bboozzoo bboozzoo merged commit bb956fe into snapcore:master Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants