{"id":42482638,"url":"https://github.com/cloudspannerecosystem/spool","last_synced_at":"2026-01-28T11:15:52.251Z","repository":{"id":42438670,"uuid":"219676843","full_name":"cloudspannerecosystem/spool","owner":"cloudspannerecosystem","description":"A CLI tool to manage Cloud Spanner databases for testing.","archived":false,"fork":false,"pushed_at":"2025-10-27T06:21:17.000Z","size":452,"stargazers_count":25,"open_issues_count":7,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-29T05:52:22.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudspannerecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-05T06:49:54.000Z","updated_at":"2025-06-06T09:09:26.000Z","dependencies_parsed_at":"2024-04-19T11:31:17.746Z","dependency_job_id":"3daae15e-f917-4a34-8e64-46357d94ba7a","html_url":"https://github.com/cloudspannerecosystem/spool","commit_stats":null,"previous_names":["gcpug/spool"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cloudspannerecosystem/spool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudspannerecosystem%2Fspool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudspannerecosystem%2Fspool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudspannerecosystem%2Fspool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudspannerecosystem%2Fspool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudspannerecosystem","download_url":"https://codeload.github.com/cloudspannerecosystem/spool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudspannerecosystem%2Fspool/sbom","scorecard":{"id":293298,"data":{"date":"2025-08-11","repo":{"name":"github.com/cloudspannerecosystem/spool","commit":"07de407851f39c88c507fc6f716ea00f5cb5da36"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Code-Review","score":5,"reason":"Found 11/21 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":4,"reason":"4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_and_test.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_and_test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudspannerecosystem/spool/build_and_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_and_test.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudspannerecosystem/spool/build_and_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudspannerecosystem/spool/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudspannerecosystem/spool/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudspannerecosystem/spool/release.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/cloudspannerecosystem/spool/releases/224577990","Warn: release artifact v0.2.2 not signed: https://api.github.com/repos/cloudspannerecosystem/spool/releases/218141233","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/cloudspannerecosystem/spool/releases/224577990","Warn: release artifact v0.2.2 does not have provenance: https://api.github.com/repos/cloudspannerecosystem/spool/releases/218141233"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yaml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Info: 'stale review dismissal' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Info: codeowner review is required on branch 'master'","Info: 'last push approval' is required to merge on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":6,"reason":"SAST tool is not run on all commits -- score normalized to 6","details":["Warn: 11 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3485 / GHSA-c6gw-w398-hv78","Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T18:51:44.325Z","repository_id":42438670,"created_at":"2025-08-17T18:51:44.326Z","updated_at":"2025-08-17T18:51:44.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-28T11:15:51.073Z","updated_at":"2026-01-28T11:15:52.245Z","avatar_url":"https://github.com/cloudspannerecosystem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spool\n\n[![build and test](https://github.com/cloudspannerecosystem/spool/actions/workflows/build_and_test.yaml/badge.svg)](https://github.com/cloudspannerecosystem/spool/actions/workflows/build_and_test.yaml)\n\nA CLI tool to manage [Cloud Spanner](https://cloud.google.com/spanner) databases for testing.\n\n![spool](https://user-images.githubusercontent.com/2238852/68204102-a0764580-000a-11ea-879b-1acaf1c699c8.gif)\n\nPlease feel free to report issues and send pull requests, but note that this\napplication is not officially supported as part of the Cloud Spanner product.\n\n## Motivation\n\nWhen the development of spool started, the [Cloud Spanner\nEmulator](https://cloud.google.com/spanner/docs/emulator) wasn't available yet.\nWhen using Cloud Spanner instances for continuous integration tests, it is\ninefficient to create a new test database on every run.\nThis tool lets you reuse test databases in CI tests.\n\n## Installation\n\n```shell\n$ go get -u github.com/cloudspannerecosystem/spool/cmd/spool\n```\n\n## Setup\n\nSpool requires a database for metadata to manage databases.\nThe following command sets up the database.\n\n```shell\n$ spool --project=${PROJECT} --instance=${INSTANCE} --database=${SPOOL_DATABASE} setup\n```\n\n## Usage\n\n```shell\nusage: spool [\u003cflags\u003e] \u003ccommand\u003e [\u003cargs\u003e ...]\n\nA CLI tool to manage Cloud Spanner databases for testing.\n\nFlags:\n      --help               Show context-sensitive help (also try --help-long and --help-man).\n  -p, --project=PROJECT    Set GCP project ID. (use $SPANNER_PROJECT_ID or $GOOGLE_CLOUD_PROJECT as default value)\n  -i, --instance=INSTANCE  Set Cloud Spanner instance name. (use $SPANNER_INSTANCE_ID as default value)\n  -d, --database=DATABASE  Set Cloud Spanner database name. (use $SPOOL_SPANNER_DATABASE_ID as default value)\n  -s, --schema=SCHEMA      Set schema file path.\n\nCommands:\n  help [\u003ccommand\u003e...]\n    Show help.\n\n  setup\n    Setup the database for spool metadata.\n\n  create --db-name-prefix=DB-NAME-PREFIX [\u003cflags\u003e]\n    Add new databases to the pool.\n\n  get\n    Get a idle database from the pool.\n\n  get-or-create --db-name-prefix=DB-NAME-PREFIX\n    Get or create a idle database from the pool.\n\n  list [\u003cflags\u003e]\n    Print databases.\n\n  put \u003cdatabase\u003e\n    Return the database to the pool.\n\n  clean [\u003cflags\u003e]\n    Drop all idle databases.\n```\n\n## Sample CircleCI configuration\n\n```yaml\nversion: 2\n\njobs:\n  build:\n    docker:\n      - image: golang:1.13-stretch\n        environment:\n          PROJECT: project\n          INSTANCE: instance\n          SPOOL_DATABASE: spool\n          PATH_TO_SCHEMA_FILE: path/to/schema.sql\n          DATABASE_PREFIX: spool\n    working_directory: /go/src/github.com/user/repo\n    steps:\n      - checkout\n      - run:\n          name: set GitHub token\n          command: |\n            rm -f ~/.gitconfig\n            echo \"machine github.com login ${GITHUB_TOKEN}\" \u003e ~/.netrc\n      - run:\n          name: install spool\n          command: go get -u github.com/cloudspannerecosystem/spool/cmd/spool\n      - run:\n          name: get database for testing\n          command: |\n            DATABASE=$(spool --project=${PROJECT} --instance=${INSTANCE} --database=${SPOOL_DATABASE} --schema=${PATH_TO_SCHEMA_FILE} get-or-create --db-name-prefix=${DATABASE_PREFIX})\n            echo \"export DATABASE=${DATABASE}\" \u003e\u003e ${BASH_ENV}\n      - run:\n          name: run tests\n          command: echo \"run your tests with /projects/${PROJECT}/instances/${INSTANCE}/databases/${DATABASE}\"\n      - run:\n          name: release database\n          when: always\n          command: spool --project=${PROJECT} --instance=${INSTANCE} --database=${SPOOL_DATABASE} --schema=${PATH_TO_SCHEMA_FILE} put ${DATABASE}\n\n  cleanup-old-test-db:\n    docker:\n      - image: golang:1.13-stretch\n        environment:\n          PROJECT: project\n          INSTANCE: instance\n          SPOOL_DATABASE: spool\n          PATH_TO_SCHEMA_FILE: path/to/schema.sql\n    working_directory: /go/src/github.com/user/repo\n    steps:\n      - checkout\n      - run:\n          name: set GitHub token\n          command: |\n            rm -f ~/.gitconfig\n            echo \"machine github.com login ${GITHUB_TOKEN}\" \u003e ~/.netrc\n      - run:\n          name: install spool\n          command: go get -u github.com/cloudspannerecosystem/spool/cmd/spool\n      - run:\n          name: cleanup databases\n          command: spool --project=${PROJECT} --instance=${INSTANCE} --database=${SPOOL_DATABASE} --schema=${PATH_TO_SCHEMA_FILE} clean --all --force --ignore-used-within-days=7\n\nworkflows:\n  version: 2\n  build-workflow:\n    jobs:\n      - build:\n          context: org-global\n  cleanup-workflow:\n    triggers:\n      - schedule:\n          cron: '0 9 * * *'\n          filters:\n            branches:\n              only: master\n    jobs:\n      - cleanup-old-test-db:\n          context: org-global\n```\n\n## How to development\n\nSetup environment (do it once)\n\n```shell\n$ export CLOUDSDK_ACTIVE_CONFIG_NAME=spool-test-config\n$ gcloud config configurations create --no-activate $CLOUDSDK_ACTIVE_CONFIG_NAME\n$ gcloud config set auth/disable_credentials true\n$ gcloud config set project spool-test\n$ gcloud config set api_endpoint_overrides/spanner http://localhost:9020/\n```\n\nSetup environment (do this before execute testing)\n\n```shell\n$ docker compose up -d --build --force-recreate\n$ export CLOUDSDK_ACTIVE_CONFIG_NAME=spool-test-config\n$ make setup-emulator\n$ make test\n$ docker compose down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudspannerecosystem%2Fspool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudspannerecosystem%2Fspool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudspannerecosystem%2Fspool/lists"}