feat(dfget): skip existing output files by default when overwrite is disabled#1846
Open
NelZyhh wants to merge 2 commits into
Open
feat(dfget): skip existing output files by default when overwrite is disabled#1846NelZyhh wants to merge 2 commits into
NelZyhh wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1846 +/- ##
=======================================
Coverage 44.20% 44.20%
=======================================
Files 93 93
Lines 27229 27256 +27
=======================================
+ Hits 12036 12049 +13
- Misses 15193 15207 +14
🚀 New features to boost your workflow:
|
Signed-off-by: zhangyh66 <zhangyh66@chinatelecom.cn>
f374806 to
c70ce9c
Compare
gaius-qi
requested changes
May 19, 2026
Member
gaius-qi
left a comment
There was a problem hiding this comment.
No need to add an option parameter. We can just make "skip if exists" the default behavior.
b0600e7 to
20250ac
Compare
…disabled Signed-off-by: zhangyh66 <zhangyh66@chinatelecom.cn>
20250ac to
9c90d87
Compare
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.
Background / Motivation
When running
dfgetrepeatedly in batch jobs, retry workflows, or model synchronization tasks,users often expect idempotent behavior when the output file already exists.
Previously,
dfgethad only two behaviors for existing output files:--overwriteis enabled--overwriteis not enabledBased on review feedback, there is no need to introduce a new CLI option for this case.
Instead, when
--overwrite=false,dfgetshould skip existing files by default and return success.What’s in this PR
Update
dfgetexisting-file behavior without adding a new option:--overwrite=true: overwrite the existing output file--overwrite=false(default): skip the download and return success if the output file already existsAdditional changes:
--skip-if-existsoptionUsage
Skip existing files by default:
Overwrite existing files explicitly:
Compatibility
--overwrite=falsereturned an error--overwrite=falseskips the existing file and returns success--overwrite=truebehavior remains unchangedTesting
Local validation:
cargo fmt --all -- --check cargo clippy --all --all-targets -- -D warnings cargo test -p dragonfly-client --bin dfgetRuntime verification:
--overwrite--overwrite