Open
Conversation
Add comprehensive tests covering uncovered lines across the variables module: is_resolve_function edge cases, variant deserialization errors, remote provider change detection, force refresh, variant diffing, variable type operations, push_variable_types, and more. Add pragmas for genuinely untestable code paths (fork handler, unreachable fallback).
Covers: resolve function default without type, duplicate variable name, on_config_change with unknown variable, and multiple keyword-only params.
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add a `timeout` field to `RemoteVariablesConfig` (default `(10, 10)`) so that both the polling thread and the blocking first-resolve path use a bounded `Session.get` call. Also propagate `timeout_millis` through `VariableProvider.shutdown()` so thread joins respect the shutdown budget.
Deploying logfire-docs with
|
| Latest commit: |
b9dd937
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4e219578.logfire-docs.pages.dev |
| Branch Preview URL: | https://managed-variables.logfire-docs.pages.dev |
…sion optional - Remove `enabled` field from VariableConfig (disabled variables are now modeled by pointing labels to code_default) - Add `code_default` handling in `follow_ref` - returns (None, None) to trigger code default fallthrough - Make `LabelRef.version` optional (None for code_default and label-to-label refs) - Update `_validate_labels` to skip code_default refs in label validation - Update tests to use code_default pattern instead of enabled=False
- Remove `enabled` field from VariableConfig reference table - Document `code_default` as a LabelRef target - Note that LabelRef.version is optional - Add explanations for when to use each ref target type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a managed variables feature to Logfire, enabling dynamic configuration management with feature flags, A/B testing, and targeted rollouts. Variables can be resolved from local in-memory configuration or from the remote Logfire API with background polling and SSE-based real-time updates.
This is a replacement of #1548 to reduce review noise.
Key additions
Unresolved review comments from #1548 to revisit
These are comments that were noted but not actioned yet in this PR:
doesn't seem to exist. Docs may need a cleanup pass.