-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support plugin only request during plugin initialization #202
Conversation
@ben181231, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cheungpat to be a potential reviewer. |
Sorry this issue comes to my attention just now. It appears that this PR does not work similar to the counterpart in py-skygear. In py-skygear, the I’d suggest that we keep the behaviour of py-skygear in here because I think the developer need to be explicit they are overriding the server safeguard to prevent API calls before all plugins are initialized. |
I also think it is good to keep the behavior as
I think the solutions above are not that good. Consider that, always setting |
I actually expect cloud code people to get a new instance of Since API requests are constructed by I imagine the behavior would be similar to Is this not right? I also understand that it seems logical in JS to return a cloned copy of CloudCodeContainer like exactly what you mentioned in (2). But this pattern is not followed by other properties like |
Reminds me of this: #186 relevant? |
If we all agree on this, let's move the option to constructor. it would be better to clone the whole object. |
|
I think we can take this assumption. But we need to change the
The constructor is sync, while the configuration of the container is async. We cannot do this.
This is not preferable. The ====== My take on the example usage code:
Looks good to you all? |
The example usage looks good to me. |
If no objection within 12 hours, let try yo implement it. |
I am closing this PR and expect a new one. |
connect #189