Skip to content

Conversation

codefactor-io[bot]
Copy link

@codefactor-io codefactor-io bot commented Mar 16, 2022

This pull request applies style fixes from code review by CodeFactor.


For more information, click here.

Sam Gammon and others added 2 commits March 15, 2022 18:14
* Feature: Support for Cloud Spanner

This changeset introduces support for Google Cloud Spanner in the
Elide model layer and ORM. Basic support for reading, writing,
transactions, etc., are all planned. This is pretty easy, obviously,
since there is already a Firestore adapter to work from.

Fixes and closes sgammon/elide#856.

* Tune bazel.rc and Makefile configs

* Tweaks to build flow

* Disable labs in CI

* Promote strict_proto_deps / strict_system_includes

* Whoops, fix labs state

* Converge IntelliJ flags with Makefile

* Add DDL-based Spanner table generator

- Generate compliant DDL statements for creating Spanner tables
  from proto models
- Add ability to stub/mock `FieldPointer` objects

* Add concept of field size for Spanner columns

* Significantly more driver testing

- Add `TypeBuffet` to test conversion of different types
- Add tests for `SpannerUtil`
- Add initial tests for Spanner DDL generator
- Uncomment more tests from `GenericPersistenceDriverTests`

* Fixes for TypeScript-related tests

* Further model adapter testing tweaks

- Allow test caching (local only)
- Enable other adapter/driver tests

* Converge newer deps

* Re-enable ancillary `rules_closure` tests

- Fix CSS testing bugs
- Re-enable style tests
- Add suite targets for DOM/style tests

* Enable trace logging in model adapter objects during tests

* Refactor generic driver tests to allow opt-out pattern

- Allow drivers to opt-out of tests they don't yet support
- Enable all tests across the board

* Enable more logging targets in testing

* Add specialized Spanner tests to regular backend suite

- Add `SpannerDDLTest`
- Add `SpannerUtilTest`

* Disallow transport config construction

* Implement deletes in Spanner

- Implement singular delete method
- Enable standard driver `delete()` tests

* Implement `FieldMask` enforcement in Spanner

- Enforce `FieldMask` settings for fetched records
- Drop superfluous error checking

* Style and bug fixes from analysis tools

* Wrap `InvalidProtocolBufferException` in `IllegalStateException`

* Refactor error handling for embedded JSON models

* Bugfixes for Spanner DDL generator

- Fix bug with `ARRAY` fields missing inner types
- Add sensible default for `ENUM` fields implemented as `STRING`

* Better testing for DDL statements, fixes for `BYTES` fields

- Enable column sizes for `BYTES` fields
- Transition long string comparisons to Truth assertions

* Hook tests into the new DDL generator

- Generate tables for emulated testing
- Add method alias to generate DDL statements just from a model
  instance (with default settings)

* Drop branch coverage until logging settings don't bork it

* Update Javadoc

* Exclude docs/tests from CodeClimate

Create CNAME

Set theme jekyll-theme-cayman

* Add missing package-info in gust/backend/annotations

* Update javadoc

* Use remote 'sleek' Jekyll theme

* Drop empty method comment

* Further CodeClimate config tweaks

* Fix duplicate exclude_patterns in CodeClimate config

* [skip-ci] License header updates

* Drop docs from IDE project

* Refactor `DatabaseManager` to bind adapter/driver

- Bind adapter and driver together, that was the OG point
- Add `Closeable`/`AutoCloseable` support to `SpannerManager`
- Add full test coverage to `SpannerManager`
- Add shared run profile for debuggable Bazel testsuite

* Refresh docs

* Don't remove docroot when cleaning docs

* Disallow internal construction of `SpannerManagerSingleton`

* Downgrade to Micronaut v2.5.4

* Feature: 'suspend_debug' when running apps

* Support for `TIMESTAMP` and `DATE` types in Spanner

- Support generating DDL for temporal column types
- Codec support for converting between Spanner `DATE` and
  `com.google.type.Date`
- Codec support for converting between Spanner `TIMESTAMP`
  and `com.google.protobuf.Timestamp`

* Ungate serialization of `TIMESTAMP` and `DATE` types

- Drop exceptions
- Drop TODOs
- Enable serialization of `TIMESTAMP` types from PB timestamps
- Enable serialization of `DATE` types from PB common dates

* Support properly encoding/decoding ENUMs in Spanner

* Fix repeated field error in Spanner codec

* Add dedicated manager spawn route with settings control

The Spanner manager needs a way to spawn drivers with custom
settings. It has a way to now.

* Add ability to acquire Spanner client from manager

* Add granular configuration to `SpannerManager`

- Add ability to control executor
- Add ability to control cache
- Add ability to control base spanner options
- Add ability to control main driver options

* Add new Spanner tests to regular suite

* Fix bug with key column names

* Enforce singular KEY field state

* Converge tests with new ID behavior

* Resolve same key bug for generated DDL

* Add enforcement for ID column types

* Fix ID issues with default Spanner field sets

* Fix issue with Integer vs. Long decoding in Spanner

* Allow public acquisition of InMemoryCache instances

* Provide 'resolveColumnName' alias with no settings

* Open up 'SpannerStructDeserializer#forModel

* Expose better streaming support for calculating column fields

- Allow access to underlying field stream
- Pair fields to corresponding column names
- Maintain external API

* Update docs

* Fix missing license header

* Fix issues with ID presence on returned models

- Add tests to enforce ID presence on models returned via adapter
  fetch interfaces
- Fix related bugs on Spanner adapter

* [p0] Fix for debugger_support flag issue

* Fix debug race conditions for JDK app targets

* Better nullchecks for Spanner columns

* Upgrades to Java dependencies

- Upgrade GAX
- Upgrade Micronaut
- Upgrade Google Cloud SDK
- Upgrade Firestore

* Rollback GAX change

* Fixes for various analyzer warnings

* Implement transactional write/delete support

- Set `transactionContext` on mutation options for buffered
  serialization to an active transaction
- Acquire a transaction context via `TransactionManager.begin()`

* Implement codec support for `NUMERIC` columns

Following [Google's advice][1], I've implemented `NUMERIC` types
as proto-strings.

- Add deserializer support for `NUMERIC`s
- Add serializer support for `NUMERIC`s
- Add basic test for schema translation

[1]: https://cloud.google.com/spanner/docs/working-with-numerics

* Update docs

* Implement support for ancillary Spanner annotations

- Add `NONNULL` annotation
- Add basic support for field expressions (including `STORED`)
- Add `commit_update` support

* Rebuild docs

* Apply fixes for runtime jdeps

* Bump BoringSSL/Netty -> '2.0.40.Final'

* Netty/Micronaut version bumps

* Upgrade rules_closure and protobuf -> 3.17.3

* Re-pin maven deps

* Match gRPC's versions for Netty and BoringSSL

* Re-upgrade Netty/TCNative

* Force shaded version of Netty for gRPC

* Add remote Bazel settings profile

* Enable control of naming for Java image targets

* Wire up container-based dev

* General fixes for Bazel within dev containers

* Dev container env adjustments

* Add missing continuation slash

* Add container init and post-attach commands

* Add creds to codespaces image (via secrets)

* Don't require env for dev container

* Add default set of VSC extensions

* Fix path access to ibazel/bazelisk in devcontainer init

* Further adjustments to devcontainer env

* Drop initialize command from devcontainer

* Move container signal to env

* Drop initialize command

* Set container user to 'dev'

* Add container-init script

* Tweaks for init script safety

* Force version v1d for codespaces

* Upgrade devcontainer -> v1e

* Improvements to container init script

* Force container version v1f

* Fixes for project-wide RBE settings

* Upgrade container -> v1g

* Upgrade to latest Codespaces container

* Upgrade Bazel -> 4.2.0

* Apply lib overrides for Netty and Guava-JDK5

* Upgrade Bazel -> 4.2.1

* Add Micronaut Management dep

* Update Spanner -> 6.13.0

* Upgrade GAX -> 2.5.0

* Add renovate.json

* Switch Nonnull to NonNull (Micronaut) in AssetManager

* Update Maven pins

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant