-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: restore Dynaconf fresh vars support #2104
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
|
First test workflow execution: https://github.com/qodo-ai/pr-agent/actions/runs/19370299280/job/55424179340?pr=2104#step:5:579 |
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
|
Second test workflow with the fix: https://github.com/qodo-ai/pr-agent/actions/runs/19370355959/job/55424387444?pr=2104#step:5:302 |
312134a to
4f5e1f7
Compare
|
Note: I cannot check the boxes in the qodo-merge-for-open-source comment, they are disabled: |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
…nly actual way to use it with pr-agent
|
@sharoneyal please have a look here. |
🤖 Automated PR ReviewSummary✅ Code review complete. Analyzed 2 files. No major issues found. The code looks good! ✅ No issues found! Generated by AI-powered PR Review Agent |
🤖 Automated PR ReviewSummary✅ Code Review Complete Detailed Findings📄
|
4 similar comments
🤖 Automated PR ReviewSummary✅ Code Review Complete Detailed Findings📄
|
🤖 Automated PR ReviewSummary✅ Code Review Complete Detailed Findings📄
|
🤖 Automated PR ReviewSummary✅ Code Review Complete Detailed Findings📄
|
🤖 Automated PR ReviewSummary✅ Code Review Complete Detailed Findings📄
|

User description
The changes in PR #2087 which are included in v0.31 prevent Dynaconf fresh vars from working properly.
For context, here's my setup with the codiumai/pr-agent:0.31-gitlab_webhook image:
In kubernetes pod, this environment variable is set:
Note: that this has to be uppercase as mentioned here.
In
/app/pr_agent/settings_prod/.secrets.tomlwhich is mounted from a kubernetes secret:With v0.30, every time the secret is updated (every day in our case as we use short lived Gitlab tokens), the file is refreshed, and Dynaconf picks the changes perfectly without restarting neither the pod nor the pr-agent process.
The first commit in this PR only introduces unit tests to demonstrate the issue in Github workflow execution.
The fix is in second commit pushed after the first workflow execution: 312134a
PR Type
Tests, Bug fix
Description
Add comprehensive unit tests for Dynaconf fresh_vars functionality
Tests verify fresh_vars works with custom_merge_loader configuration
Detect regression where fresh_vars stopped working after PR Set a custom toml loader for Dynaconf #2087
Cover GitLab credentials reload scenario with file modifications
Diagram Walkthrough
File Walkthrough
test_fresh_vars_functionality.py
Comprehensive fresh_vars functionality test suitetests/unittest/test_fresh_vars_functionality.py
feature
loader integration, and basic functionality
test_fresh_vars_without_core_loadersto detectif fresh_vars is broken with custom_merge_loader
scenarios and edge cases