Skip to content

feat: Implement --ephemeral flag to prevent emulator data export #8787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: newExports
Choose a base branch
from

Conversation

christhompsongoogle
Copy link
Contributor

The --ephemeral flag for the emulators:start command ensures that no data is exported when the emulators stop, even if --export-on-exit is specified or if the emulators:export command is used during the session.

Import functionality remains unaffected when using --ephemeral with --import.

Changes include:

  • Modified controller.ts to check for options.ephemeral in exportOnExit and exportEmulatorData functions, preventing export and logging a message.
  • Added integration tests in scripts/emulator-import-export-tests/tests.ts to verify:
    • No export occurs with --export-on-exit in ephemeral mode.
    • Data import works, but subsequent export is prevented in ephemeral mode.
    • The emulators:export command does not export data if emulators were started with --ephemeral.

The --ephemeral flag for the `emulators:start` command ensures that no
data is exported when the emulators stop, even if `--export-on-exit`
is specified or if the `emulators:export` command is used during the session.

Import functionality remains unaffected when using `--ephemeral` with `--import`.

Changes include:
- Modified `controller.ts` to check for `options.ephemeral` in
  `exportOnExit` and `exportEmulatorData` functions, preventing export
  and logging a message.
- Added integration tests in `scripts/emulator-import-export-tests/tests.ts`
  to verify:
    - No export occurs with `--export-on-exit` in ephemeral mode.
    - Data import works, but subsequent export is prevented in ephemeral mode.
    - The `emulators:export` command does not export data if emulators
      were started with `--ephemeral`.
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.

1 participant