-
Notifications
You must be signed in to change notification settings - Fork 118
1317 applicationservice fails to access applications inside private folders #1318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
1317 applicationservice fails to access applications inside private folders #1318
Conversation
…and discover() This PR fixes issue #1317 where ApplicationService failed to access applications inside private folders. Key changes: - Refactored _resolve_path() to properly handle mixed public/private folder hierarchies by probing path segments to find private boundaries - Added _build_path_url() to construct correct URLs with PrivateContents - Added _find_private_boundary() to detect where paths transition to private - Added discover() method for exploring the Applications folder tree - All application methods (get, get_document, exists, create, update, delete, rename) now correctly handle documents in private folders The TM1 REST API requires different URL patterns: - Public: /Contents('folder')/Contents('subfolder') - Private: /PrivateContents('folder')/PrivateContents('subfolder') - Mixed: /Contents('public')/PrivateContents('private') Once inside a private folder, all nested content must use PrivateContents.
Summary
New Features
|
|
Tests completed for environment: tm1-11-cloud. Check artifacts for details. |
|
Looks really good. Thank you, @nicolasbisurgi. I hesitate a little bit with the No strong opinion, I just wanted to share my thoughts on this one. |
|
|
Thanks for the feedback! Approach:I do agree having @Hubert-Heijkers insight on this would be great. I was a bit surprised to see that there was no way to get this information without a trial an error approach. CachingRegarding caching, I think that if we leave it False as default we should still be considering TM1Py stateless. The reason I'm working on this topic is to create a script to transform all private applications into public ones for <500 user model, so having the ability to cache some of the valid mixed paths was a nice to have StrategyI agree, binary approach is more efficient but we would start seeing better performance starting on 4 level deep onwards, right? This might be more useful on v12 than v11 considering how Cloudfare handles repeated requests. Next steps ProposalI think we can proceed as is and wait for a response from Hubert; depending on where that answer leaves us we can optimize this approach by replacing linear by binary. Thoughts? |

Summary
Problem
The ApplicationService failed with 404 errors when accessing applications inside private folders because the TM1 REST API requires PrivateContents('FolderName') for private folder segments, but TM1py was always using Contents('FolderName') for intermediate path segments.
Solution: Implemented automatic path resolution with an optimistic probing strategy:
Changes: