Conversation
In dynamic folder mode, the display name of an uploaded raw file does not include the extension (`notes`), but the public ID does (`abc123.txt`). `_display_path` used the display name as is, so: - `sync --push` did not match local `notes.txt` with the remote asset and uploaded it again on every run; - `sync --pull` saved the file as `notes`, with no extension. For raw assets, add the public ID extension to the display name when the display name does not already end with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TalLevAmi
marked this pull request as ready for review
September 26, 2026 16:15
10 tasks
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.
In dynamic folder mode, a raw file such as
notes.txtgets a display name with no extension (notes), and a public ID with the extension (abc123.txt)._display_pathused the display name as is for raw assets. The result:sync --pushdid not match the localnotes.txtwith the remote asset, so it uploaded the file again on each run. Each upload made a new asset.sync --pullsaved the file asnotes, with no extension.I saw both problems on a live test cloud. After this change, a second
--pushskips the file and--pullsavesnotes.txt.Brief Summary of Changes
_display_path(cloudinary_cli/utils/api_utils.py): for raw assets, add the extension of the public ID when the display name does not already end with it (case-insensitive). Thefetchbehavior does not change._display_pathcover image, raw with and without an extension in the display name, and raw with no extension.What does this PR address?
Are tests included?
Reviewer, please note:
-o display_name notes.txt) does not change._display_pathfor matching, so it does not change.Checklist:
Local test run: I ran the full suite on Python 3.8 with Click 8.1.8. The new tests pass, and they fail without the fix. 8 tests in
test_cli_agent.pyandtest_cli_config_oauth.pyfail withstderr not separately capturedon this branch and onmastertoo. These tests need Click 8.2, which needs Python 3.10 or later. CI must confirm the full result.🤖 Generated with Claude Code