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(webapp): monitor degraded status #376

Merged
merged 1 commit into from
Dec 15, 2024

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

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%) ⬇️

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
@ReenigneArcher ReenigneArcher merged commit 8468697 into master Dec 15, 2024
13 of 14 checks passed
@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.

1 participant