Repository navigation
fix(config): skip empty CI release variables - #2042
ajeya-krishna wants to merge 2 commits into
Conversation
chrikrah
left a comment
There was a problem hiding this comment.
@ajeya-krishna From my perspective this can be merged at d9c85a2. Both callers, client.py:335 and resource_manager.py:631, already skip an empty LANGFUSE_RELEASE with or, and only the helper stopped on "".
$ pytest tests/unit/test_environment.py tests/unit/test_initialization.py -q -p no:cacheprovider # Python 3.12
26 passed in 2.92s # d9c85a2
3 failed, 23 passed in 2.53s # environment.py from d2222a5, tests kept
FAILED tests/unit/test_environment.py::test_get_common_release_envs[all-empty]
FAILED tests/unit/test_environment.py::test_get_common_release_envs[skip-empty]
FAILED tests/unit/test_initialization.py::TestClientInitialization::test_empty_ci_release_falls_back_to_next_variable
non-blocking: when every CI variable is empty, the base helper returned "". The if v is not None filter at resource_manager.py:638 kept it, so the resource had an empty release attribute. At head the attribute goes away. Does a server-side filter or the UI read that empty release?
|
@chrikrah Thanks for checking this. Omitting the release attribute when all CI variables are empty is intentional: it now matches the existing behavior when those variables are unset, instead of exporting an empty release. I verified the actual I haven't verified server/UI handling of an explicitly empty release, so I can't claim those filters are equivalent. No additional code change proposed; the all-empty helper case is already covered by the PR. |
What does this PR do?
Problem
An empty CI variable such as
RENDER_GIT_COMMITprevents release autodetectionfrom reaching a populated
GITHUB_SHA, leaving the detected release empty.Solution
Skip empty CI values, preserving the order and contents of nonempty values.
Add helper regressions and a real-client initialization test.
How we tested it
The six new cases had 3 failures before the fix and all pass after it.
41 targeted tests passed; full unit suite: 969 passed, 2 skipped.
Type of change
Verification
Python 3.12. No e2e/server or live-provider tests run; this is a local configuration
helper. The full unit run uses dummy credentials, not a live account.
Checklist
code_review.md.AI-assisted implementation and regression testing with Codex.


Confidence Score: 5/5
The PR appears safe to merge.Summary
Skips empty CI release values so release detection can reach the next populated variable.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "fix(config): skip empty CI release varia..." · Reviewed by Greptile