Remove the Usage File section - #411
Draft
janvanicek wants to merge 1 commit into
Draft
Conversation
The usage file has never worked. `job-runner` read `/data/out/usage.json`, validated it and handed it to `Client::addJobUsage()`, which has had an empty body since 2019 — the payload was always discarded, so `usageData` on a job is always empty and nothing translates it to credits. Two of the three claims in this section were therefore false: the payload was never "stored within a job", and it never fed billing. The one true claim - that a wrong format fails the component - goes with it, because the code that validated the file is being removed too. No page links to the removed anchor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Linear: PAT-2006
The usage file has never worked. A component could report its own consumption by writing
out/usage.json;job-runner'sUsageFileread it, validated it, and handed it toClient::addJobUsage()— a method with an empty body (// todo implement this) since it was introduced on 2019-07-04 (af3033b). Verified at the version pinned into job-runner's production build (keboola/job-queue-internal-api-php-client25.5.0).job-runnerwas the only caller, and nothing subclassesClient.So
usageDatais[]on every queue v2 job (100% of jobs in the last 90 days — 23,010,147). Nothing consumes it either: zero hits forusageData/usage_dataintelemetry-billing,billing-api,telemetry-billing-gcporconnection, and the telemetrykbc_jobextract has no usage column.UsageFileTestmockedaddJobUsageand asserted it was called, so it stayed green against a method that does nothing — that is why this survived seven years.Only one component in the org writes a usage file:
keboola.ex-google-analytics-v4. Its reports have been discarded all along, so nothing changes for it.Deployment order for this batch
keboola/docker-bundle—Runner::run()loses its fifth parameterkeboola/job-runner— thencomposer update keboola/dockerbundlekeboola/job-queue-internal-api-php-client— new major tag (safe once job-runner no longer calls the method)keboola/job-queue— monorepo copy of the client, independentkeboola/developers-docs+keboola/connection-docs— last, so the docs do not get ahead of the deployed behaviourWhat this PR does
Removes the Usage File section from the common-interface config-file page.
Of its three claims, two were false and the third is being made false by the code change:
So the net effect of following this page was: a vendor could fail their own customers' jobs with a malformed
usage.jsonand get nothing in return.Checked that no page links to the removed
#usage-fileanchor.Release Notes
Justification, description
The page documented a monetization mechanism that has never been wired up. Keeping it invites component authors to build against a dead feature.
Plans for Customer Communication
Worth a line in the developer-facing changelog: the usage file is withdrawn because it never took effect. Any vendor who built on it has been getting
[]from the Jobs API all along, so no invoicing behaviour changes. Nothing to notify end customers about.Impact Analysis
Documentation only. The same section is removed from the sibling docs repo in the paired PR, since both sites publish it.
Deployment Plan
Merge last in the batch, after the job-runner release, so the docs do not describe behaviour that is still live.
Rollback Plan
Revert the commit.
Post-Release Support Plan
If a vendor asks where the usage file went, the answer is that it never stored anything; point them at PAT-2006.