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

Merge branch logging-alpha from pubsub-alpha #766

Merged
merged 480 commits into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
480 commits
Select commit Hold shift + click to select a range
978fe27
Add filtering, make projects map a ConcurrentHashMap, and fix style i…
Dec 8, 2015
a670d21
Make error messages more informative, propagate all server exceptions…
Dec 10, 2015
19aa650
remove checkNotNull calls and minor fixes
Dec 10, 2015
4fdd477
minor fixes
Dec 11, 2015
937fe22
minor fix
Dec 11, 2015
ddf447f
ResourceManagerImpl + docs
Dec 2, 2015
8c12d67
Fix docs and return null if project not found by get.
Dec 16, 2015
a3bbbd2
Minor fixes
Dec 17, 2015
37b5efd
Adding ResourceManagerExample, update docs
Dec 17, 2015
b6bbf67
Include delete action + minor edits
Dec 18, 2015
1e7e152
Add retryable exceptions and fix checkstyle complaints
Dec 18, 2015
0eada88
minor fixes
Dec 18, 2015
ccbf4f4
more checkstyle fixes
Dec 19, 2015
bac6a07
minor fixes
Dec 19, 2015
b5d4bca
Update pom version in resource manager, remove noCredentials from Ser…
Dec 21, 2015
3781aa7
Merge pull request #492 from mziccard/bigquery
aozarov Dec 21, 2015
6c5a642
Minor fixes to Storage
mziccard Dec 21, 2015
b504340
Make checkstyle happy
mziccard Dec 21, 2015
637f156
Merge pull request #495 from ajkannan/merge-service
aozarov Dec 21, 2015
604b1c4
More style fixes to Storage module
mziccard Dec 21, 2015
bf6a3fe
Add BigQuery module README
mziccard Dec 21, 2015
5b1c443
Merge pull request #494 from mziccard/storage-minor
aozarov Dec 21, 2015
12a10b5
Synchronize LocalResourceManagerHelper
Dec 21, 2015
a87cd14
make protobuf methods package protected
Dec 21, 2015
62a2d71
Merge pull request #497 from ajkannan/synchronize-lrmh
ajkannan Dec 22, 2015
b2d181f
revert unnecessary changes in scope in BaseMarshaller
Dec 22, 2015
9bcebd3
Merge pull request #498 from ajkannan/hide-non-public-refs
aozarov Dec 22, 2015
6ee866a
Add troubleshooting section, fix line length, sort imports, remove un…
mziccard Dec 22, 2015
75a0ece
Merge pull request #496 from mziccard/bigquery
ajkannan Dec 22, 2015
862905f
Make BigQuery get/create/updated Table and Job methods generic
mziccard Dec 22, 2015
a0f5f1b
Merge pull request #500 from mziccard/bigquery
aozarov Dec 22, 2015
d299e06
Merge branch 'master' into bigquery
mziccard Dec 22, 2015
7b1b0dc
Add BigQuery to common README.md and TESTING.md
mziccard Dec 22, 2015
a1299c7
Merge pull request #502 from mziccard/bigquery
mziccard Dec 22, 2015
3f2799d
Merge pull request #503 from GoogleCloudPlatform/bigquery
ajkannan Dec 22, 2015
e0b0a66
Make FormatOptions.of(format) return CsvOptions if format is CSV
mziccard Dec 23, 2015
30fa22a
Minor style fixes to DatastoreExample and StorageExample
mziccard Dec 23, 2015
48acfef
Add bigquery module to gcloud-java pom
mziccard Dec 23, 2015
d5e4dba
Add BigQuery example
mziccard Dec 23, 2015
3ee27a6
Merge pull request #506 from mziccard/bigquery-example
mziccard Dec 28, 2015
d1c41f7
Update version to 0.1.1
mziccard Dec 28, 2015
e182661
Merge pull request #507 from mziccard/master
mziccard Dec 28, 2015
7a7f698
Updating version in README files. [ci skip]
Dec 28, 2015
15fb8df
Update version to 0.1.2-SNAPSHOT
mziccard Dec 28, 2015
af68f77
Merge pull request #508 from mziccard/master
mziccard Dec 28, 2015
b762fd7
Add shield, dependency code and link to BigQueryExample to bigquery R…
mziccard Dec 28, 2015
ab5ab13
Fix gradle dependency code in all gcloud-java modules
mziccard Dec 28, 2015
2530b3c
Speed up resource manager tests
Dec 28, 2015
869fed3
Merge pull request #510 from ajkannan/speed-up-tests
ajkannan Dec 28, 2015
ca0c265
Merge pull request #509 from mziccard/master
ajkannan Dec 28, 2015
329bd70
Minor fixes to READMEs and pom.xml
mziccard Dec 29, 2015
7e052da
Minor changes to gcloud-java-examples
mziccard Dec 29, 2015
f78da9d
Add checkNotNull to FormatOptions.of method
mziccard Dec 29, 2015
afe953d
Add example to BigQuery package-info
mziccard Dec 29, 2015
5e193c5
Fix indentation in Storage and ResourceManager package-info
mziccard Dec 29, 2015
acbd5c0
Add support for templateSuffix to BigQuery InsertAllRequest
mziccard Dec 29, 2015
dac9cbf
Merge pull request #513 from mziccard/bigquery-package-info
ajkannan Dec 29, 2015
45f5661
Merge pull request #514 from mziccard/bigquery-template-suffix
aozarov Dec 29, 2015
6af6db4
Add more info on BigQuery load's source file
mziccard Dec 30, 2015
823f0de
Merge pull request #512 from mziccard/fix-bigquery-example
ajkannan Dec 30, 2015
5e734ee
Add functional classes for BigQuery datasets jobs and tables
mziccard Dec 30, 2015
edfb470
Document generic types
Dec 30, 2015
42727c0
Merge pull request #501 from ajkannan/fix-non-public-javadoc-types
aozarov Dec 30, 2015
2da16c7
Add build/test documentation
Dec 30, 2015
645f381
Merge pull request #518 from ajkannan/contributing
aozarov Jan 1, 2016
16b451d
Check for null in Project.load
Jan 4, 2016
d75f1f4
Minor fixes to bigquery functional classes
mziccard Jan 4, 2016
2d1a368
Wait for table to be created in testInsertAllWithSuffix
mziccard Jan 4, 2016
2e152a3
add load null test
Jan 4, 2016
0fa9b51
Merge pull request #520 from ajkannan/check-null-load
ajkannan Jan 4, 2016
70b350c
Merge pull request #521 from mziccard/fix-template-suffix-test
ajkannan Jan 4, 2016
46f7958
Document delay in table creation when insertAll is used with template…
mziccard Jan 5, 2016
dce1231
Minor fixes to storage functional classes
mziccard Jan 4, 2016
d58930e
Add better tests for bigquery functional classes
mziccard Jan 5, 2016
4aa8a97
Add support for queryPlan to QueryStatistics
mziccard Jan 5, 2016
64114c1
Merge pull request #522 from mziccard/fix-template-suffix-test
ajkannan Jan 5, 2016
d8b1814
Merge pull request #516 from mziccard/bigquery-functional-classes
ajkannan Jan 5, 2016
65340bd
Make ResourceManagerImpl package protected
Jan 6, 2016
b8ce8d2
Merge pull request #524 from ajkannan/make-resourcemanagerimpl-packag…
aozarov Jan 6, 2016
0a59620
Add more factory methods to Load and ExtractJobInfo
mziccard Jan 6, 2016
c3e808d
Fix self reference in QueryJobInfo.Priority javadoc
mziccard Jan 6, 2016
7c0a746
Make infoIterable final in LazyBlobIterable and LazyTableIterable
mziccard Jan 6, 2016
8d37c32
Merge pull request #528 from mziccard/add-final-to-iterable
ajkannan Jan 6, 2016
5da46e8
Merge pull request #527 from mziccard/add-format-to-of
ajkannan Jan 6, 2016
13b1b0e
Minor fixes to QueryStage
mziccard Jan 6, 2016
ea21d23
Docs and code cleanup
Jan 6, 2016
b1ff62b
Merge pull request #523 from mziccard/support-query-plan
aozarov Jan 7, 2016
d03e5a7
Merge pull request #529 from ajkannan/docs-cleanup
aozarov Jan 7, 2016
0ae2be8
Add BigQueryError field to BigQueryException and tests
mziccard Jan 6, 2016
f1a5cec
Merge pull request #526 from mziccard/bigquery-error-exception
aozarov Jan 7, 2016
ce9b5c1
Refactor page fetchers
Jan 7, 2016
824c46c
Merge pull request #517 from ajkannan/basepagefetcher
aozarov Jan 8, 2016
9678371
mark bigquery and resource manager as alpha
aozarov Jan 8, 2016
1ab0ac5
Rename load to get in functional classes
mziccard Jan 8, 2016
701abb6
Fix failing test by removing check
mziccard Jan 8, 2016
ba5050b
Merge pull request #535 from mziccard/load-to-get
aozarov Jan 8, 2016
69caa42
Merge pull request #536 from mziccard/fix-bigquery-it
aozarov Jan 8, 2016
29628d7
Merge pull request #533 from aozarov/temp
ajkannan Jan 8, 2016
01d386a
Add a link to SparkJava demo from website and README
Jan 8, 2016
5a23e57
Merge pull request #538 from ajkannan/link-sparkjava
aozarov Jan 8, 2016
863c572
Create simple forceDelete that can be used on AppEngine
Jan 9, 2016
33f6ad8
Use runtime exceptions for DeleteBucketTask.call()
Jan 11, 2016
dc1f9e7
Add known issue for mvn test and gcloud SDK
Jan 11, 2016
1583312
Fixed #478 - Make DatastoreException informative.
mderka Jan 11, 2016
b62017c
Merge pull request #546 from mderka/exception-cause
ajkannan Jan 12, 2016
2d1e836
Set default retry strategy
Jan 12, 2016
560faa9
Merge pull request #542 from ajkannan/known-issue-gcd
aozarov Jan 12, 2016
b5dd44a
Merge pull request #539 from ajkannan/forcedelete-without-executor
aozarov Jan 12, 2016
3ddbcf1
ServiceOptions tests + fix for default retry params
Jan 12, 2016
b0d4c57
Fix ServiceOptions tests
Jan 12, 2016
e737516
Merge pull request #547 from ajkannan/default-retry-strategy
aozarov Jan 12, 2016
a2e60ab
Populate cursorAfter in datastore v1beta2
Jan 14, 2016
2219c82
minor fixes to afterCursor + test
Jan 14, 2016
ffbd3d7
Add link to bookshelf app
Jan 14, 2016
cdad97a
Merge pull request #551 from ajkannan/link-getting-started-apps
aozarov Jan 15, 2016
663e54b
clarify batching in docs
Jan 15, 2016
e4113c4
avoid calling hasNext from afterCursor
Jan 15, 2016
461f375
Minor style fixes
Jan 15, 2016
5d243ad
Merge pull request #549 from ajkannan/set-cursor
aozarov Jan 15, 2016
7655301
Release version to 0.1.2
Jan 16, 2016
669eb69
Merge pull request #556 from ajkannan/release-v0.1.2
ajkannan Jan 16, 2016
3eb3fe8
Updating version in README files. [ci skip]
Jan 16, 2016
d9ef14c
Update version to 0.1.3-SNAPSHOT
Jan 16, 2016
767c41f
Merge pull request #557 from ajkannan/update-pom-version-0.1.3-snapshot
ajkannan Jan 16, 2016
b32e4b9
Add support for BigQuery resumable uploads via a write channel
mziccard Jan 11, 2016
397b2c1
Merge pull request #540 from mziccard/bigquery-insert-writer
aozarov Jan 19, 2016
03d5d30
Refactor BaseServiceException
mziccard Jan 15, 2016
acf260c
Move exception handler and interceptor to BaseService class
mziccard Jan 15, 2016
67e5dfc
Rename translateAndThrow in BaseServiceException and make it package …
mziccard Jan 20, 2016
34e6806
Add throwable cause to DatastoreException
mziccard Jan 20, 2016
3c81f16
Move isRetryable method to BaseServiceException.Error
mziccard Jan 20, 2016
add5924
Merge pull request #554 from mziccard/refactor-exception
mziccard Jan 21, 2016
3026e77
Rename Storage.apply to Storage.submit
mziccard Jan 21, 2016
2e38f02
Add code to initialize BigQueryError in BigQueryException
mziccard Jan 21, 2016
2e8363f
Merge pull request #563 from mziccard/populate-bigquery-error
mziccard Jan 21, 2016
3521bf5
Add equals and hashCode to BaseTableInfo subclasses
mziccard Jan 21, 2016
483b4d8
Merge pull request #565 from mziccard/bigquery-table-hash
ajkannan Jan 21, 2016
9fba603
Merge pull request #562 from mziccard/rename-apply
ajkannan Jan 21, 2016
e27b5b3
Minor fixes to bigquery
mziccard Jan 21, 2016
555cc71
Run coveralls for PRs in branches
Jan 21, 2016
c027e47
Merge pull request #567 from mziccard/minor-bigquery-fixes
aozarov Jan 21, 2016
0c3e935
Merge pull request #568 from ajkannan/run-coveralls-in-branches
aozarov Jan 21, 2016
55ee5aa
Add location() and debugInfo() to BaseServiceException
mziccard Jan 22, 2016
973639a
Add Acl.of method to storage module
mziccard Jan 22, 2016
c411b23
Add Acl.of method to bigquery module
mziccard Jan 22, 2016
1a18033
Merge pull request #571 from mziccard/acl-of
aozarov Jan 22, 2016
3f7626d
Merge pull request #570 from mziccard/add-info-to-exception
aozarov Jan 22, 2016
e1ddedb
Rename equals to baseEquals and hashCode to baseHashCode in BaseTable…
mziccard Jan 22, 2016
e11a5ae
Rename equals to baseEquals and hashCode to baseHashCode in JobInfo
mziccard Jan 22, 2016
0556813
Merge pull request #573 from mziccard/rename-equals
aozarov Jan 22, 2016
6450944
merge from upstream, fix merge confilict and fix build on non java 8
aozarov Jan 23, 2016
bbd3aad
Source IT env vars only when necessary
Jan 23, 2016
8c70155
Merge pull request #577 from ajkannan/source-only-when-necessary
aozarov Jan 23, 2016
f111953
remove check for valid utf-8 cursor
Jan 25, 2016
03ca1bf
Simplify to/from url safe and fix access issue in workaround
Jan 25, 2016
c5bae84
Merge pull request #578 from ajkannan/fix-cursor
aozarov Jan 25, 2016
830d87c
Use pagination in DatastoreExample and fix readme bug and formatting
Jan 26, 2016
360e048
Increase limit on query size
Jan 26, 2016
d8bce91
Merge pull request #582 from ajkannan/test-paging-in-datastore-example
aozarov Jan 26, 2016
84402ac
Remove JobInfo hierarchy, add JobConfiguration hierarchy
mziccard Jan 26, 2016
f10fa96
adding gcloud-java-contrib module
jean-philippe-martin Jan 26, 2016
25692fc
Merge pull request #583 from jean-philippe-martin/add_contrib
jean-philippe-martin Jan 26, 2016
8ad3235
fix toBuilder()
Jan 26, 2016
f287462
Minor refactoring and javadoc fixes
Jan 27, 2016
48cb27f
Merge pull request #585 from ajkannan/fix-query-to-builder
aozarov Jan 27, 2016
ced28fa
Release version 0.1.3
Jan 27, 2016
b63c657
Merge pull request #588 from ajkannan/release-v0.1.3
ajkannan Jan 27, 2016
8571125
Updating version in README files. [ci skip]
Jan 27, 2016
1cc4eac
update version to 0.1.4-SNAPSHOT
Jan 27, 2016
c5f50e0
Merge pull request #589 from ajkannan/update-version-0.1.4-SNAPSHOT
ajkannan Jan 27, 2016
a2c8b39
Fix comments. Make JobConfiguration an abstract class
mziccard Jan 27, 2016
f09410d
Document that input stream is closed in storage.create(BlobInfo, Inpu…
Jan 27, 2016
70ee77c
Move setProjectId from BigQueryImpl to entity objects
mziccard Jan 28, 2016
44a1533
Merge pull request #591 from ajkannan/add-close-comment
mziccard Jan 28, 2016
05d6c57
Update README and package-info to use JobConfiguration
mziccard Jan 28, 2016
68eed9e
Minor style fixes
mziccard Jan 28, 2016
73250ea
Fix access-related issues
mziccard Jan 29, 2016
b4bddff
Merge pull request #584 from mziccard/bigquery-hierachies
aozarov Jan 29, 2016
c010bc8
Remove TableInfo hierarchy, add TableType hierarchy
mziccard Jan 29, 2016
c4bf7ad
Add note to update java-docs-samples and public documentation for rel…
Jan 29, 2016
4cf793e
Merge pull request #601 from ajkannan/releasing-doc
aozarov Jan 29, 2016
a76e6c4
Make Project a subclass of ProjectInfo
Jan 22, 2016
d3abf25
Merge pull request #572 from ajkannan/project-extends-projectinfo
ajkannan Jan 30, 2016
931b4d3
Rename TableType to TableDefinition and other minor fixes
mziccard Feb 1, 2016
36d9dc3
Fix minor docs and style errors
mziccard Feb 1, 2016
085903a
Rename DefaultTableDefinition to TableDefinition
mziccard Feb 1, 2016
28a457e
Rename TableDefinition to StandardTableDefinition and BaseTableDefini…
mziccard Feb 2, 2016
2bb03eb
Merge pull request #600 from mziccard/bigquery-hierachies
aozarov Feb 2, 2016
b0c0bb7
Make bigquery functional classes extend info classes
mziccard Feb 2, 2016
3d1c1c8
Make functional objects subclasses of metadata objects.
Feb 1, 2016
94533b2
Minor refactoring bigquery functional objects
mziccard Feb 3, 2016
5829d81
Add functional classes to SerializationTest
mziccard Feb 3, 2016
aa0e377
minor fixes
Feb 3, 2016
6870eb7
Add toBuilder tests for Bucket and Blob, remove static get and builde…
Feb 4, 2016
75dbbf8
Add builder test to increase coverage
Feb 4, 2016
b6ad451
Refactor bigquery function objects builders
mziccard Feb 4, 2016
fbcbfb4
Add missing override annotation and serialVersionUID
mziccard Feb 4, 2016
4bf3796
Merge pull request #609 from mziccard/bigquery-hierachies
aozarov Feb 4, 2016
ae7e62e
try latest version of coveralls
Feb 4, 2016
7761a9e
Make Table methods public
mziccard Feb 5, 2016
3ce2cc6
Fix the 'Definition of groupId is redundant' mvn warning
mziccard Feb 5, 2016
f7990c0
Merge pull request #622 from mziccard/fix-groupid-warning
aozarov Feb 5, 2016
8ba9230
Merge pull request #621 from mziccard/bigquery-hierachies
aozarov Feb 5, 2016
0ebb79d
Merge branch 'master' of git://github.com/GoogleCloudPlatform/gcloud-…
aozarov Feb 5, 2016
288c993
Minor fixes
Feb 5, 2016
a6205da
merge from master
aozarov Feb 5, 2016
cdec697
Merge pull request #614 from ajkannan/storage-merge-objects
aozarov Feb 5, 2016
3e5f07f
fix pom to avoid compiler failure due to code generation by annotatio…
aozarov Feb 5, 2016
3f39ab2
Fix failing bigquery ITs due to missing queryPlan
mziccard Feb 5, 2016
d2dbd99
Merge pull request #625 from mziccard/master
aozarov Feb 5, 2016
ef7c74f
Site cleanup
Feb 6, 2016
7bd63da
disable javadoc generation for java 8 on gcloud-java-pubsub
aozarov Feb 6, 2016
2bb9cb0
Merge pull request #627 from ajkannan/cleanup-site
aozarov Feb 6, 2016
063d000
Merge pull request #576 from aozarov/pubsub-alpha
aozarov Feb 6, 2016
f06c11a
Fix NPE in bigquery XXXInfo.equals
mziccard Feb 9, 2016
3502610
Update javadoc in Table definitions (remove type naming)
mziccard Feb 9, 2016
6955bf4
Shorten line longer than 100 characters
mziccard Feb 9, 2016
307ddf3
Merge pull request #632 from mziccard/bigquery-hierachies
ajkannan Feb 9, 2016
edc9db7
Refactor examples
mziccard Feb 9, 2016
b392345
Minor refactoring of examples and READMEs
mziccard Feb 10, 2016
b8b2612
Add comment in snippet classes reminding to update docs upon change
mziccard Feb 10, 2016
384a3f1
Update example links in module's READMEs
mziccard Feb 10, 2016
6fed3ee
Rename John Do to John Doe
mziccard Feb 10, 2016
526eb5f
Fix minor documentation issues in examples
mziccard Feb 10, 2016
8c9cb2e
Rename missing John Do
mziccard Feb 10, 2016
7864a93
Merge pull request #635 from mziccard/refactor-examples
aozarov Feb 10, 2016
0bea6e8
Add codacy badge to READMEs
mziccard Feb 11, 2016
43aabb3
Add codacy code patterns configuration
mziccard Feb 11, 2016
1ab48bb
Merge pull request #641 from mziccard/refactor-examples
aozarov Feb 11, 2016
d28baaf
Merge branch 'master' of https://github.com/GoogleCloudPlatform/gclou…
aozarov Feb 12, 2016
171648a
Removing GAX from gcloud-java
garrettjonesgoogle Feb 18, 2016
65f2070
Removing generated files from gcloud-java-pubsub
garrettjonesgoogle Feb 18, 2016
4cf0c8f
Switching dependencies, regenerating code
garrettjonesgoogle Feb 18, 2016
25dbeef
Fixing root build
garrettjonesgoogle Feb 24, 2016
6b78851
Using version of GAX compatible with Java 1.7
garrettjonesgoogle Feb 24, 2016
c53e7ed
Merge pull request #661 from garrettjonesgoogle/pubsub-alpha
garrettjonesgoogle Feb 24, 2016
355369f
Fixing doc problems, improving formatting
garrettjonesgoogle Feb 25, 2016
51d32d5
Fixing javadoc error
garrettjonesgoogle Feb 25, 2016
d549d3f
Merge pull request #670 from garrettjonesgoogle/pubsub-alpha
aozarov Feb 26, 2016
b2115f3
Regenerating code, new settings classes
garrettjonesgoogle Mar 4, 2016
e85e69f
Updating to GAX 0.0.3
garrettjonesgoogle Mar 8, 2016
6a1f788
Surface updates from internal review
garrettjonesgoogle Mar 10, 2016
6701117
Using resurrected ServiceApiSettings in Settings classes
garrettjonesgoogle Mar 11, 2016
d0bc287
Updates due to code gen
garrettjonesgoogle Mar 11, 2016
a4609ca
Removing newSettings() method from XApi classes
garrettjonesgoogle Mar 16, 2016
5245e7d
Fixing build from last change
garrettjonesgoogle Mar 16, 2016
d1ece8a
Merge pull request #716 from garrettjonesgoogle/pubsub-alpha
garrettjonesgoogle Mar 16, 2016
6d90384
Putting spi files under spi.v1
garrettjonesgoogle Mar 16, 2016
e32afa6
Merge pull request #758 from garrettjonesgoogle/pubsub-alpha
aozarov Mar 17, 2016
c32dc22
Merge branch 'pubsub-alpha' into logging-alpha
shinfan Mar 18, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ before_install:
install: mvn install -DskipTests=true -Dgpg.skip=true
script:
- utilities/verify.sh
branches:
only:
- master
after_success:
- utilities/after_success.sh
env:
Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ Using maven for build/test
After you cloned the repository use Maven for building and running the tests.
Maven 3.0+ is required.

When downloading the source, we recommend you obtain service account credentials.
These credentials will allow you to run integration tests using `mvn verify` in command line.
Follow step 2 of the [authentication instructions](https://github.com/GoogleCloudPlatform/gcloud-java#authentication) to generate and use JSON service account credentials.

It's also important to test that changes don't break compatibility with App/Compute Engine and when running elsewhere.
To run tests on different platforms, try deploying the apps available on the [gcloud-java-examples](https://github.com/GoogleCloudPlatform/gcloud-java-examples) repository.
End-to-end tests should ensure that gcloud-java works when running on the

* App Engine production environment (see the docs for [uploading your app to production App Engine](https://cloud.google.com/appengine/docs/java/tools/maven#uploading_your_app_to_production_app_engine))
* App Engine development server (see the docs for [testing your app with the development server](https://cloud.google.com/appengine/docs/java/tools/maven#testing_your_app_with_the_development_server))
* Compute Engine (see the [Getting Started Guide](https://cloud.google.com/compute/docs/quickstart), and be sure to [enable the appropriate APIs](https://github.com/GoogleCloudPlatform/gcloud-common/tree/master/authentication#on-google-compute-engine))
* Your desktop (using `mvn exec:java`, for example)

When changes are made to authentication and project ID-related code, authentication and project ID inference should be tested using all relevant methods detailed in the [authentication docs](https://github.com/GoogleCloudPlatform/gcloud-java#authentication) and [project ID docs](https://github.com/GoogleCloudPlatform/gcloud-java#specifying-a-project-id).

Known issue: If you have installed the Google Cloud SDK, be sure to log in (using `gcloud auth login`) before running tests. Though the Datastore tests use a local Datastore emulator that doesn't require authentication, they will not run if you have the Google Cloud SDK installed but aren't authenticated.

Adding Features
---------------
Expand Down
252 changes: 222 additions & 30 deletions README.md

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@ This script takes an optional argument denoting the new version. By default, if
2. Create a PR to update the pom.xml version.
The PR should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). After this PR is merged into GoogleCloudPlatform/gcloud-java, Travis CI will push a new website to GoogleCloudPlatform/gh-pages, push a new artifact to the Maven Central Repository, and update versions in the README files.

3. Create a release on Github manually.
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and click "Draft a new release." Use `vX.Y.Z` as the "Tag Version" and `X.Y.Z` as the "Release Title", where `X.Y.Z` is the release version as listed in the `pom.xml` files.
3. Before moving on, verify that the artifacts have successfully been pushed to the Maven Central Repository. Open Travis CI, click the ["Build History" tab](https://travis-ci.org/GoogleCloudPlatform/gcloud-java/builds), and open the second build's logs for Step 2's PR. Be sure that you are not opening the "Pull Request" build logs. When the build finishes, scroll to the end of the log and verify that the artifacts were successfully staged and deployed. You can also search for `gcloud-java` on the [Sonatype website](https://oss.sonatype.org/#nexus-search;quick~gcloud-java) and check the latest version number. If the deployment didn't succeed because of a flaky test, rerun the build.

4. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
4. Publish a release on Github manually.
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and open the appropriate release draft. Make sure the "Tag Version" is `vX.Y.Z` and the "Release Title" is `X.Y.Z`, where `X.Y.Z` is the release version as listed in the `pom.xml` files. The draft should already have all changes that impact users since the previous release. To double check this, you can use the `git log` command and look through the merged master branch pull requests. Here is an example of the log command to get non-merge commits between v0.0.12 and v0.1.0:

```
git --no-pager log v0.0.12..v0.1.0 --pretty=oneline --abbrev-commit --no-merges
```

Ensure that the format is consistent with previous releases (for an example, see the [0.1.0 release](https://github.com/GoogleCloudPlatform/gcloud-java/releases/tag/v0.1.0)). After adding any missing updates and reformatting as necessary, publish the draft. Finally, create a new draft for the next release.

5. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
As mentioned before, there is an optional version argument. By default, the script will update the version from "X.Y.Z" to "X.Y.Z+1-SNAPSHOT". Suppose a different version is desired, for example X+1.0.0-SNAPSHOT. Then the appropriate command to run would be `utilities/update_pom_version.sh X+1.0.0-SNAPSHOT`.

5. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).
6. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).

7. Be sure to update App Engine documentation and [java-docs-samples](https://github.com/GoogleCloudPlatform/java-docs-samples) code as necessary. See directions [here](https://docs.google.com/a/google.com/document/d/1SS3xNn2v0qW7EadGUPBUAPIQAH5VY6WSFmT17ZjjUVE/edit?usp=sharing).

### To push a snapshot version

Expand Down
72 changes: 70 additions & 2 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## gcloud-java tools for testing

This library provides tools to help write tests for code that uses gcloud-java services.
This library provides tools to help write tests for code that uses the following gcloud-java services:

- [Datastore] (#testing-code-that-uses-datastore)
- [Storage] (#testing-code-that-uses-storage)
- [Resource Manager] (#testing-code-that-uses-resource-manager)
- [BigQuery] (#testing-code-that-uses-bigquery)

### Testing code that uses Datastore

Expand Down Expand Up @@ -51,7 +56,8 @@ Currently, there isn't an emulator for Google Cloud Storage, so an alternative i
3. Create a `RemoteGcsHelper` object using your project ID and JSON key.
Here is an example that uses the `RemoteGcsHelper` to create a bucket.
```java
RemoteGcsHelper gcsHelper = RemoteGcsHelper.create(PROJECT_ID, "/path/to/my/JSON/key.json");
RemoteGcsHelper gcsHelper =
RemoteGcsHelper.create(PROJECT_ID, new FileInputStream("/path/to/my/JSON/key.json"));
Storage storage = gcsHelper.options().service();
String bucket = RemoteGcsHelper.generateBucketName();
storage.create(BucketInfo.of(bucket));
Expand All @@ -65,5 +71,67 @@ Here is an example that clears the bucket created in Step 3 with a timeout of 5
RemoteGcsHelper.forceDelete(storage, bucket, 5, TimeUnit.SECONDS);
```

### Testing code that uses Resource Manager

#### On your machine

You can test against a temporary local Resource Manager by following these steps:

1. Before running your testing code, start the Resource Manager emulator `LocalResourceManagerHelper`. This can be done as follows:

```java
import com.google.gcloud.resourcemanager.testing.LocalResourceManagerHelper;

LocalResourceManagerHelper helper = LocalResourceManagerHelper.create();
helper.start();
```

This will spawn a server thread that listens to `localhost` at an ephemeral port for Resource Manager requests.

2. In your program, create and use a Resource Manager service object whose host is set to `localhost` at the appropriate port. For example:

```java
ResourceManager resourceManager = LocalResourceManagerHelper.options().service();
```

3. Run your tests.

4. Stop the Resource Manager emulator.

```java
helper.stop();
```

This method will block until the server thread has been terminated.

### Testing code that uses BigQuery

Currently, there isn't an emulator for Google BigQuery, so an alternative is to create a test
project. `RemoteBigQueryHelper` contains convenience methods to make setting up and cleaning up the
test project easier. To use this class, follow the steps below:

1. Create a test Google Cloud project.

2. Download a [JSON service account credentials file][create-service-account] from the Google
Developer's Console.

3. Create a `RemoteBigQueryHelper` object using your project ID and JSON key.
Here is an example that uses the `RemoteBigQueryHelper` to create a dataset.
```java
RemoteBigQueryHelper bigqueryHelper =
RemoteBigQueryHelper.create(PROJECT_ID, new FileInputStream("/path/to/my/JSON/key.json"));
BigQuery bigquery = bigqueryHelper.options().service();
String dataset = RemoteBigQueryHelper.generateDatasetName();
bigquery.create(DatasetInfo.builder(dataset).build());
```

4. Run your tests.

5. Clean up the test project by using `forceDelete` to clear any datasets used.
Here is an example that clears the dataset created in Step 3.
```java
RemoteBigQueryHelper.forceDelete(bigquery, dataset);
```

[cloud-platform-storage-authentication]:https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts
[create-service-account]:https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
1 change: 1 addition & 0 deletions codacy-conf.json

Large diffs are not rendered by default.

Loading