Skip to content

Commit 46b37a7

Browse files
committed
change flag name
1 parent 807aa40 commit 46b37a7

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

e2e/proxy/proxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func startProxy(t *testing.T, ctx context.Context, infisicalURL string, config P
6868
}
6969

7070
if config.UseSSE {
71-
args = append(args, "--event-subscription-enabled")
71+
args = append(args, "--enable-event-subscriptions")
7272
args = append(args, "--client-id", config.ClientID)
7373
args = append(args, "--client-secret", config.ClientSecret)
7474
if config.PollingFallbackInterval != "" {

packages/cmd/proxy.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ func startProxyServer(cmd *cobra.Command, args []string) {
142142
util.PrintErrorMessageAndExit(fmt.Sprintf("Invalid polling-fallback-interval format '%s'. Use formats like 1m, 5m, 10m", pollingFallbackIntervalStr))
143143
}
144144

145-
useSSE, err := cmd.Flags().GetBool("event-subscription-enabled")
145+
useSSE, err := cmd.Flags().GetBool("enable-event-subscriptions")
146146
if err != nil {
147-
util.HandleError(err, "Unable to parse event-subscription-enabled flag")
147+
util.HandleError(err, "Unable to parse enable-event-subscriptions flag")
148148
}
149149

150150
clientId, err := util.GetCmdFlagOrEnvWithDefaultValue(cmd, "client-id", []string{util.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID_NAME}, "")
@@ -158,7 +158,7 @@ func startProxyServer(cmd *cobra.Command, args []string) {
158158
}
159159

160160
if useSSE && (clientId == "" || clientSecret == "") {
161-
util.PrintErrorMessageAndExit("--client-id and --client-secret are required when --event-subscription-enabled is enabled. Set via flags or INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variables.")
161+
util.PrintErrorMessageAndExit("--client-id and --client-secret are required when --enable-event-subscriptions is enabled. Set via flags or INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variables.")
162162
}
163163

164164
domainURL, err := url.Parse(domain)
@@ -633,10 +633,10 @@ func init() {
633633
proxyStartCmd.Flags().String("tls-cert-file", "", "The path to the TLS certificate file for the proxy server. Required when `tls-enabled` is set to true (default)")
634634
proxyStartCmd.Flags().String("tls-key-file", "", "The path to the TLS key file for the proxy server. Required when `tls-enabled` is set to true (default)")
635635
proxyStartCmd.Flags().Bool("tls-enabled", true, "Whether to enable TLS for the proxy server. Defaults to true")
636-
proxyStartCmd.Flags().Bool("event-subscription-enabled", false, "Enable Event Subscription mode for real-time cache invalidation. When enabled, the static secrets refresh loop is disabled. If event subscriptions are unavailable, the proxy will fall back to a polling mechanism. `--client id` and `--client-secret` are required when this is set to true ")
636+
proxyStartCmd.Flags().Bool("enable-event-subscriptions", false, "Enable Event Subscription mode for real-time cache invalidation. When enabled, the static secrets refresh loop is disabled. If event subscriptions are unavailable, the proxy will fall back to a polling mechanism. `--client id` and `--client-secret` are required when this is set to true ")
637637
proxyStartCmd.Flags().String("client-id", "", "Machine identity universal auth client ID. This is required when using event subscriptions.")
638638
proxyStartCmd.Flags().String("client-secret", "", "Machine identity universal auth client secret. This is required when using event subscriptions.")
639-
proxyStartCmd.Flags().String("polling-fallback-interval", "10m", "How often to poll for secret changes when SSE is unavailable (e.g., 1m, 5m). Defaults to 5m. Only used when --event-subscription-enabled is set.")
639+
proxyStartCmd.Flags().String("polling-fallback-interval", "10m", "How often to poll for secret changes when SSE is unavailable (e.g., 1m, 5m). Defaults to 5m. Only used when --enable-event-subscriptions is set.")
640640

641641
proxyDebugCmd.Flags().String("listen-address", "localhost:8081", "The address where the proxy server is listening. Defaults to localhost:8081")
642642

packages/proxy/sse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (m *SSEManager) transitionToPolling(projectId, environmentSlug string) {
369369
Msg("Starting polling fallback for project")
370370

371371
// Resync the project cache immediately — events might have been missed during the outage
372-
runProjectSecretsRefresh(m.cache, m.domainURL, m.resyncHttpClient, projectId, environmentSlug)
372+
go runProjectSecretsRefresh(m.cache, m.domainURL, m.resyncHttpClient, projectId, environmentSlug)
373373

374374
// On each polling tick (except the first), attempt SSE reconnection
375375
retrySSE := func() {

0 commit comments

Comments
 (0)