Repository navigation
Export has_backup_code flag in Superset account dump - #311
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
calellowitz
approved these changes
Oct 8, 2026
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.
Technical Summary
Adds a
has_backup_codecolumn to the daily ConnectUser export to Superset. It is True when the user has a backup code (recovery_pinis set and not empty), otherwise False. The aim is to find out why about 1k PersonalID accounts have no backup code.CSVGeneratorreadsqueryset.values(*fields), so the column comes from a queryset annotation. The newconnect_user_dump_queryset()adds it, andupload_connect_users_to_supersetnow uses that queryset. The value is worked out in the database, so neither the code nor its hash leaves connect-id. The column is added at the end, so the existing columns keep their positions.Logging and monitoring
None needed. The new column shows up in the Superset account table after the next daily upload.
Safety Assurance
Safety story
This only changes the export: one extra column, and no change to the model or the API. The configuration-session export is unchanged.
Automated test coverage
test_csv_generator_outputs_expected_rowsnow gives the user a backup code and checks the new column.test_csv_generator_exports_has_backup_codecovers three cases: code set (True), null (False) and empty string (False). Each case also checks that the hash appears nowhere in the CSV.users/tests/test_tasks.pypasses 16 of 16, and the fulluserssuite passes 458.QA Plan
None needed beyond the tests. After deploy, check that the Superset table has the column.
Deployment
No manual steps. The upload replaces the Superset table each run (
already_exists: replace), so the new column appears without a schema change.Labels & Review
🤖 Generated with Claude Code