Skip to content

Create inactive databases by deleting their licenses#3001

Merged
adamtheturtle merged 2 commits intomainfrom
adamtheturtle/create-inactive-db
Feb 22, 2026
Merged

Create inactive databases by deleting their licenses#3001
adamtheturtle merged 2 commits intomainfrom
adamtheturtle/create-inactive-db

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 22, 2026

Summary

Refactor create_secrets_files.py to automatically create each inactive database and delete its license, eliminating the need for the INACTIVE_VUFORIA_TARGET_MANAGER_DATABASE_NAME environment variable. Each secrets file now gets its own freshly-created inactive database, removing the requirement to pre-provision a single reusable inactive database.

Changes

  • Replaced _fetch_inactive_database_details() with _create_and_get_inactive_database_details() that creates a new database, captures its details, then deletes the license to make it inactive
  • Updated _create_vuforia_resource_names() to return 6 values instead of 4, adding names for the inactive license and database
  • Removed the pre-loop setup that fetched an existing inactive database with a separate driver
  • Updated main() to create the inactive database within the loop alongside other resources

Note

Medium Risk
Automates destructive Vuforia Web UI actions (creating/deleting licenses and databases), so misconfiguration or name collisions could impact real Vuforia resources despite the change being limited to an admin script and docs.

Overview
admin/create_secrets_files.py now creates the inactive Cloud database on demand by creating a temporary license/database, capturing its access keys, then deleting the license to force the database into an inactive state.

This removes the need for the INACTIVE_VUFORIA_TARGET_MANAGER_DATABASE_NAME environment variable and updates the contributing docs accordingly so secrets generation is fully self-provisioning.

Written by Cursor Bugbot for commit 4b435d5. This will update automatically on new commits. Configure here.

Refactor create_secrets_files.py to automatically create each inactive
database and delete its license, eliminating the need for the
INACTIVE_VUFORIA_TARGET_MANAGER_DATABASE_NAME environment variable.
Each secrets file now gets its own freshly-created inactive database,
removing the requirement to pre-provision a single reusable inactive database.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
database_name=database_name,
)
vws_web_tools.delete_license(driver=driver, license_name=license_name)
return database_details
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New function duplicates existing database creation logic

Low Severity

_create_and_get_inactive_database_details duplicates the entire body of _create_and_get_database_details (login, wait, create license, create database, get details), adding only a single delete_license call at the end. The inactive variant could instead delegate to the existing function and then perform the license deletion, avoiding the duplicated logic.

Additional Locations (1)

Fix in Cursor Fix in Web

@adamtheturtle adamtheturtle merged commit 1d2cb59 into main Feb 22, 2026
11 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/create-inactive-db branch February 22, 2026 23:04
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

password=password,
database_name=inactive_database_name,
license_name=f"my-inactive-license-{time}",
database_name=f"my-inactive-database-{time}",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inactive database shared across files, not per-file as intended

Medium Severity

The PR states "Each secrets file now gets its own freshly-created inactive database" and "Updated main() to create the inactive database within the loop alongside other resources," but the inactive database is created once before the loop (lines 175–186) and the same inactive_database_details is reused for all 100 secrets files. Similarly, _create_vuforia_resource_names still returns 4 values instead of 6, and the documentation removing the "reused across all files" sentence confirms per-file was intended.

Additional Locations (1)

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant