Repository navigation
feat(export-to-core): add Looker Core export tools - #34
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of tools for migrating customer-hosted Looker instances to Looker (Google Cloud core). It includes a unified export script (looker_export.py) that handles pre-flight validation, database extraction (supporting both mysqldump and mydumper), filesystem staging, and secure artifact encryption using Cloud KMS and Tink. Additionally, a diagnostic script (collect_looker_diagnostics.py) is provided for pre-migration analysis. The review identified two technical improvements: a fix for non-portable os.fsync usage on read-only file descriptors and a robustness improvement for signal registration in multi-threaded environments.
…d thread-safe signals
…ds, and isolate mysql stderr
shubhamitabh
approved these changes
Nov 19, 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.
Summary
Adds
export-to-core/, providing self-service customer-hosted (on-premises / IaaS) Looker to Looker (Google Cloud core) diagnostic, export, and encryption tooling:looker_export.py(Unified Export & Encryption Script):Python >= 3.9,git >= 2.36,MySQL >= 8.0/MariaDB >= 10.4), free local staging disk capacity (1.5xpeak space), Application Default Credentials (gcloud auth application-default loginorGOOGLE_APPLICATION_CREDENTIALS.jsonservice account key validation), Cloud KMS symmetric key access, and RFC 3394 AES Key Unwrap of the active Lookerencryption_keyKEK usingLOOKER_MASTER_KEY.mysqldump+gzip) and multi-threaded (mydumper >= 0.16.0+zstd) non-locking extraction, applying collation/schema normalization (utf8mb4_general_ci,BIGINT(19)compatibility), schema-only export ofoauth_user_state, optional schedule disabling (DISABLE_SCHEDULED_PLANS=trueby default), and selectivesettingrow preservation (crypt_canary_gcmandclosed_system) strictly on staged output files without modifying the live source database.models,bare_models,deploy_keys,git_hooks,models-self-service,models-user-looker,remote_dependencies, and.persistent_store) and normalizes Git/SSH paths for Looker (Google Cloud core).LOOKER_MASTER_KEYwith the customer's Cloud KMS CMEK, encrypts database and file system archives using Tink Streaming AEAD (AES128_CTR_HMAC_SHA256_1MB) with Cloud KMS Envelope AEAD handles, and writesfinal_artifacts/(mysql-data,mysql-handle,fs-data,fs-handle,metadata.json) with0600permissions.collect_looker_diagnostics.py(Optional Pre-Migration Diagnostics):du -hs), directory tree layout (excludingmodels-user-[0-9]*developer directories), total database footprint (Database Size Summary:total_db_bytes,total_db_mib,total_db_gib, and estimated1.5xstaging disk space), and per-table version/charset/collation/size sorted largest-first.export-to-core/README.md& rootREADME.md:roles/cloudkms.cryptoKeyEncrypterDecrypter) and Cloud Storage (roles/storage.objectUser/roles/storage.objectAdmin) IAM permissions for interactive ADC orGOOGLE_APPLICATION_CREDENTIALS.jsonservice account keys, configuration variables, output deliverables, and test execution.export-to-core/tests/test_export_to_core.py:Testing