Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented May 9, 2025

When secret is included in any function that's being deploy, we'll ensure that the Secret Manager API is enabled before proceeding with the deploy.

Fixes #5307

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes the issue of ensuring the Secret Manager API is enabled during function deployment when secrets are present. Key changes include adding the secretManagerOrigin import, refactoring API enablement logic into the new ensureAllRequiredAPIsEnabled function, and adding corresponding tests for the new behavior.

  • Add secretManagerOrigin import and update API enablement logic.
  • Extract API enablement into ensureAllRequiredAPIsEnabled, including secret handling for secrets.
  • Extend test coverage for the new API enablement function.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/deploy/functions/prepare.ts Refactored API enablement logic and ensured Secret Manager API is enabled when secrets are used.
src/deploy/functions/prepare.spec.ts Added tests to validate the new ensureAllRequiredAPIsEnabled function.
@taeold taeold force-pushed the dl-fn-enable-sm branch from 8812e8a to 80be005 Compare May 9, 2025 20:25
@taeold taeold enabled auto-merge (squash) May 9, 2025 20:26
@taeold taeold merged commit b612001 into master May 13, 2025
48 of 50 checks passed
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants