Fix: Use sw360python's batch method to restore project mainline states#142
Fix: Use sw360python's batch method to restore project mainline states#142SUMITKC1 wants to merge 1 commit intosw360:mainfrom
Conversation
Replaces per-release update loop with sw360python's update_project_release_relationships_batch() method to reduce API calls and follow project guidelines.
|
@SUMITKC1, thanks again for your effort to contribute, but it really doesn't help much if you send untested changes and don't follow the paths we discussed. I asked you in #137 to not keep creating new PRs as this will spam the mailboxes of the maintainers and we loose track which activity belongs to which task. And as the method name you try to call here doesn't seem to even exist, I assume you never tested this change. If you want to contribute to this project, please:
|
|
Don't get me wrong, we really appreciate if you take the time to contribute to this project! But in the end, this only makes sense if you have a running environment so you can test your changes on real-world examples and take the time to try to follow our best practices and contribute changes you understand and tested well. Otherwise, it just consumes more of your and our time than if we would make the changes by ourselves. So I think for a smooth start, it might be better if you concentrate on changes and improvements which are closely related to your own usage of CaPyCli, so that we know that you actually use your own code and have a first-hand understanding of the consequences of changes, instead of trying to address all open issues or results from code quality tools which don't really relate to your own usage scenarios. |
Replaces per-release update loop with sw360python's update_project_release_relationships_batch() method to reduce API calls and follow project guidelines.
🛠 Problem
The previous implementation in
update_project()restored mainline states one by one usingupdate_project_release_relationship(...). This caused excessive API calls and potential rate-limit issues when updating large projects.✅ Solution
update_project_release_relationships_batch()method from thesw360pythonlibrary (v1.9.0).📦 File Updated
capycli/project/create_project.py🧪 Testing
Tested on SW360 instance
https://sw360.example.comVersion:
13.1UI: New UI
The batch update executed successfully and restored all mainline states without triggering API rate limits.
Let me know if you'd like me to further align the logging format or add a test scenario. 🚀