Skip to content

refactor: rename internal key-value store records - #1285

Draft
vdusek wants to merge 1 commit into
masterfrom
refactor/rename-internal-kvs-records
Draft

vdusek wants to merge 1 commit into
masterfrom
refactor/rename-internal-kvs-records

Conversation

@vdusek

@vdusek vdusek commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Renames two internal records in the default key-value store to the APIFY_UPPER_SNAKE_CASE convention, which the JS SDK uses since apify/apify-sdk-js#893:

Record Before After
Storage alias mapping __STORAGE_ALIASES_MAPPING APIFY_STORAGE_ALIASES_MAPPING
Charging state __ACTOR_CHARGING_STATE APIFY_ACTOR_CHARGING_STATE

#1270 renames the child runs record.

A run reads these records only from its own default key-value store. A metamorph passes that store to the target Actor, which can use a newer SDK version. So the SDK also reads the alias mapping from the old key when the new key has no record, and the next write stores it under the new key. Without that, the target would create new alias storages. The charging state has no fallback: when it is missing, the SDK uses the charged event counts from the environment variable.

Closes: #1210

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 26, 2026
@vdusek vdusek self-assigned this Nov 26, 2026
@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 26, 2026
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.91%. Comparing base (f35487e) to head (bef9ab5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1285      +/-   ##
==========================================
+ Coverage   93.88%   93.91%   +0.03%     
==========================================
  Files          54       54              
  Lines        3893     3898       +5     
==========================================
+ Hits         3655     3661       +6     
+ Misses        238      237       -1     
Flag Coverage Δ
e2e 31.11% <45.45%> (+0.03%) ⬆️
integration 50.74% <45.45%> (-0.20%) ⬇️
unit 91.14% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek removed the adhoc Ad-hoc unplanned task added during the sprint. label Nov 28, 2026

This branch has not been deployed

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

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename internal key-value store records to the APIFY_UPPER_SNAKE_CASE convention

1 participant