winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.94k stars 194 forks source link

Improve Wing App Deployment Experience by Pre-Enabling Required GCP APIs #6327

Open garysassano opened 4 months ago

garysassano commented 4 months ago

Use Case

Currently, deploying Wing apps to GCP can be inefficient due to the need to manually enable required APIs. Unlike other cloud providers, GCP starts with a limited set of APIs enabled by default, requiring additional steps and wait times during deployment.

Terraform addresses this by using a chain of dependencies and sleep timers to ensure API activation before resource creation. However, this approach is time-consuming and unreliable, especially as the number of required APIs increases.

For example, a Wing app using 5 APIs not enabled by default could experience a 5-minute delay due to individual sleep timers. This inefficiency impacts developer experience and slows down the deployment process.

Proposed Solutions

To streamline Wing app deployment on GCP and eliminate unnecessary wait times, I propose two potential solutions:

  1. CLI Command: Introduce a CLI command that enables all APIs potentially required by Wing apps. Users could run this command once per project to pre-enable APIs and avoid individual activation delays during deployments.
  2. Automated API Activation: Implement a single 60-second sleep within the GCP cloud.App and automatically enable all potentially required APIs. This approach would minimize wait times while ensuring API availability for resource creation.

Justification

Pre-enabling APIs aligns with the standard practice of other cloud providers like AWS and Azure, where all APIs are readily available by default. This eliminates the need for manual intervention and improves the overall developer experience. Additionally, API activation is limited to the specific GCP project used by the Wing app, mitigating any concerns regarding broader account access.

Benefits

Community Notes

github-actions[bot] commented 1 month ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!