- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
fix: time based state refresh for each activity #796
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
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.
Pull Request Overview
This PR addresses an issue where stale connection data was persisting across successive workflow runs in crossover 2.0. The fix ensures that state is properly cleaned before each activity execution.
Key Changes:
- Modified state management in _get_stateto unconditionally clean state before setting new state
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| 📜 Docstring Coverage ReportRESULT: PASSED (minimum: 30.0%, actual: 75.4%) Detailed Coverage Report | 
| 📦 Trivy Vulnerability Scan Results
 Report Summary
 Scan Result Details✅ No vulnerabilities found during the scan for  | 
| 📦 Trivy Secret Scan Results
 Report Summary
 Scan Result Details✅ No secrets found during the scan for  | 
| 🛠 Docs available at: https://k.atlan.dev/application-sdk/activity-state-fix | 
| ☂️ Python Coverage
 Overall Coverage
 New FilesNo new covered files... Modified FilesNo covered modified files... 
 | 
| 🛠 Full Test Coverage Report: https://k.atlan.dev/coverage/application-sdk/pr/796 | 
| Bug: State Management Typo Causes Caching FailuresThe state management logic has two issues. A typo ( | 
| Bug: Timestamp Update Missing in Base ClassMissing timestamp update in base class  | 
| Bug: Timestamp Handling Fails for Initial StatesThe timestamp refresh logic can fail if  | 
Changelog
Checklist
Copyleft License Compliance
Note
Refresh activity state if older than 15 minutes by tracking and updating last_updated_timestamp; initialize timestamp in SQL metadata extraction state.
ActivitiesInterface._get_state: ifcurrent_timestamp - last_updated_timestamp > 15m, reinitialize state via_set_state.ActivitiesStatewithlast_updated_timestamp.BaseSQLMetadataExtractionActivitiesStatewithlast_updated_timestamp.last_updated_timestampin_set_stateafter initializingsql_clientandhandler.Written by Cursor Bugbot for commit 54470ba. This will update automatically on new commits. Configure here.