Skip to content

Add dedicated health check endpoint to prove that argus is up#1926

Open
hmpf wants to merge 1 commit into
mainfrom
dedicated-healthcheck-endpoint
Open

Add dedicated health check endpoint to prove that argus is up#1926
hmpf wants to merge 1 commit into
mainfrom
dedicated-healthcheck-endpoint

Conversation

@hmpf

@hmpf hmpf commented May 6, 2026

Copy link
Copy Markdown
Contributor

Scope and purpose

Add an endpoint just for checking if Argus is up and running, returns status 204 and no content.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this results in changes to the database model: Updated the ER diagram

@hmpf hmpf requested a review from a team May 6, 2026 08:46
@hmpf hmpf self-assigned this May 6, 2026
@hmpf hmpf added the production Anything especially useful when running in production. label May 6, 2026
@hmpf hmpf force-pushed the dedicated-healthcheck-endpoint branch 2 times, most recently from 07ccec2 to 1498efe Compare May 6, 2026 08:51
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Test results

    8 files  1 720 suites   3m 10s ⏱️
  934 tests   933 ✅ 1 💤 0 ❌
7 472 runs  7 464 ✅ 8 💤 0 ❌

Results for commit c9a0d84.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.62%. Comparing base (f319306) to head (c9a0d84).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1926      +/-   ##
==========================================
+ Coverage   88.60%   88.62%   +0.01%     
==========================================
  Files         146      147       +1     
  Lines        7093     7101       +8     
==========================================
+ Hits         6285     6293       +8     
  Misses        808      808              

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Test naming convention

All new test names follow the convention. 👍

@lunkwill42 lunkwill42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, but CI is not happy (SonarCloud and test name checker are complaining).

Other than that, some documentation addition to point out the endpoint exists, for those who want to deploy health checks, would be nice.

@hmpf

hmpf commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

I wish SonarCloud understood #noqa. That specific enpdoint is as safe as it gets. And I don't care for those keywords, as I've said before, and will continue to say.

@hmpf hmpf requested review from a team and lunkwill42 May 6, 2026 09:50
@hmpf

hmpf commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Other than that, some documentation addition to point out the endpoint exists, for those who want to deploy health checks, would be nice.

Minimal docs added.

@lunkwill42

lunkwill42 commented May 6, 2026

Copy link
Copy Markdown
Member

And I don't care for those keywords, as I've said before, and will continue to say.

I doesn't matter what you personally care or don't care for. What matters is what the team agrees upon;

I don't agree, never will, and will die on this hill. Also, we should build thorium power plants.

Comment thread docs/production/health-check.rst Outdated
Comment thread tests/site/test_views.py Outdated
@hmpf hmpf requested a review from lunkwill42 May 7, 2026 10:58
@sonarqubecloud

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown

The url is "./still-alive/".

We used to use "/admin/login/" for this but that fills up the access
logs. It's easier to filter out accesses to a dedicated endpoint.
@hmpf hmpf force-pushed the dedicated-healthcheck-endpoint branch from dc35edd to c9a0d84 Compare June 9, 2026 09:52
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment thread src/argus/site/views.py


# fmt: off
def health_check(request):
@hmpf hmpf changed the title Add dedicated health check endpoint Add dedicated health check endpoint to prove that argus is up Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

production Anything especially useful when running in production.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants