Repository navigation
fix(action): keep one anonymous install id across Action runs - #295
Merged
Merged
Conversation
runner.temp starts empty on every run, so each Action run created a new random install_id and new project ids. One repository using the Action showed up as one install per run, which inflated installs and pushed retention towards zero. The Action now restores var/state/install_id and analytics_projects.sqlite with actions/cache, keyed by github.repository_id. The cached files hold only random ids; nothing about the repository is sent.
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.
Requested by Ajay Singh · project thread
What changed
${{ runner.temp }}/bubo, which starts empty on every run. Every run therefore created a new randominstall_idand new project IDs. One repository using the Action looked like one install per run, which inflated install counts and pushed retention towards zero.var/state/install_idandvar/state/analytics_projects.sqlitewithactions/cachebefore Bubo starts. The cache is keyed bygithub.repository_id, so a repository's runs share one anonymous install.actions/cachev6.1.0), like the other actions.Verification
tests/test_action_install_id.pyruns the realbubo initand the real identity code in two fresh roots. It carries over only the paths listed in the Action's cache step.Initialize Bubo workspace, is keyed by repository ID, and is pinned by SHA.ruff check,ruff format --checkandcz checkpass.docs/pages/github-action.mdxlists the new step.Generated by Claude Code