Skip to content
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

feat: update to v1 protos #516

Merged
merged 16 commits into from
Jan 16, 2019
Merged

feat: update to v1 protos #516

merged 16 commits into from
Jan 16, 2019

Conversation

mikelehen
Copy link
Contributor

@mikelehen mikelehen commented Jan 11, 2019

Update the nodejs-firestore client to use the v1 protos and endpoint. Mostly this is a no-op, though I did have to tweak the way we serialize empty document paths because the backend now requires /project/[project]/database/[database]/documents for empty document paths instead of /project/[project]/database/[database]

The v1beta1 gapic client is preserved for now and can still be used, but the manually-curated API uses v1.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 11, 2019
…ut not when we just need the database name).

The v1 protocol now enforces that /documents be included for root document paths.
Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ a few nits.

  1. This file shows up in the change list: dev/protos/google/firestore/v1beta1/.DS_Store. Thinking that we want to make sure all .DS_Store files are ignored and removed. It's ok to do this in a follow up PR.
  2. Are there any known breaking changes for consumers of the package? In the move to v1beta1, did we change/update any APIs in a breaking way? It would be really good to call these out in the description of the PR if so.
  3. Should we still be shipping the dev/protos/google/firestore/v1beta1/ directory at all?

@JustinBeckwith JustinBeckwith changed the title Update to v1 protos feat: update to v1 protos Jan 14, 2019
@mikelehen
Copy link
Contributor Author

@JustinBeckwith Thanks!

  1. Good idea. Added to .gitignore.
  2. For the most part, there are no breaking changes (or API changes of any kind). Switching to v1 is basically just an implementation detail. The one caveat is that the backend has made a tweak to its error handling in v1 such that writes failing due to contention will fail with error code ABORTED instead of error code UNAVAILABLE. So if any user had conditional retry logic that differentiated these cases, it could break. If you know of a good way to call this out, let me know. Else, I'm not expecting it to affect many users.
  3. My expectation was that we should not keep the v1beta1 directory (and so it's removed in this PR). If you disagree, let me know.

@JustinBeckwith
Copy link
Contributor

@crwilcox @jadekler Are we removing the v1beta1 library in other languages?

@jeanbza
Copy link
Member

jeanbza commented Jan 14, 2019

@JustinBeckwith We decided not to. @mikelehen could you leave the v1beta1 gapic as-is, and just switch the manual to using v1? This helps users currently relying on the beta (because they remain unbroken for a little while longer), but mostly just makes the process a bit more seamless.

@mikelehen
Copy link
Contributor Author

I can undelete dev/src/v1beta1 (and dev/protos/google/firestore/v1beta/ too?) but I'm unclear what benefit this provides. We have to delete it before we go 1.x, right? And so if users depend on it directly, they'll need to stick with a 0.x version.

Copy link
Member

@jkwlui jkwlui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking this until we bring back v1beta1 back in.

@mikelehen
Copy link
Contributor Author

@JustinBeckwith Per discussions, I've updated this PR to keep the v1beta1 gapic client and expose both v1beta1 and v1 gapic clients to developers, but the manual SDK uses v1 internally.

@kinwa91 The docs check you added in #511 is failing because of two broken links that came from the v1 protos. I see you added steps to synth.py to automatically fix them, but when I re-run synth.py I'm actually seeing it revert your changes to .kokoro/docs.sh. Am I doing something wrong?

@mikelehen
Copy link
Contributor Author

I went ahead and checked in just the proto changes necessary to make CI pass, but I had to revert some of the other changes synth.py made.

@mikelehen
Copy link
Contributor Author

@kinwa91 v1beta1 has been revived. Can you approve? Thanks!

@jkwlui
Copy link
Member

jkwlui commented Jan 16, 2019

synthtool hasn't been released to reflect the changes to docs.sh. I will cut a release today. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants