Table: planetscale_deploy_request - Query PlanetScale Deploy Requests using SQL
PlanetScale Deploy Request is a feature within PlanetScale that allows you to manage and monitor the deployment of changes to your databases. It provides a centralized way to track and manage deployment requests for various database resources. PlanetScale Deploy Request helps you stay informed about the status and progress of your deployments and take appropriate actions when predefined conditions are met.
Table Usage Guide
The planetscale_deploy_request
table provides insights into deployment requests within PlanetScale. As a DevOps engineer, explore deployment-specific details through this table, including status, progress, and associated metadata. Utilize it to uncover information about deployments, such as those with pending status, the progress of each deployment, and the verification of deployment details.
Examples
List all deploy requests for all databases
Explore which deployment requests have been made for all databases, which can help you keep track of changes and manage resources more effectively.
select *from planetscale_deploy_request;
select *from planetscale_deploy_request;
List deploy requests for a specific database
Discover the segments that have requested deployment for a particular database. This can be useful to track and manage deployment requests, ensuring that they are handled appropriately.
select *from planetscale_deploy_requestwhere database_name = 'test';
select *from planetscale_deploy_requestwhere database_name = 'test';
List open deploy requests for all databases
Explore which deploy requests are currently open across all databases. This is useful for identifying ongoing deployments and managing resource allocation.
select *from planetscale_deploy_requestwhere state = 'open';
select *from planetscale_deploy_requestwhere state = 'open';
List deploy requests with no changes
Explore the instances where deployment requests have been made, but no changes were made. This can help in identifying and reducing unnecessary deployment requests, thereby streamlining the deployment process.
select *from planetscale_deploy_requestwhere deployment ->> 'state' = 'no_changes';
select *from planetscale_deploy_requestwhere json_extract(deployment, '$.state') = 'no_changes';
Schema for planetscale_deploy_request
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
approved | boolean | True if the deploy request is approved. | |
branch | text | Deploy request branch. | |
closed_at | timestamp with time zone | When the deploy request was closed. | |
created_at | timestamp with time zone | When the deploy request was created. | |
database_name | text | = | Name of the database. |
deployment | jsonb | Details of the deployment. | |
id | text | Unique ID for the deplloy request. | |
into_branch | text | Deploy request into branch. | |
notes | text | Notes for the deploy request. | |
number | bigint | = | Number for this deploy request. |
organization_name | text | Name of the organization. | |
state | text | State of the deploy request. | |
updated_at | timestamp with time zone | When the deploy request was updated. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- planetscale
You can pass the configuration to the command with the --config
argument:
steampipe_export_planetscale --config '<your_config>' planetscale_deploy_request