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: Cloud Bigtable Managed Backup Implementation #305

Merged
merged 1 commit into from Jul 20, 2020
Merged

feat: Cloud Bigtable Managed Backup Implementation #305

merged 1 commit into from Jul 20, 2020

Conversation

liubonan
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 12, 2020
@kolea2 kolea2 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 13, 2020
@kolea2 kolea2 marked this pull request as draft May 13, 2020 01:28
@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #305 into master will increase coverage by 0.73%.
The diff coverage is 68.45%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #305      +/-   ##
============================================
+ Coverage     79.51%   80.24%   +0.73%     
- Complexity      991     1102     +111     
============================================
  Files            99      105       +6     
  Lines          6444     6815     +371     
  Branches        318      364      +46     
============================================
+ Hits           5124     5469     +345     
- Misses         1119     1148      +29     
+ Partials        201      198       -3     
Impacted Files Coverage Δ Complexity Δ
.../admin/v2/stub/EnhancedBigtableTableAdminStub.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../google/cloud/bigtable/admin/v2/models/Backup.java 64.28% <64.28%> (ø) 11.00 <11.00> (?)
.../bigtable/admin/v2/models/RestoredTableResult.java 66.66% <66.66%> (ø) 2.00 <2.00> (?)
...v2/models/OptimizeRestoredTableOperationToken.java 71.42% <71.42%> (ø) 2.00 <2.00> (?)
.../bigtable/admin/v2/models/RestoreTableRequest.java 78.57% <78.57%> (ø) 7.00 <7.00> (?)
.../bigtable/admin/v2/models/UpdateBackupRequest.java 80.55% <80.55%> (ø) 7.00 <7.00> (?)
.../bigtable/admin/v2/models/CreateBackupRequest.java 83.33% <83.33%> (ø) 8.00 <8.00> (?)
...ud/bigtable/admin/v2/BigtableTableAdminClient.java 72.16% <94.20%> (+10.63%) 35.00 <12.00> (+12.00)
...gle/cloud/bigtable/admin/v2/internal/NameUtil.java 80.76% <100.00%> (+7.08%) 12.00 <3.00> (+3.00)
...le/cloud/bigtable/data/v2/models/BulkMutation.java 97.56% <0.00%> (-2.44%) 10.00% <0.00%> (ø%)
... and 27 more

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 4374492...e7a909b. Read the comment docs.

Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

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

Can you add javadoc for all of the public surface?

  • client methods
  • models

And for the client methods, can you add some sample code to illustrate its intended usage?

@kolea2 kolea2 changed the title Cloud Bigtable Managed Backup Implementation. feat: Cloud Bigtable Managed Backup Implementation. Jul 15, 2020
@kolea2 kolea2 changed the title feat: Cloud Bigtable Managed Backup Implementation. feat: Cloud Bigtable Managed Backup Implementation Jul 15, 2020
Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

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

I think this can be merged as is, but I think it needs some follow up work (the integration tests were written before the testenv stuff existed, so should be migrated)

import com.google.common.base.Strings;
import javax.annotation.Nullable;

public class RestoredTableResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

javadoc please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}

@Nullable
public OptimizeRestoredTableOperationToken getOptimizeRestoredTableOperationToken() {
Copy link
Contributor

Choose a reason for hiding this comment

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

javadoc and in particular note why the token would be null here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

private static String prefix;

@BeforeClass
public static void createClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed with @kolea2 offline and this will left in future PRs.

missingProperties.add(INSTANCE_PROPERTY_NAME);
}

targetCluster = System.getProperty(CLUSTER_PROPERTY_NAME);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be specified? Can it just be the first cluster in the instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I discussed this with @kolea2 and integration test improvements will be in separate PRs.

adminApiEndpoint = "bigtableadmin.googleapis.com:443";
}

int tableSize = MoreObjects.firstNonNull(Integer.getInteger(TABLE_SIZE_PROPERTY_NAME), 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

When would we want to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see my other comment. I discussed this with @kolea2 and integration test improvements will be in separate PRs.

@liubonan liubonan marked this pull request as ready for review July 20, 2020 19:49
@kolea2 kolea2 merged commit 9e3307a into googleapis:master Jul 20, 2020
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. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants