Skip to content

feat(webapp): monitor degraded status#376

Merged
ReenigneArcher merged 1 commit intomasterfrom
feat/webapp/monitor-degraded-status
Dec 15, 2024
Merged

feat(webapp): monitor degraded status#376
ReenigneArcher merged 1 commit intomasterfrom
feat/webapp/monitor-degraded-status

Conversation

@ReenigneArcher
Copy link
Member

Description

This PR allows seeing if the bot is "degraded" with the /status endpoint. Currently there are only a couple of things that will trigger the degraded status, but more can be added as logs are investigated.

Additionally, unit tests were added for the src.common.common.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@codecov
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.

Project coverage is 67.26%. Comparing base (ba4c842) to head (e629326).

Files with missing lines Patch % Lines
src/discord/bot.py 50.00% 4 Missing ⚠️
src/reddit/bot.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
- Coverage   67.51%   67.26%   -0.26%     
==========================================
  Files          21       21              
  Lines        1096     1112      +16     
==========================================
+ Hits          740      748       +8     
- Misses        356      364       +8     
Files with missing lines Coverage Δ
src/common/webapp.py 96.80% <100.00%> (+0.13%) ⬆️
src/discord/bot.py 88.88% <50.00%> (-3.51%) ⬇️
src/reddit/bot.py 78.20% <33.33%> (-2.06%) ⬇️

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/reddit/bot.py:61

  • The validate_env method was changed from a static method to an instance method, which might affect its usage elsewhere in the codebase. Ensure that this change does not break any existing functionality.
def validate_env(self) -> bool:

@ReenigneArcher ReenigneArcher force-pushed the feat/webapp/monitor-degraded-status branch from 34ed0d8 to e629326 Compare December 15, 2024 21:18
@sonarqubecloud
Copy link

@ReenigneArcher ReenigneArcher merged commit 8468697 into master Dec 15, 2024
@ReenigneArcher ReenigneArcher deleted the feat/webapp/monitor-degraded-status branch December 15, 2024 21:35
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.

2 participants