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

Feat[1332] : Skip startup message #1342

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

sapiderman
Copy link
Contributor

@sapiderman sapiderman commented Jan 15, 2025

Monika Pull Request (PR)

What feature/issue does this PR add

  1. Implements Improvement: Make "StartMessage" optional #1332
  2. Bypass startup messages
  3. Bypass startup notification ("Monika is started" notification)

How did you implement / how did you fix it

  1. Add a switch --skip-start-message to bypass greetings and startup info messages

How to test

  1. Use the following test.yaml config:
probes:
  - id: 'http-1'
    name: 'status-200-test'
    requests:
      - url: https://httpbin.org/status/401
        method: PATCH
    alerts:
      - assertion: response.status < 200 or response.status > 308
        message: HTTP Status is not 200
      - assertion: response.time > 2000
        message: Too sloow
  1. Run monika with the switch npm start -- -c test.yaml --skip-start-message
  2. Expect monika to start probing without greeting and startup messages
  3. Expect no startup notification is sent

Screenshot

After PR
image

Before PR
image

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 62.94%. Comparing base (6a29470) to head (f7e813e).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
src/commands/monika.ts 20.00% 3 Missing and 1 partial ⚠️
src/components/logger/startup-message.ts 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1342      +/-   ##
==========================================
+ Coverage   62.51%   62.94%   +0.43%     
==========================================
  Files         112      111       -1     
  Lines        3391     3668     +277     
  Branches      591      642      +51     
==========================================
+ Hits         2120     2309     +189     
- Misses       1079     1136      +57     
- Partials      192      223      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sapiderman sapiderman marked this pull request as draft January 20, 2025 16:37
@sapiderman sapiderman marked this pull request as ready for review January 23, 2025 07:08
@haricnugraha haricnugraha merged commit 544fa06 into hyperjumptech:main Jan 24, 2025
9 checks passed
@sapiderman sapiderman deleted the feat/1332-skip-startup branch January 24, 2025 08:18
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.

3 participants