docs(samples): add samples for CMMR phase 2 #672
Conversation
|
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
olavloite
left a comment
There was a problem hiding this comment.
LGTM
I did not add an explicit approval as it's not ready for merge yet.
samples/samples/snippets.py
Outdated
| base_config = spanner_client.instance_admin_api.get_instance_config( | ||
| name="{}/instanceConfigs/{}".format(spanner_client.project_name, base_instance_config)) | ||
| replicas = [] | ||
| for replica in base_config.replicas: |
There was a problem hiding this comment.
nit: Add a comment that it is required that the custom configuration contains all the replicas of the base config + at least one optional replica. That makes it clearer to the user why we are doing this.
samples/samples/snippets_test.py
Outdated
| def test_update_instance_config(capsys, user_managed_instance_config_id): | ||
| snippets.update_instance_config(user_managed_instance_config_id) | ||
| out, _ = capsys.readouterr() | ||
| assert "custom-updated-sample-config" in out |
There was a problem hiding this comment.
nit: Add something like 'Updated ...' to the assert here, so it's easier to see that this really verifies that the function succeeded.
samples/samples/snippets_test.py
Outdated
| def test_create_instance_config(capsys, user_managed_instance_config_id): | ||
| snippets.create_instance_config("base-config", user_managed_instance_config_id) | ||
| out, _ = capsys.readouterr() | ||
| assert "custom-sample-config" in out |
There was a problem hiding this comment.
nit: Add something like 'Created ...' to the assert here, so it's easier to see that this really verifies that the function succeeded.
a03c43b to
7f7af44
Compare
c0d1b48 to
b116734
Compare
b116734 to
6f4f268
Compare
Tests and samples for user-managed instance configurations
BEGIN_COMMIT_OVERRIDE
docs(samples): add samples for CMMR phase 2
END_COMMIT_OVERRIDE