-
Couldn't load subscription status.
- Fork 298
Add App-scoped API For Firebase Project management #211
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
Conversation
App-scoped actions for Firebase apps within Firebase projects. Uses Firebase Management REST APIs (https://firebase.google.com/docs/projects/api/reference/rest/)
| This PR only contains previously reviewed changes. |
| I fixed some iOS vs Android mistakes in the Javadoc for various methods in |
| I also just adjusted the error codes list. Both Android certificates and Apps are handled by the same error codes map, so I changed the term "App" to simply "resource." Please take a look. |
| Still LGTM |
| Unfortunately I discovered more things to fix. :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together, and sorry for not commenting on it earlier. Please check out the things I've pointed out.
src/main/java/com/google/firebase/projectmanagement/AndroidApp.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/AndroidApp.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/AndroidAppMetadata.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagement.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagement.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Outdated Show resolved Hide resolved
| /** | ||
| * Returns the fully qualified resource name of this SHA certificate. | ||
| */ | ||
| String getName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be public. Please see the API proposal document for the precise public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the changes. I think we're almost there. My big concern is around how the waiting/polling logic is implemented. I would advocate for a simpler implementation using loops and Thread.sleep(). Then just run the logic on the calling thread (for sync methods), or on a separate thread (for async methods). Take everything else as an optional suggestion.
| this.requestFactory = | ||
| httpTransport.createRequestFactory(new FirebaseRequestInitializer(app)); | ||
| | ||
| this.scheduledExecutor = new FirebaseScheduledExecutor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please expose the existing FirebaseApp.schedule() method via a trampoline. Also look into implementing this waiting logic as a simple loop with Thread.sleep() without using additional threads (see my comments below). Then we can treat this method as any other method in the SDK, and have it be called either on the calling thread (for sync operation) or a separate thread (for async operation).
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImpl.java Outdated Show resolved Hide resolved
...est/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImplTest.java Show resolved Hide resolved
...est/java/com/google/firebase/projectmanagement/FirebaseProjectManagementServiceImplTest.java Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagement.java Outdated Show resolved Hide resolved
src/main/java/com/google/firebase/projectmanagement/ShaCertificateType.java Show resolved Hide resolved
| Edit: The question below has been resolved. Just confirmed with my teammate that we are deliberately enforcing the rule that any Thanks for the review. Aside from the asynchronous polling question that remains, we have another small issue: I noticed that for the |
…that we do not directly expose the ScheduledExecutorService.
…(), and waiting before the first polling call.
…rebase-admin-java into xiangkang-project-management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for making the changes.
| Thank you for the reviews. I have added the client version header as we discussed. |
App-scoped actions for Firebase apps within Firebase projects. Uses Firebase Management REST APIs (https://firebase.google.com/docs/projects/api/reference/rest/)