Skip to content

Conversation

@blidd-google
Copy link
Contributor

The functions emulator will try to resolve secrets twice - we disable the secret resolution in deploy flow's resolveBackend (which is reused by the emulator to discover functions triggers) so the emulator can access handle emulator-specific secret resolution (i.e. prioritizing .secret.local).

Fixes #7401.

@blidd-google blidd-google self-assigned this Jul 12, 2024
Copy link
Contributor

@aalej aalej left a comment

Choose a reason for hiding this comment

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

This LGTM! Tested the PR using https://github.com/aalej/issues-7401?tab=readme-ov-file#pr-test. Could you add a changelog entry?

@blidd-google blidd-google enabled auto-merge (squash) July 15, 2024 19:55
@blidd-google blidd-google requested a review from aalej July 15, 2024 19:55
userEnvOpt: UserEnvsOpts,
userEnvs: Record<string, string>,
nonInteractive?: boolean,
isEmulator = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: this list of args is quite long, and it would be easy to transpose nonInteractive and isEmulator. Consider switching to a parameter object. ie:

export async function resolveBackend( args: {
  build: Build,
  firebaseConfig: FirebaseConfig,
  userEnvOpt: UserEnvsOpts,
  userEnvs: Record<string, string>,
  nonInteractive?: boolean,
  isEmulator?: boolean,
  })

Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

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

LGTM, with a suggestion

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.

Functions emulator should not requires authenticated secret manager calls if .secret.local is defined

3 participants