-
Notifications
You must be signed in to change notification settings - Fork 30
feature for agent outputs in events & streaming fixes #280
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -66,8 +66,12 @@ class ApplicationContainer(containers.DeclarativeContainer): | |||||||||||||||||||||||||||||||||||||||
| app_user_repository=app_user_repository, | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| kms_service = providers.Singleton( | ||||||||||||||||||||||||||||||||||||||||
| FloKmsService, cloud_provider=config.cloud_config.cloud_provider | ||||||||||||||||||||||||||||||||||||||||
| kms_service = providers.Selector( | ||||||||||||||||||||||||||||||||||||||||
| config.jwt_token.enable_cloud_kms, | ||||||||||||||||||||||||||||||||||||||||
| true=providers.Singleton( | ||||||||||||||||||||||||||||||||||||||||
| FloKmsService, cloud_provider=config.cloud_config.cloud_provider | ||||||||||||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||||||||||||
| false=providers.Object(None), | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+69
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
python - <<'PY'
try:
from dependency_injector import providers
except ModuleNotFoundError:
print("dependency_injector is not installed in this sandbox; run this in the project environment.")
raise SystemExit(0)
for selector_value in (True, False, "true", "false", "True", "False", "1", "0"):
selector = providers.Selector(
providers.Object(selector_value),
true=providers.Object("kms"),
false=providers.Object(None),
)
try:
print(f"{selector_value!r} -> {selector()!r}")
except Exception as exc:
print(f"{selector_value!r} -> ERROR: {type(exc).__name__}: {exc}")
PY
rg -n -C2 'enable_cloud_kms|kms_service = providers\.Selector' .Repository: rootflo/wavefront Length of output: 2402 🏁 Script executed: #!/bin/bash
# Find config loading logic
echo "=== Searching for config loading and enable_cloud_kms handling ==="
rg -n 'enable_cloud_kms|jwt_token|pydantic' --type py wavefront/server/apps/floconsole/floconsole/ | head -30
# Check the config schema/model definition
echo -e "\n=== Looking for config model definitions ==="
fd -e py 'config' wavefront/server/apps/floconsole/ | xargs grep -l 'enable_cloud_kms' 2>/dev/null | head -5Repository: rootflo/wavefront Length of output: 1897 🏁 Script executed: #!/bin/bash
# Find how config is parsed - look for pydantic models or config classes
echo "=== Searching for config model/class definitions ==="
rg -A5 'class.*Config|enable_cloud_kms' wavefront/server/apps/floconsole/floconsole/ -t py | head -50
# Check if jwt_token is a pydantic model
echo -e "\n=== Finding jwt_token class/model ==="
rg -B2 -A10 'class.*JwtToken|jwt_token.*=' wavefront/server/apps/floconsole/ -t py | head -60Repository: rootflo/wavefront Length of output: 1265 🏁 Script executed: #!/bin/bash
# Look for tests that might show actual behavior with Selector
echo "=== Searching for tests of application_container ==="
fd -e py test wavefront/server/apps/floconsole/ 2>/dev/null | xargs grep -l 'Selector\|kms_service' 2>/dev/null
# Check auth_container for comparison
echo -e "\n=== Checking auth_container context ==="
cat -n wavefront/server/modules/auth_module/auth_module/auth_container.py | sed -n '35,50p'
# Check if there are any error logs or GitHub issues mentioning this
echo -e "\n=== Checking for any FloKmsService error handling ==="
rg -B3 -A3 'FloKmsService|kms_service' wavefront/server/apps/floconsole/floconsole/services/ -t pyRepository: rootflo/wavefront Length of output: 5656 🏁 Script executed: #!/bin/bash
# Look for the config initialization in application_container
echo "=== Full application_container.py to see config setup ==="
cat -n wavefront/server/apps/floconsole/floconsole/di/application_container.py | head -80
# Search for config class/model definition
echo -e "\n=== Searching for config model in floconsole ==="
fd -e py wavefront/server/apps/floconsole/floconsole/ | xargs grep -l 'class.*Config\|JwtToken' 2>/dev/null
# Check imports in application_container
echo -e "\n=== Checking imports in application_container ==="
head -30 wavefront/server/apps/floconsole/floconsole/di/application_container.pyRepository: rootflo/wavefront Length of output: 4758 🏁 Script executed: #!/bin/bash
# Look for config models more broadly
echo "=== Searching for JwtToken/Config class definitions ==="
rg 'class JwtToken|class.*Config.*:' wavefront/server/ -t py -B1 -A10 | head -80
# Check how config is instantiated
echo -e "\n=== Searching for config = ... or load_config ==="
rg 'config.*=|load_config|from_env|Config\(' wavefront/server/apps/floconsole/floconsole/di/ -t py -B2 -A2Repository: rootflo/wavefront Length of output: 10148 🏁 Script executed: #!/bin/bash
# Look for the actual config definition module
echo "=== Checking for config module in floconsole ==="
fd -e py -path '*/floconsole/*' 'config' 2>/dev/null | head -20
# Try searching for config class with enable_cloud_kms field
echo -e "\n=== Searching for enable_cloud_kms field definition ==="
rg -B5 -A5 'enable_cloud_kms.*:' wavefront/server/ -t py
# Check the actual yaml/ini/toml config files
echo -e "\n=== Checking config files ==="
find wavefront/server/apps/floconsole -name '*.ini' -o -name '*.yaml' -o -name '*.yml' -o -name '*.toml' | xargs cat -n 2>/dev/null | grep -C3 'enable_cloud_kms'Repository: rootflo/wavefront Length of output: 541 Normalize the selector value to ensure it matches "true" or "false" keys. Line 70: Apply the same normalization used in the auth container: Proposed normalization kms_service = providers.Selector(
- config.jwt_token.enable_cloud_kms,
+ providers.Callable(
+ lambda enabled: (
+ 'true'
+ if str(enabled).strip().lower() in {'1', 'true', 'yes', 'on'}
+ else 'false'
+ ),
+ config.jwt_token.enable_cloud_kms,
+ ),
true=providers.Singleton(
FloKmsService, cloud_provider=config.cloud_config.cloud_provider
),
false=providers.Object(None),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| token_service = providers.Singleton( | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_serialize_node_outputmay return non-string values, violating the declared return type.The signature declares
Optional[str], but several branches can return a non-str:return content.text—textis not guaranteed to be astron arbitrary objects.return result.text— same concern.If a downstream consumer (e.g.,
WorkflowEventMessage.node_output: Optional[str]inworkflow_schemas.py) callsjson.dumps(event_data)or Pydantic validation on it, a non-string attribute could raise at runtime or silently propagate unexpected types into event payloads.🛡️ Proposed coercion + brief docstring
🤖 Prompt for AI Agents