Commit da373b5
feat: Bigtable authorized views requests on the Data plane (#1509)
* Create the new tabular api service file
* feat: Bigtable authorized views - move the code over to the TabularApiSurface class (#1463)
* Move the constructor over to TabularApiService
* Move sampleRowKeys over
* Move sampleRowKeys functions over and use promisify
* Adjust the proxyquire to work with TabularAPIserv
* Move all the ReadRows functionality over
* Solve the issue with the is dependency
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* Add header for new class
* Only include Table mocks that are necessary
* Remove TODO
* Rename TabularApiService to TabularApiSurface
* Change all imports to tabular-api-surface
* surface. not service
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* feat: Bigtable Authorized Views - Allow checkAndMutate and ReadModifyWriteRow calls on Authorized Views (#1464)
* Move the constructor over to TabularApiService
* Move sampleRowKeys over
* Move sampleRowKeys functions over and use promisify
* Adjust the proxyquire to work with TabularAPIserv
* Move all the ReadRows functionality over
* Solve the issue with the is dependency
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* Add header for new class
* Trying out the FilterInformation class
* Add a DataUtils module for the shared row function
* Outsource functionality of filter to helper
* debugging
* Adjust proxyquire to include mocks for moved fn
* Remove imports
* Outsource code to a createRulesUtil function
* Change proxyquire to include createRulesUtil
* Move increment over to the utils folder
* Move the functions into a static class for mocks
* Remove mockCreateRules and shorten mock
* Stub out FakeRowDataUtil
* Remove unused dependencies
* Add the functions to work with checkAndMutate
and readWriteModifyRow
* Fix regressions from the merge
* Add documentation for the class
* Document the new methods of table
* Change the interface of the rowUtils
* Pull the generateProperties code out avoid duplica
* Move duplicate code out into a getProperties object
* Remove console.log
* Add method for creating views
* Object for making grpc calls for authorized views
* Remove import
* Update the documentation for the Table
* More specific type
* Add documentation for each of the functions
* Remove TODO
* Add headers
* Add documentation for new class
* Remove imports
* Reintroduce before
* Remove unused import
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* feat: Create a view on the instance, not on the table (#1476)
* Move view creation from the table class to instanc
* feat: Create a view on the instance, not on the table
* Add table name parameter to the documentation
* Remove Table
* feat: Create the unit tests for Authorized Views ensuring that requests are consistent (#1501)
* Create a test for authorized views
* Set the ReadRows options
* Add authorized view test for createreadstream
* Pass authorizedViewName along for createReadStream
* Add the unit test for getRows
* Add the unit test for getRows
* Take out the test mock for the request function
* Mutate rows request - test setup
* Made corrections and src code changes so unit test
passes
* Fix the readrows test to end the stream
Also add a test for insert and make the test easier to debug.
* Finish the sampleRowKeys tests
* Refactor part of the test for getting request opts
* Authorized views for readRows test should be one
assert
* Add the mock function for request
* Make mutate rows use the mockRequest function
* Setup the sampleRowKeys setup fn to use mockReq
* Add comments to the mocking functions
* Fix comments. Move functions to right place
* Setup the readModifyWriteRow tests
* For createRules test use new mockCallbackRequest
You need to call the callback in order to end the operation to createRules.
* Use the new mockCallbackRequest function
* Get rid of the unused mock function
* Create a test file for createRules not got
* increment
* Add the test for increment
* Change the response value for authorized view
* Add the console logs and change return type
* Flesh out response so that view call works
* Exclude appropriate properties using promisify.
* Removed console logs
* Finished the filter test
* Add the view call for filter
* Remove only
* Change to more readable values
* Remove only
* Add header to the test
* For tests, expect view to be excluded from promis
* run linter
* Add a few @params and @returns
* Add a comment about making requests for auth views
* Added more comments - auth views vs table
Also added a comment for calling increment
* feat: Bigtable authorized views integration tests (#1504)
* Create a test for authorized views
* Set the ReadRows options
* Add authorized view test for createreadstream
* Pass authorizedViewName along for createReadStream
* Add the unit test for getRows
* Add the unit test for getRows
* Take out the test mock for the request function
* Mutate rows request - test setup
* Made corrections and src code changes so unit test
passes
* Fix the readrows test to end the stream
Also add a test for insert and make the test easier to debug.
* Finish the sampleRowKeys tests
* Refactor part of the test for getting request opts
* Authorized views for readRows test should be one
assert
* Add the mock function for request
* Make mutate rows use the mockRequest function
* Setup the sampleRowKeys setup fn to use mockReq
* Add comments to the mocking functions
* Fix comments. Move functions to right place
* Setup the readModifyWriteRow tests
* For createRules test use new mockCallbackRequest
You need to call the callback in order to end the operation to createRules.
* Use the new mockCallbackRequest function
* Get rid of the unused mock function
* Create a test file for createRules not got
* increment
* Add the test for increment
* Change the response value for authorized view
* Add the console logs and change return type
* Flesh out response so that view call works
* Exclude appropriate properties using promisify.
* Removed console logs
* Finished the filter test
* Add the view call for filter
* Remove only
* Change to more readable values
* Remove only
* Add header to the test
* For tests, expect view to be excluded from promis
* run linter
* Create the before hook for auth views
* Note to self on auth views - TODO
* Add an insert statement
* Make a test for getRows
* Add the test for the getRows function.
* Finish ‘should fail when writing to a row not in v
* Add another mutate test, preserve table after test
Add after hook to make sure table values stay the same.
Add test for modifying from different column
* Remove TODO
* refactor the error message in the test
* Add mutate, insert and sampleRowKeys tests
* Fix sampleRowKeys test to require a fix upstream
* Create samplerowkeys and createreadstream tests
* Surround all tests in a try block
This allows for better error reporting
* Fixed the column filter so it works
* Reduce verbosity in tests
In many cases, 3 lines can be reduced to one variable. This is crucial for making the integration tests shorter.
* Replace verbose data with data variable
* Add an insert for multiple rows
* Fix the check and mutate test to ignore corrupt d
* Add the readModifyWriteRow tests
* Add awaits
* wrap columnFamily and columnIdInView in brackets
* Eliminate the TODO
* Remove only
* Add key back to filter config option
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Kim <[email protected]>1 parent c4e2356 commit da373b5
File tree
13 files changed
+2614
-1006
lines changed- src
- utils
- system-test
- test
13 files changed
+2614
-1006
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
1475 | 1476 | | |
1476 | 1477 | | |
1477 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1478 | 1489 | | |
1479 | 1490 | | |
1480 | 1491 | | |
| |||
1490 | 1501 | | |
1491 | 1502 | | |
1492 | 1503 | | |
| 1504 | + | |
1493 | 1505 | | |
1494 | 1506 | | |
1495 | 1507 | | |
| |||
0 commit comments