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

Adding support for Simple checks #17

Merged
merged 4 commits into from
Apr 6, 2022
Merged

Adding support for Simple checks #17

merged 4 commits into from
Apr 6, 2022

Conversation

mamercad
Copy link
Collaborator

@mamercad mamercad commented Apr 2, 2022

SUMMARY

Add support for Simple checks. Previously, schedule and tz were defaulted, which made it impossible to differentiate between Cron and Simple checks when creating them (to create Simple checks, exclude schedule and tz and include timeout).

Fixes #16.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • checks
ADDITIONAL INFORMATION

The integration test has been updated to ensure that this works correctly.

@mamercad mamercad temporarily deployed to integration April 2, 2022 01:22 Inactive
@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #17 (ae0997a) into main (3b3d612) will decrease coverage by 1.79%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
- Coverage   76.17%   74.38%   -1.80%     
==========================================
  Files           9        8       -1     
  Lines         361      363       +2     
  Branches       51       53       +2     
==========================================
- Hits          275      270       -5     
  Misses         53       53              
- Partials       33       40       +7     
Flag Coverage Δ
integration 74.38% <100.00%> (+0.43%) ⬆️
sanity ?
units ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugins/modules/checks.py 82.60% <ø> (-4.35%) ⬇️
plugins/module_utils/healthchecksio.py 65.62% <100.00%> (+0.94%) ⬆️
plugins/modules/badges_info.py 89.47% <0.00%> (-5.27%) ⬇️
plugins/modules/checks_info.py 89.47% <0.00%> (-5.27%) ⬇️
plugins/modules/channels_info.py 89.47% <0.00%> (-5.27%) ⬇️
plugins/modules/checks_flips_info.py 89.47% <0.00%> (-5.27%) ⬇️
plugins/modules/checks_pings_info.py 89.47% <0.00%> (-5.27%) ⬇️
plugins/modules/ping.py 90.47% <0.00%> (-4.77%) ⬇️
plugins/doc_fragments/healthchecksio.py

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 3b3d612...ae0997a. Read the comment docs.

@mamercad mamercad merged commit a313e1f into main Apr 6, 2022
@mamercad mamercad deleted the mamercad/issue-16 branch April 6, 2022 22:34
@ahjohannessen
Copy link

@mamercad The following line is problematic:

        # if schedule and tz, create a Cron check
         if request_params.get("schedule") and request_params.get("tz"):
             del request_params["grace"]
             del request_params["timeout"]

grace should not be removed as it can be used in cron checks. Now cron checks grace value fallback to its default, 3600.

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.

Not possible to create checks with simple schedule
3 participants