-
Notifications
You must be signed in to change notification settings - Fork 182
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
MPP-1810: Update to dockerflow 2024.1.0, remove unused views #4345
Conversation
Bumps [dockerflow](https://github.com/mozilla-services/python-dockerflow) from 2022.8.0 to 2024.1.0. - [Release notes](https://github.com/mozilla-services/python-dockerflow/releases) - [Changelog](https://github.com/mozilla-services/python-dockerflow/blob/main/docs/changelog.rst) - [Commits](mozilla-services/python-dockerflow@2022.8.0...2024.1.0) --- updated-dependencies: - dependency-name: dockerflow dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
These paths are handled in DockerflowMiddleware, so the ones in our code are unused.
privaterelay/tests/views_tests.py
Outdated
@pytest.mark.django_db | ||
def test_heartbeat_view(client) -> None: | ||
response = client.get("/__heartbeat__") | ||
assert response.status_code in (200, 500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (non-blocking): why is status_code=500
okay here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's one of the two possible responses... Let's be bold and say it is 200 and see where it fails.
import silk | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: nice cleanup.
This expands on PR #4309 to use dockerflow 2024.1.0
privaterelay.utils.get_version_info
, which provides caching and a default response whenversion.json
is not present.REDIS_URL
is set/__version__
,/__heartbeat
, and/__lbheartbeat__
views, since DockerflowMiddleware handles these before we see them.How to test:
Load in local development, and try:
[ ] l10n changes have been submitted to the l10n repository, if any.[ ] I've added or updated relevant docs in the docs/ directory.[ ] All UI revisions follow the coding standards, and use Protocol tokens where applicable (see/frontend/src/styles/tokens.scss
).