Skip to content
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

feat(cli): run watch mode #2341

Merged
merged 18 commits into from
Aug 29, 2024
Merged

feat(cli): run watch mode #2341

merged 18 commits into from
Aug 29, 2024

Conversation

DanielHougaard
Copy link
Contributor

@DanielHougaard DanielHougaard commented Aug 27, 2024

Description 📣

This PR aims to add support for secret watching. The user will now be able to pass a --watch flag to the infisical run command. When the watch flag is passed, Infisical will automatically reload the command passed to infisical run.

New flow example

  1. User runs infisical run --watch --comand="while true; do printenv; sleep 500000; done". (Both --command and -- supports the new watch flag)
    • At first this acts exactly like it always has, and prints the environment to the console and hangs until interrupted.
  2. The user now changes a secret in Infisical.
  3. At some point within the next 10 seconds (due to polling), the application will detect a change in the Infisical secrets, and then trigger a reload of the application.
  4. The application reloads and the new secrets are loaded into the application.

This is especially useful in local development setups, where the user usually would have to manually restart the entire process for the new secrets to load in. This implementation streamlines everything and in a sense acts like Nodemon acts when detecting changes in a Node.js project.

This can also be used in production environments where you'd want to reload an application when secret changes happen in Infisical.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

@DanielHougaard DanielHougaard changed the title Feat: run watch mode feat(cli): run watch mode Aug 27, 2024
@DanielHougaard DanielHougaard requested review from maidul98 and removed request for maidul98 August 27, 2024 16:24
@DanielHougaard DanielHougaard marked this pull request as ready for review August 27, 2024 18:06
@DanielHougaard DanielHougaard self-assigned this Aug 27, 2024
@DanielHougaard DanielHougaard requested review from sheensantoscapadngan and removed request for maidul98 August 28, 2024 15:49
@DanielHougaard DanielHougaard merged commit d0292aa into main Aug 29, 2024
3 checks passed
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.

2 participants