IEBH-459: Refactor dataset download logic and improve error handling#13
Merged
vmoshynskyi merged 2 commits intomainfrom Dec 2, 2025
Merged
IEBH-459: Refactor dataset download logic and improve error handling#13vmoshynskyi merged 2 commits intomainfrom
vmoshynskyi merged 2 commits intomainfrom
Conversation
Member
vmoshynskyi
commented
Dec 2, 2025
- Fix situations when the dataset cannot be downloaded
There was a problem hiding this comment.
Pull request overview
This PR refactors the dataset download logic to improve error handling and prevent download failures. The changes introduce exponential backoff retry logic with configurable timeouts, better HTTP error handling using raise_for_status(), and standardized filename generation. The version is bumped from 2.2.7 to 2.2.8, and the package name is updated from "app" to "cli" to better reflect its purpose.
Key changes:
- Enhanced error handling with proper HTTP exception catching and status code checks
- Implemented retry mechanism with exponential backoff (up to 15 retries with 1-5 second intervals) for download preparation
- Simplified filename generation logic by removing the
generate_download_url()method and generating filenames directly based on dataset code, version, and timestamp
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated package name to "cli" and bumped version to 2.2.8 |
| app/services/output_manager/message_handler.py | Updated log message from "Current dataset version" to "Looking for dataset version" for clarity |
| app/services/dataset_manager/dataset_download.py | Major refactoring: improved error handling with HTTPError exceptions, added retry logic with exponential backoff, simplified URL generation, and standardized filename creation |
| app/resources/custom_help.py | Updated version to 2.2.8 and revised changelog description |
| .gitignore | Uncommented .python-version to ignore Python version files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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.