CLI command
probierz status-page publish
Put the page where the product's customers read it, with the product's own publish command.
Invocation#
probierz status-page publish <APP> --days <N>Required inputs and options#
<APP>is the product, asprobierz apps listnames it.--days <N>is the window, a whole number of days above zero counted back from now; it is required, so no page silently covers a span nobody chose.- The product's manifest names its publish command:
statusPage: {publish: {command: <program>, args: [...], cwd: <directory under its repository>}}, run in its repository like its data hooks.
Output and state effects#
Composes the page as build does into test-results/<APP>/status-page/index.html, then runs the publish command with that file's path in PROBIERZ_STATUS_PAGE, so the product copies or uploads it to wherever its customers read it; prints {published, command, page}. Probierz holds no credential of the place it is served from; the product's command does. With probierz config set status-page.publish-days <N>, every kept run of a product that declares statusPage.publish publishes the page over the last N days the same way, so customers read it as of the last run; the run's afterRun.statusPage says what was published (published, file, command, days) or why not (the key unset, no publish command, or the command's refusal), and a publication that fails changes no run's verdict.
Exact refusals#
publish-undeclared(exit 1): nostatusPage.publish, or one naming no command, an argument that is no text or acwdthat is no path; nothing is built.publish-failed(exit 1): the command could not be run, or ended other than with success, with what it said; the page stays built, and customers still read the one published before.- Real test: tests/statuspage/publish.rs.
Declared refusals#
What probierz refusals list declares for this command at revision d2cd6156e8b8dc6204dab7b46ec0b34b2bb03cea (probierz 0.1.7 (revision unknown, not built from a git checkout)): each cause's id, the operation declaring it, its exit status and code, and its remedy.
workspace-unset(probierz.manifest.discover, exit 1, config): finding the repositories that hold product manifests: this instance names no workspace, so there is no directory of repositories to look in. runprobierz config set workspace <directory holding one checkout per repository>.workspace-unreadable(probierz.manifest.discover, exit 1, config): listing {workspace}: the operating system would not list it: {error}. give this user read permission on {workspace}, or set another workspace withprobierz config set workspace.listing-failed(probierz.manifest.discover, exit 1, config): asking the git of {repository} which manifests it tracks: {cause}. make {repository} a git repository this user can read.untracked(probierz.manifest.discover, exit 1, config): reading the manifests of {repository}: {file} is not tracked by the repository's git, so no other host and no review sees it. rungit -C {repository} add {relative}and commit it, or remove the file.duplicate(probierz.manifest.discover, exit 1, config): finding the manifest of {app}: two repositories declare {app}: {first} and {second}. keep the manifest of {app} in the product's own repository and remove the other.not-found(probierz.manifest.discover, exit 1, config): finding the manifest of {app}: no repository under {workspace} has .probierz/{app}.yaml. add .probierz/{app}.yaml to the product's repository (probierz project adoptorprobierz author manifestwrite it), or name an appprobierz apps listlists.file-name-invalid(probierz.manifest.discover, exit 1, config): finding the manifests of {repository}: {file} names app "{app}", which is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. rename it .probierz/<appId>.yaml with the id it declares, withgit mv.repository-name-invalid(probierz.manifest.discover, exit 1, config): finding repository "{name}" in the workspace: a manifest names a checkout directly under the workspace, and "{name}" would name another place. name the checkout by its directory name under the workspace in repositories[].repository.app-id-invalid(probierz.manifest.load, exit 2, refused): naming an app: "{app}" is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. name an appprobierz apps listlists.manifest-unreadable(probierz.manifest.load, exit 1, config): reading {file}: {error}. write {file} as YAML the reader accepts (its line and column are named), then load it again.manifest-invalid(probierz.manifest.load, exit 1, config): judging {file}: {problem}. fix the declaration in {file};probierz app checknames every problem it has with the world once it loads.manifest-id-mismatch(probierz.manifest.load, exit 1, config): loading the manifest of {app}: {file} is named for {app} and declares appId {declared}. declareappId: {app}in {file}, or rename the file for the app it declares withgit mv.target-invalid(probierz.status-page, exit 1, config): reading this instance's availability target: status-page.availability is {target}, and a share of runs is at most 1, so no journey could meet it. set it to a share from 0 to 1 withprobierz config set status-page.availability 0.99, or unset it.out-unwritable(probierz.status-page, exit 1, config): writing the status page to {out}: {error}. name with --out a file in a directory that exists and this user may write.page-undeclared(probierz.status-page, exit 1, config): reading where {app} publishes its status page: {problem}. declare in the product's manifeststatusPage: {url: <its /api/v2/summary.json>, components: {<journey>: <component name>}}.page-unanswered(probierz.status-page, exit 69, infra_down): reading the product's status page {url}: {problem}. check that this machine reaches the page and that it serves the Statuspage summary (components, each withnameandstatus), then ask again.journey-undeclared(probierz.status-page, exit 1, config): holding the journey {journey} of {app} against its status page: statusPage.components names {journey}, which the manifest declares as no journey. map a journey the manifest declares, asprobierz app show {app}lists them.component-missing(probierz.status-page, exit 1, config): finding the component {component} on {url}: the page lists no component of that name; it lists {components}. map the journey to a component the page lists, by its name as the page writes it.outage-hidden(probierz.status-page, exit 1, refused): holding {app}'s status page {url} to what its journeys did: the page says operational where Probierz saw the product down: {hidden}. post the outage on the product's status page, or fix the product so its journeys work again.incident-unreported(probierz.status-page, exit 1, refused): holding {app}'s incident history {url} to what its journeys did: Probierz saw the product down where the history posts no incident for its component: {unreported}. post the incident on the product's status page for that component and time, so its history says what its customers met.publish-undeclared(probierz.status-page, exit 1, config): reading how {app} publishes its status page: its manifest's statusPage.publish {problem}. declare the product's own command that puts the page where its customers read it:statusPage: {publish: {command: <program>, args: [...]}}; it finds the page in PROBIERZ_STATUS_PAGE.publish-failed(probierz.status-page, exit 1, refused): publishing {app}'s status page with {command}: {why}. make the product's publish command reach where the page is served, then publish again.
Source snapshot#
Generated from the Rust binaries at revision 99a74945a3598a8d73b6c6cbe5aae4f283becea3 of Probierz's private source repository.
Combined help SHA-256: 77529678a61237f774b59e76df0d1907cb749ef5da56d2ed913b040793b7d30b; binary SHA-256: be9e0eaff0e6ea50403a0c6f6d467697a4eac676f9523b8dc13a596d2b5526c5.