Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Build datastore index resource. #3085
Build datastore index resource. #3085
Changes from all commits
778ab9e
2257cfe
d5a1bce
c34fefc
dc31d89
ef337a3
11cc3b6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Just to check- is the index id not known until the operation is finished, or is it also contained in the first operation that we then poll? I know firestore_index currently solves this with custom code in the post create, because the name is contained in the first operation response that we already have. Looking at the generated output for this we now set the id on that resource 3 times in create, which isn't ideal. Is there a clean solution that would work for that resource and this?
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.
That's right - it's not known until the operation is finished. :( I saw that it could be solved with custom code, but I wanted to make sure that I solved it Once And For All - is there an issue with setting the ID three times? I think we set it once to make sure that we'll do a refresh if we fail in the middle of polling, plus once to get the true final id once all information is known ... and then in firestore, once more due to the custom code solution. I agree it's not clean, and I'm struggling to test it so I don't even know if it works yet (since you can't use the same project for both firestore and datastore).
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.
Got it. I'm pretty ok with it, then. It shouldn't cause issues for users and especially with these templates going away at some point, I don't think it's worth spending a ton of time finding the most-clean-code way to solve this problem for two resources with similar but not identical needs.