Skip to content

docs(firestore): clean-up region tagging#5893

Merged
dandhlee merged 7 commits into
GoogleCloudPlatform:masterfrom
Strykrol:firestore
Jun 2, 2021
Merged

docs(firestore): clean-up region tagging#5893
dandhlee merged 7 commits into
GoogleCloudPlatform:masterfrom
Strykrol:firestore

Conversation

@Strykrol
Copy link
Copy Markdown
Contributor

  1. Removes any dual-homed region tags where correct firestore prefixed tags have proliferated in docs
  2. Adds correct product prefix for any tags that aren't on devsite tenants (e.g. safe to update)
  3. Dual-wrapped some tags to match similar other language snippets.

Checklist

@Strykrol Strykrol requested a review from a team as a code owner May 26, 2021 23:16
@product-auto-label product-auto-label Bot added the api: firestore Issues related to the Firestore API. label May 26, 2021
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented May 26, 2021

Here is the summary of changes.

You are about to add 7 region tags.
You are about to delete 126 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label May 26, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2021
@Strykrol
Copy link
Copy Markdown
Contributor Author

Committed updates for 2/4 region tags that were in violation (on devsite). The remaining two found in Quickstart docs are false positives, awaiting updates from cl/376017137.

@tmatsuo
Copy link
Copy Markdown
Contributor

tmatsuo commented May 27, 2021

@Strykrol I think the checks on quickstart_add_data_one and quickstart_add_data_two are valid.

For example, this page:
https://cloud.google.com/firestore/docs/quickstart-servers#add_data
has a link to

# [START firestore_setup_dataset_pt1]
doc_ref = db.collection(u'users').document(u'alovelace')
doc_ref.set({
u'first': u'Ada',
u'last': u'Lovelace',
u'born': 1815
})
# [END firestore_setup_dataset_pt1]

But I may be wrong. Why do you think it's a false positive?

The link has commit hash, so it might be ok, but the fact that the master branch doesn't have the same region tag is still confusing.

@tmatsuo
Copy link
Copy Markdown
Contributor

tmatsuo commented May 27, 2021

For a record, the html element has the following property:

data-region-tag="quickstart_add_data_one"

So I assume the devsite build will break if we remove this region tag now.

@Strykrol
Copy link
Copy Markdown
Contributor Author

@tmatsuo let's talk offline - I'm not seeing what you're seeing, but the source file for that page doesn't appear to me to have these region tags anymore.

@Strykrol Strykrol requested a review from a team as a code owner June 1, 2021 16:17
@Strykrol
Copy link
Copy Markdown
Contributor Author

Strykrol commented Jun 1, 2021

Looks like the violations resolved after we manually re-published last week.

Copy link
Copy Markdown
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

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

LGTM, minor license header issue. Please see comment below

Comment thread firestore/cloud-async-client/snippets.py
@dandhlee dandhlee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 1, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 1, 2021
@dandhlee
Copy link
Copy Markdown
Collaborator

dandhlee commented Jun 1, 2021

One more minor lint issue then we should be good:

nox > flake8 --show-source --builtin=gettext --max-complexity=20 --import-order-style=google --exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py --ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202 --max-line-length=88 --application-import-names distributed_counters,noxfile,distributed_counters_test,.nox,snippets_test,snippets .
./snippets.py:106:1: E302 expected 2 blank lines, found 1
class City(object):
^
./snippets.py:166:1: E302 expected 2 blank lines, found 1
def add_example_data():
^

@tmatsuo tmatsuo added the snippet-bot:force-run Force snippet-bot runs its logic label Jun 1, 2021
@snippet-bot snippet-bot Bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jun 1, 2021
@Strykrol
Copy link
Copy Markdown
Contributor Author

Strykrol commented Jun 2, 2021

Done

@dandhlee dandhlee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2021
@dandhlee dandhlee merged commit 04087bc into GoogleCloudPlatform:master Jun 2, 2021
@dandhlee
Copy link
Copy Markdown
Collaborator

dandhlee commented Jun 2, 2021

Thank you! Merged as crwilcox@ is part of cloud-native-db-dpes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the Firestore API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants