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

Set initial key-values #2716

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Set initial key-values #2716

merged 1 commit into from
Aug 16, 2024

Conversation

rylev
Copy link
Collaborator

@rylev rylev commented Aug 15, 2024

Depends on #2715

Shows how we can handle initial configuration of factors by handling the initial key-value pairs for the default key-value store.

Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
@rylev rylev requested a review from lann August 15, 2024 08:26
Comment on lines +205 to +207
runtime_config
.set_initial_key_values(&self.key_values)
.await?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be out of scope for this PR, but I think we should probably support something like:

[key_value_store.default]
type = "none"

...which would then suggest doing something like:

Suggested change
runtime_config
.set_initial_key_values(&self.key_values)
.await?;
if !self.key_values.is_empty() {
runtime_config
.set_initial_key_values(&self.key_values)
.await?;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this point of such a feature to ensure that a default store never gets created? If the key-value interface gets used with the default store is it expected to just error?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep. Could be helpful if you know your target environment won't have a KV store.

Base automatically changed from key-value-trigger2 to factors August 16, 2024 07:49
@rylev rylev marked this pull request as ready for review August 16, 2024 07:49
@rylev rylev merged commit 0a3dff2 into factors Aug 16, 2024
1 check passed
@rylev rylev deleted the initial-key-values branch August 16, 2024 07:54
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