Skip to content

Remove the Usage File section - #411

Merged
janvanicek merged 1 commit into
mainfrom
jv-PAT-2006-remove-usage-file
Aug 14, 2026
Merged

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

Conversation

@janvanicek

@janvanicek janvanicek commented Aug 10, 2026

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 — removes addJobUsage() from the client. The standalone keboola/job-queue-internal-api-php-client is synced from the monorepo, so it picks this up automatically and then needs a new major tag.
  4. 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

@janvanicek
janvanicek marked this pull request as ready for review August 11, 2026 11:54
keboola-pr-reviewer-bot

This comment was marked as outdated.

@keboola-pr-reviewer-bot keboola-pr-reviewer-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: needs_human (risk 2/5) · profile docs

Substantive removal of a documented feature section — cross-repo/deployment coordination can't be verified from the diff, so route to a human.

Impact flags: possible rollback re-introduction — see Check Run summary.

Suggested reviewers: @keboola/docs

@janvanicek
janvanicek merged commit 8ab8d99 into main Aug 14, 2026
2 checks passed
@janvanicek
janvanicek deleted the jv-PAT-2006-remove-usage-file branch August 14, 2026 13:32
Iamfle4ka pushed a commit that referenced this pull request Aug 21, 2026
The only conflict was extend/common-interface/config-file.md: main removed
the Usage File section (PAT-2006, #411) while this branch replaces the page
with its redirect stub. The stub wins — the Usage File removal already
landed on the help side in connection-docs#1090, so no content is lost.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants