Skip to content

Fixes secret params resolution in functions emulator#7443

Merged
blidd-google merged 5 commits intomasterfrom
blidd-fix-secrets-emulator
Aug 6, 2024
Merged

Fixes secret params resolution in functions emulator#7443
blidd-google merged 5 commits intomasterfrom
blidd-fix-secrets-emulator

Conversation

@blidd-google
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
Member

@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

3 participants