Thanks to visit codestin.com
Credit goes to github.com

Skip to content

✨ [#2440] Add config checks framework#2441

Draft
OlhaZahoruiko wants to merge 2 commits intodevelopfrom
feature/2440-real-fetch-cases-check
Draft

✨ [#2440] Add config checks framework#2441
OlhaZahoruiko wants to merge 2 commits intodevelopfrom
feature/2440-real-fetch-cases-check

Conversation

@OlhaZahoruiko
Copy link
Copy Markdown

Summary

Issue References

  • Taiga User Story:
  • Taiga Issue:
  • Taiga Dimpact Issue:
  • Github Issue:

Checklist

  • CHANGELOG.rst updated
    • Deployment notes added
    • Breaking changes flagged
  • Documentation updated
  • Codecov report reviewed for untested lines
  • Storybook component updated/created
  • Vitest tests added/updated
  • Updated the docker-compose.yml environment variables

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 62.62626% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.90%. Comparing base (a402c98) to head (c4b9447).

Files with missing lines Patch % Lines
src/open_inwoner/config_checks/views.py 31.03% 20 Missing ⚠️
src/open_inwoner/config_checks/api.py 61.53% 10 Missing ⚠️
src/open_inwoner/config_checks/fetch_cases.py 76.92% 3 Missing ⚠️
src/open_inwoner/config_checks/permissions.py 60.00% 2 Missing ⚠️
src/open_inwoner/config_checks/registry.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2441      +/-   ##
===========================================
- Coverage    93.96%   93.90%   -0.07%     
===========================================
  Files         1214     1221       +7     
  Lines        48027    48126      +99     
===========================================
+ Hits         45130    45192      +62     
- Misses        2897     2934      +37     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@swrichards swrichards left a comment

Choose a reason for hiding this comment

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

@OlhaZahoruiko will continue this later when #2380 is done -- started here and realized the other should be done first.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's have this in the openzaak model, to follow the pattern {django_app}/config_checks.py (or django_app/config_checks/fetch_cases.py if we want to separate them out)


class FetchCasesCheck:
identifier = "fetch_cases"
label = "Fetch cases for BSN"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wrap in gettext as _

return request.user.is_active and request.user.is_superuser

def get_error_message(self, obj=None):
return "Only superusers may run configuration checks."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also wrap in gettext

from .views import run_config_check

urlpatterns = [
path(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generic URL?

success=True,
identifier=self.identifier,
verbose_name=self.label,
message=f"Check executed for BSN {bsn}",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Translate

identifier = "fetch_cases"
label = "Fetch cases for BSN"
form_class = FetchCasesForm

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Needs IsSuperuser()

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