cloudinary / cloudinary/cloudinary-cli
Cloudinary Test Cloud returns invalid Public IDs
- 主要语言
- Python
- 星标
- 3
- 派生
- 0
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 1
描述
## Bug report for Cloudinary CLI
This is not necessarily an issue with the Cloudinary CLI itself, but with the test cloud it runs against.
## Describe the bug in a sentence or two.
I found that the Test cloud returns invalid/inconsistent public ids for assets, especially when compared to running the same commands against a real Cloudinary account/enviroment. This impacts the ability to write accurate tests. I experienced this while trying to write tests for #63 .
## Issue Type (Can be multiple)
- [ ] Build - Cannot install or import the SDK
- [ ] Performance - Performance issues
- [ ] Behaviour - Functions are not working as expected (such as generate URL)
- [ ] Documentation - Inconsistency between the docs and behaviour
- [x] Other (Cloudinary Cloud)
## Steps to reproduce
1. Run the `test_cli_upload_dir` command using the test Cloudinary environment (provided by running `./tools/get_test_cloud.sh`). Note the command's output (by dumping/inspecting `output.result`).:
```
Uploading directory '/Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync'
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_10966/test_sync/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Ek_Bremen_P+R Syke_200x200.jpg as test_upload_dir_10966/test_sync/Ek_Bremen_P+R Syke_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/NoSpaces/OrdinaryFilename.png as test_upload_dir_10966/test_sync/NoSpaces/OrdinaryFilename
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Philips Lifetime_200x150.jpg as test_upload_dir_10966/test_sync/Philips Lifetime_200x150
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/SomeName/(02)-some-real_File-Name-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_10966/test_sync/SomeName/(02)-some-real_File-Name-Zone-(2.3.2)_378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Speed_Grip 3_05_200x200.jpg as test_upload_dir_10966/test_sync/Speed_Grip 3_05_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/hymer-1-2_)_98x63.jpg as test_upload_dir_10966/test_sync/hymer-1-2_)_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/specialCharactersätstest_1234/Einzelkritiken/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_10966/test_sync/specialCharactersätstest_1234/Einzelkritiken/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test with spaces/test_space 3_05_200x200.jpg as test_upload_dir_10966/test_sync/test with spaces/test_space 3_05_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test-h7/Philips Lifetime_200x150.jpg as test_upload_dir_10966/test_sync/test-h7/Philips Lifetime_200x150
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test_underscores____test/Ek_Bremen_P+R Syke_200x200.jpg as test_upload_dir_10966/test_sync/test_underscores____test/Ek_Bremen_P+R Syke_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/wohnmobil-2010/hymer-1-2_)_98x63.jpg as test_upload_dir_10966/test_sync/wohnmobil-2010/hymer-1-2_)_98x63
/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py:265: ResourceWarning: unclosed running multiprocessing pool
_warn(f"unclosed running multiprocessing pool {self!r}",
ResourceWarning: Enable tracemalloc to get the object allocation traceback
12 resources uploaded
```
2. Run the same `test_cli_upload_dir` command using a real Cloudinary environment (from https://cloudinary.com/console). Note the command's output (by dumping/inspecting `output.result`).:
```
Uploading directory '/Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync'
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_86886/test_sync/02_-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-_2.3.2__378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Ek_Bremen_P+R Syke_200x200.jpg as test_upload_dir_86886/test_sync/Ek_Bremen_P_R_Syke_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/NoSpaces/OrdinaryFilename.png as test_upload_dir_86886/test_sync/NoSpaces/OrdinaryFilename
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Philips Lifetime_200x150.jpg as test_upload_dir_86886/test_sync/Philips_Lifetime_200x150
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/SomeName/(02)-some-real_File-Name-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_86886/test_sync/SomeName/02_-some-real_File-Name-Zone-_2.3.2__378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/Speed_Grip 3_05_200x200.jpg as test_upload_dir_86886/test_sync/Speed_Grip_3_05_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/hymer-1-2_)_98x63.jpg as test_upload_dir_86886/test_sync/hymer-1-2___98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/specialCharactersätstest_1234/Einzelkritiken/(02)-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-(2.3.2)_378x150_98x63.jpg as test_upload_dir_86886/test_sync/specialCharactersätstest_1234/Einzelkritiken/02_-Krummhoern-Upleward_Badetreppe-Kitesurf-Zone-_2.3.2__378x150_98x63
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test with spaces/test_space 3_05_200x200.jpg as test_upload_dir_86886/test_sync/test with spaces/test_space_3_05_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test-h7/Philips Lifetime_200x150.jpg as test_upload_dir_86886/test_sync/test-h7/Philips_Lifetime_200x150
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/test_underscores____test/Ek_Bremen_P+R Syke_200x200.jpg as test_upload_dir_86886/test_sync/test_underscores____test/Ek_Bremen_P_R_Syke_200x200
Successfully uploaded /Users/christophersnyder/Projects/cloudinary-cli/test/resources/test_sync/wohnmobil-2010/hymer-1-2_)_98x63.jpg as test_upload_dir_86886/test_sync/wohnmobil-2010/hymer-1-2___98x63
/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py:265: ResourceWarning: unclosed running multiprocessing pool
_warn(f"unclosed running multiprocessing pool {self!r}",
ResourceWarning: Enable tracemalloc to get the object allocation traceback
12 resources uploaded
```
3. Compare and note that the test cloud environment returns different Public IDs. Sometimes invalid. For example, note how the characters `)`, `(`, `+`, ` ` (spaces) in the file names are treated differently by each environment.
## Error screenshots or Stack Trace (if applicable)
…
## Operating System
- [ ] Linux
- [ ] Windows
- [ ] macOS
- [ ] All
## Environment and Frameworks (fill in the version numbers)
- Cloudinary CLI version - 0.0.0
- Cloudinary Python SDK version - 0.0.0
- Python Version - 3.9
## Repository
If possible, please provide a link to a reproducible repository that showcases the problem
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 test_cli_upload_dir 命令、test/resources/test_sync fixtures 以及由 ./tools/get_test_cloud.sh 创建的测试环境开始。将测试 cloud 中的 output.result 与真实的 Cloudinary 环境进行比较,重点关注特殊字符和空格对应的 Public IDs。完成的标准是测试环境及其测试能够一致地产生有效且可比较的 Public IDs。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli, testing-qa
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100