2.3 KiB
2.3 KiB
PR#34: the statistics service is called statistics, not server
WARNING: This document describes only the change applied in this PR. It may already be outdated once the next PR is merged. Historic PR documentation is not maintained along with new PRs; treat it as a snapshot.
The Problem
The statistics service of werkrevisor, werkrevisor.javagil.de, lives in the directory server/,
and its Werkator build reported the status werkator/server.
Neither name says what the code is for: a reader of the status list could not tell
that it is the build and test of the statistics service, and not a server that runs.
The same name is in the Kotlin package, the jar, the environment variables and the systemd unit on mih09.
Non-Goals
- No change of behavior, endpoints, port or database.
- No change of
WERKREVISOR_STATS_URLandWERKREVISOR_STATS_TOKEN, which the reviewer uses to report.
The Scenarios
Feature: the statistics service is named after its purpose
Scenario#34.01: the service reads its settings from WERKREVISOR_STATISTICS_*
So that the names of the settings match the name of the service.
- Given
WERKREVISOR_STATISTICS_PORT,WERKREVISOR_STATISTICS_ADDRESSand the token variables - When the service starts
- Then it listens on that address and port and accepts those tokens
Verified by
The Solution
server/becomesstatistics/, the packagede.hoennig.werkrevisor.serverbecomesde.hoennig.werkrevisor.statistics, the Gradle project and jarwerkrevisor-statistics.- The environment variables
WERKREVISOR_SERVER_*becomeWERKREVISOR_STATISTICS_*. - The Werkator machine config on mih09, outside this repository, builds
statistics/under the build namestatisticsand the statuswerkator/werkrevisor-statistics; it buildsserver/on branches that still have it. - On mih09, the systemd unit, its directory and its env file become
werkrevisor-statistics. .werkrevisor.tomland the README name the new paths.- werkrevisor 0.20.3.
Prerequisite PRs
- PR#33: a reused line comment gets the text of the new review.