Skip to content

Remove the Usage File section - #411

Draft
janvanicek wants to merge 1 commit into
mainfrom
jv-PAT-2006-remove-usage-file
Draft

Remove the Usage File section#411
janvanicek wants to merge 1 commit into
mainfrom
jv-PAT-2006-remove-usage-file

Conversation

@janvanicek

Copy link
Copy Markdown
Contributor

Context

Linear: PAT-2006

The usage file has never worked. A component could report its own consumption by writing out/usage.json; job-runner's UsageFile read it, validated it, and handed it to Client::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-client 25.5.0). job-runner was the only caller, and nothing subclasses Client.

So usageData is [] on every queue v2 job (100% of jobs in the last 90 days — 23,010,147). Nothing consumes it either: zero hits for usageData/usage_data in telemetry-billing, billing-api, telemetry-billing-gcp or connection, and the telemetry kbc_job extract has no usage column.

UsageFileTest mocked addJobUsage and 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

  1. keboola/docker-bundleRunner::run() loses its fifth parameter
  2. keboola/job-runner — then composer update keboola/dockerbundle
  3. keboola/job-queue-internal-api-php-client — new major tag (safe once job-runner no longer calls the method)
  4. keboola/job-queue — monorepo copy of the client, independent
  5. keboola/developers-docs + keboola/connection-docs — last, so the docs do not get ahead of the deployed behaviour

What 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:

Claim Status
"the content of the usage file is strictly validated and a wrong format will cause a component failure" true today — but the validating code is removed in keboola/docker-bundle#810
"processed and stored within a job, so it can be analyzed, processed and aggregated later" false since 2019
"translate the usage to Keboola credits … when you need your customers to pay using your component or service" false since 2019

So the net effect of following this page was: a vendor could fail their own customers' jobs with a malformed usage.json and get nothing in return.

Checked that no page links to the removed #usage-file anchor.

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.

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.
@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

PAT-2006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant