Skip to content

Commit

Permalink
Fix broken URL Links in documentation (googleapis#1415)
Browse files Browse the repository at this point in the history
- Looks like possibly commit 6fd7163 changed an external link that
   should have stayed the same, for gcloud-java-examples.
 - Other links just looked to be outdated, either due to refactors or
   external link changes.
  • Loading branch information
jweaver authored and garrettjonesgoogle committed Nov 21, 2016
1 parent 1a8a438 commit e73084b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See [SUPPORTING_NEW_SERVICES](./SUPPORTING_NEW_SERVICES.md) for guidelines on ho
Coding Style
------------
Maintain the coding style in the project and in particular the modified files.
Follow the Google Java [style](http://google-styleguide.googlecode.com/svn/trunk/javaguide.html).
Follow the Google Java [style](https://google.github.io/styleguide/javaguide.html).


## Contributor License Agreements
Expand Down
6 changes: 3 additions & 3 deletions SUPPORTING_NEW_SERVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ In general, make classes immutable whenever possible, providing builders as nece

* Exception handling: we have the notion of retryable versus non-retryable operations. These are encapsulated by `BaseServiceException`. Retryable error codes should be listed in the service's subclass of `BaseServiceException`. An operation should be considered retryable if it makes sense to retry (e.g. if there was a transient service error, not a fundamentally invalid request) and if the operation that triggered the exception is idempotent. Exceptions also contain information regarding whether the service rejected the request, meaning the operation was not applied. The `BaseServiceException` subclass should also provide methods to translate the exceptions given by the underlying autogeneraged client library. The [`ExceptionHandler`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/ExceptionHandler.java) class intercepts and retries RPC calls when retryable exceptions are encountered. Note that some exceptions are masked in the SPI layer. For example, `get` and `delete` operations often return "404 Not Found" if the resource doesn't exist. Instead of throwing an exception in these cases, we often return `null` for `get` and `false` for `delete`.

* Batching: The [`BatchResult`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/dns-alpha-batch/google-cloud-core/src/main/java/com/google/cloud/BatchResult.java) class provides a simple way for users to combine RPC calls for performance enhancement. APIs for services that support batching should implement a batch class that contains methods similar to the methods in the `Service.java` subclass. A batch operation's return type should be a subclass of `BatchResult`. Also provide an SPI-layer class to collect batch requests and submit the batch. A batch instance should be created by the service API, preferably via a method called `batch()`. The batch should be submitted using the batch instance itself, preferably using a method named `submit()`.
* Batching: The [`BatchResult`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/BatchResult.java) class provides a simple way for users to combine RPC calls for performance enhancement. APIs for services that support batching should implement a batch class that contains methods similar to the methods in the `Service.java` subclass. A batch operation's return type should be a subclass of `BatchResult`. Also provide an SPI-layer class to collect batch requests and submit the batch. A batch instance should be created by the service API, preferably via a method called `batch()`. The batch should be submitted using the batch instance itself, preferably using a method named `submit()`.

* IAM Policies: If the Google Cloud service supports [IAM](https://cloud.google.com/iam/docs/), you should provide a subclass of [`IamPolicy`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/IamPolicy.java) in your API. [`Policy`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/Policy.java) can be used to set default access control lists on Google Cloud projects as a whole. However, if users want to set policies on specific resources within a project, they will need to use the subclass you provide in your API.
* IAM Policies: If the Google Cloud service supports [IAM](https://cloud.google.com/iam/docs/), you should provide a subclass of [`IamPolicy`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/IamPolicy.java) in your API. [`Policy`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/Policy.java) can be used to set default access control lists on Google Cloud projects as a whole. However, if users want to set policies on specific resources within a project, they will need to use the subclass you provide in your API.

Notes/reminders:
* API layer classes should be located in the package `com.google.cloud.servicename`, where "servicename" corresponds to the name of the Google Cloud service.
Expand Down Expand Up @@ -72,7 +72,7 @@ There are three types of test helpers:

API-level functionality should be well-covered by unit tests. Coders and reviewers should examine test coverage to ensure that important code paths are not being left untested. As of now, `google-cloud` relies on integration tests to test the SPI layer. Unit tests for the API layer should be located in the package `com.google.cloud.servicename`. Integration tests should be placed in a separate package, `com.google.cloud.servicename.it`, which enables us to catch method access bugs. Unit tests for the test helper should be placed in the package `com.google.cloud.servicename.testing`. All unit tests run for pull requests, but integration tests are only run upon merging the pull request. We only run integration tests upon merging pull requests to avoid decrypting and exposing credentials to anybody who can create a pull request from a fork. Prefix integration test file names with "IT" (e.g. `ITDnsTest`) to separate them from regular unit tests.

Simple service-related tests should be added to [GoogleCloudPlatform/google-cloud-examples](https://github.com/GoogleCloudPlatform/google-cloud-examples/tree/master/test-apps). To test releases and platform-specific bugs, it's valuable to deploy the apps in that repository on App Engine, Compute Engine, and from your own desktop.
Simple service-related tests should be added to [GoogleCloudPlatform/google-cloud-examples](https://github.com/GoogleCloudPlatform/gcloud-java-examples/tree/master/test-apps). To test releases and platform-specific bugs, it's valuable to deploy the apps in that repository on App Engine, Compute Engine, and from your own desktop.

#### Example application

Expand Down

0 comments on commit e73084b

Please sign in to comment.