Skip to content

Conversation

@thiagotnunes
Copy link
Contributor

Instead of hardcoding the version time in the create backup sample, parameterises it.

@thiagotnunes thiagotnunes requested a review from a team as a code owner March 2, 2021 05:02
@thiagotnunes thiagotnunes requested a review from a team March 2, 2021 05:02
@product-auto-label product-auto-label bot added api: spanner Issues related to the googleapis/java-spanner API. samples Issues that are directly related to samples. labels Mar 2, 2021
@snippet-bot
Copy link

snippet-bot bot commented Mar 2, 2021

Here is the summary of changes.

You are about to add 1 region tag.

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

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 2, 2021
@thiagotnunes thiagotnunes changed the title Pitr samples parameterised create backup samples: parameterises create backup version time Mar 2, 2021
@thiagotnunes thiagotnunes changed the base branch from master to pitr-samples March 2, 2021 05:02
@thiagotnunes thiagotnunes requested a review from a team as a code owner March 2, 2021 05:02
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #930 (301ff0c) into pitr-samples (ac90c3f) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                 @@
##             pitr-samples     #930      +/-   ##
==================================================
+ Coverage           85.20%   85.22%   +0.01%     
- Complexity           2649     2650       +1     
==================================================
  Files                 145      145              
  Lines               14358    14358              
  Branches             1391     1391              
==================================================
+ Hits                12234    12236       +2     
+ Misses               1540     1539       -1     
+ Partials              584      583       -1     
Impacted Files Coverage Δ Complexity Δ
...ain/java/com/google/cloud/spanner/SessionPool.java 89.26% <0.00%> (+0.19%) 73.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac90c3f...301ff0c. Read the comment docs.

@thiagotnunes thiagotnunes merged commit c304670 into pitr-samples Mar 2, 2021
@thiagotnunes thiagotnunes deleted the pitr-samples-parameterised-create-backup branch March 2, 2021 10:34
thiagotnunes added a commit that referenced this pull request Mar 9, 2021
* feat: adds samples for pitr

Adds sample for creating a database with a version retention
period. Updates sample for creating a backup with a version time.
Updates sample for restoring a backup, printing the backup version time.

* fix: prints out version time for backup sample

* test: adds test to the pitr create db sample

* test: cleans up after pitr sample test finishes

* test: fixes checkstyle violations

* samples: updates backup samples for pitr

Uses the earliest version time from the database as the version time for
the backup.

* test: fixes pitr samples test

* test: fixes checkstyle violations

* samples: PITR samples backup fix (#921)

* samples: creates a backup using the current time

Instead of using the earliest version time of the database, uses the
current time (from spanner). If we used the earliest version time of the
database instead we would be creating an empty backup, since the
database we are backing up is not 1 hour old (default version retention
period).

* samples: remove unused variable

Clean up create backup samples by removing unused variable.

* samples: parameterises create backup version time (#930)

* samples: fixes spanner samples tests
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [2.7.6](googleapis/java-spanner-jdbc@v2.7.5...v2.7.6) (2022-08-11)


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([googleapis#921](googleapis/java-spanner-jdbc#921)) ([2aa0a40](googleapis/java-spanner-jdbc@2aa0a40))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner 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.

4 participants