diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index fa118661..c13cbf92 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -85,6 +85,10 @@ jobs: - name: Lint Python code run: make flake8 + - uses: actions/setup-go@v3 + with: + go-version: "^1.19.13" + - name: Run Python tests run: make test-py env: diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 13984a48..dfa9e2fc 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -87,5 +87,9 @@ jobs: - name: Lint Python code run: make flake8 + - uses: actions/setup-go@v3 + with: + go-version: "^1.19.13" + - name: Run Python tests run: make test-py diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6aaf26bc..0cf6a738 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -86,6 +86,10 @@ jobs: - name: Lint Python code run: make flake8 + - uses: actions/setup-go@v3 + with: + go-version: "^1.19.13" + - name: Run Python tests run: make test-py @@ -115,7 +119,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: "^1.19.5" + go-version: "^1.19.13" - name: Build binaries for ${{ matrix.go-os }} run: make frames-bin @@ -187,7 +191,7 @@ jobs: - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.9 - name: Set version run: make set-version diff --git a/README.md b/README.md index 9eddb5f3..60866876 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,7 @@ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) V3IO Frames (**"Frames"**) is a multi-model open-source data-access library that provides a unified high-performance DataFrame API for working with different types of data sources (backends). -The library was developed by Iguazio to simplify working with data in the [Iguazio Data Science Platform](https://www.iguazio.com) (**"the platform"**), but it can be extended to support additional backend types. - -> **Note:** For a full API reference of the Frames platform backends, including detailed examples, see the Frames API reference in [the platform documentation](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/). +The library was developed by Iguazio to simplify working with data in the [Iguazio MLOps Platform](https://www.iguazio.com) (**"the platform"**), but it can be extended to support additional backend types. #### In This Document @@ -39,7 +37,7 @@ The library was developed by Iguazio to simplify working with data in the [Iguaz #### Python Version -The current version of Frames supports Python 3.6 and 3.7. +The current version of Frames supports Python 3.7 and 3.9. #### Initialization @@ -59,15 +57,12 @@ All Frames client methods receive a [`backend`](#client-method-param-backend) pa Frames currently supports the following backend types: - `nosql` | `kv` — a platform NoSQL (key/value) table. - See the [platform NoSQL backend API reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/nosql/).

> **Note:** The documentation uses the `"nosql"` alias to the `"kv"` type, which was added in Frames v0.6.10-v0.9.13; `"kv"` is still supported for backwards compatibility with earlier releases. - `stream` — a platform data stream **[Tech Preview]**. - `tsdb` — a time-series database (TSDB). - See the [platform TSDB backend API reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/tsdb/). - `csv` — a comma-separated-value (CSV) file. This backend type is used only for testing purposes. @@ -91,7 +86,6 @@ The `Client` class features the following methods for supporting operations on a When creating a Frames client, you must provide valid credentials for accessing the backend data, which Frames will use to identify the identity of the user. This can be done by using any of the following alternative methods (documented in order of precedence). -For more information about the user authentication for the platform backends, see the [platform documentation](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/overview/#user-authentication): - Provide the authentication credentials in the call to the [`Client` constructor](#client-constructor) — either by setting the [`token`](#client-param-token) parameter to a valid authentication token (access key) or by setting the [`user`](#client-param-user) and [`password`](#client-param-password) parameters to a username and password. Note that you cannot set the token parameter concurrently with the username and password parameters. @@ -124,7 +118,7 @@ Client(address=""[, data_url=""], container=""[, user="", password="", token=""] - **address** — The address of the Frames service (`framesd`). Use the `grpc://` prefix for gRPC (default; recommended) or the `http://` prefix for HTTP. - When running locally on the platform, set this parameter to `framesd:8081` to use the gRPC (recommended) or to `framesd:8080` to use HTTP; for more information, see the [platform documentation](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/client-constructor/). + When running locally on the platform, set this parameter to `framesd:8081` to use the gRPC (recommended) or to `framesd:8080` to use HTTP. - **Type:** `str` - **Requirement:** Required @@ -252,7 +246,7 @@ All Frames backends that support the `create` method support the following commo #### `tsdb` Backend `create` Parameters -The following `create` parameters are specific to the `tsdb` backend and are passed as keyword arguments via the `kw` parameter; for more information and examples, see the platform's [Frames TSDB-backend reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/tsdb/create/): +The following `create` parameters are specific to the `tsdb` backend and are passed as keyword arguments via the `kw` parameter: - **rate** — metric-samples ingestion rate. @@ -279,8 +273,7 @@ The following `create` parameters are specific to the `tsdb` backend and are pas #### `stream` Backend `create` Parameters -The following `create` parameters are specific to the `stream` backend and are passed as keyword arguments via the `kw` parameter: - +The following `create` parameters are specific to the `stream` backend and are passed as keyword arguments via the `kw` parameter: - **shards** — The number of stream shards to create. @@ -385,7 +378,7 @@ All Frames backends that support the `write` method support the following common #### `nosql` Backend `write` Parameters -The following `write` parameters are specific to the `nosql` backend; for more information and examples, see the platform's [Frames NoSQL-backend reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/nosql/write/): +The following `write` parameters are specific to the `nosql` backend: : - +The following `read` parameters are specific to the `stream` backend and are passed as keyword arguments via the `kw` parameter: - **seek** — Seek type.
@@ -722,7 +714,7 @@ delete(backend, table, filter='', start='', end='', if_missing=FAIL #### `nosql` Backend `delete` Parameters -The following `delete` parameters are specific to the `nosql` backend; for more information and examples, see the platform's [Frames NoSQL-backend reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/nosql/delete/): +The following `delete` parameters are specific to the `nosql` backend: - **filter** — A filter expression that identifies specific items to delete. @@ -733,7 +725,7 @@ The following `delete` parameters are specific to the `nosql` backend; for more #### `tsdb` Backend `delete` Parameters -The following `delete` parameters are specific to the `tsdb` backend; for more information and examples, see the platform's [Frames TSDB-backend reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/tsdb/delete/): +The following `delete` parameters are specific to the `tsdb` backend: - **start** — Start (minimum) time for the delete operation — i.e., delete only items whose data sample time is at or after (`>=`) the specified start time. @@ -822,7 +814,7 @@ All Frames backends that support the `execute` method support the following comm #### `nosql` Backend `execute` Commands -The following `execute` commands are specific to the `nosql` backend; for more information and examples, see the platform's [Frames NoSQL-backend reference](https://www.iguazio.com/docs/latest-release/data-layer/reference/frames/nosql/execute/): +The following `execute` commands are specific to the `nosql` backend: - **infer | infer_schema** — Infers the data schema of a given NoSQL table and creates a schema file for the table. @@ -845,8 +837,7 @@ The following `execute` commands are specific to the `nosql` backend; for more i #### `stream` Backend `execute` Commands -The following `execute` commands are specific to the `stream` backend: - +The following `execute` commands are specific to the `stream` backend: - **put** — Adds records to a stream shard. diff --git a/clients/py/.travis.yml b/clients/py/.travis.yml deleted file mode 100644 index dd9f074c..00000000 --- a/clients/py/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: python -python: - - "2.7" - - "3.6" - - "3.7-dev" -install: - - pip install pipenv - - pipenv sync -script: - - pipenv run python -m pytest -v diff --git a/clients/py/v3io_frames/grpc.py b/clients/py/v3io_frames/grpc.py index 4ddb567c..0a22c621 100644 --- a/clients/py/v3io_frames/grpc.py +++ b/clients/py/v3io_frames/grpc.py @@ -245,12 +245,15 @@ def _check_version(self): stub = fgrpc.FramesStub(self._channel) request = fpb.VersionRequest() resp = stub.Version(request) + server_version = resp.version + if server_version.startswith("v"): + server_version = server_version[1:] if resp.version: - client_version = __version__[:__version__.rfind(".")] - server_version = resp.version[:resp.version.rfind(".")] - if client_version != server_version: + client_major_minor_version = __version__[:__version__.rfind(".")] + server_major_minor__version = server_version[:server_version.rfind(".")] + if client_major_minor_version != server_major_minor__version: warnings.warn( - f"Warning - Server version '{resp.version}' differs in major/minor version from client " + f"Warning - Server version '{server_version}' differs in major/minor version from client " f"version '{__version__}'. Some operations may not work as expected." ) else: diff --git a/clients/py/v3io_frames/http.py b/clients/py/v3io_frames/http.py index afe6eec5..4f3a4b83 100644 --- a/clients/py/v3io_frames/http.py +++ b/clients/py/v3io_frames/http.py @@ -247,13 +247,20 @@ def _check_version(self): except json.JSONDecodeError as err: raise VersionError(str(err)) - version = out.get('version') - if not version: + server_version = out.get('version') + if server_version.startswith("v"): + server_version = server_version[1:] + if not server_version: warnings.warn("Warning - Cannot resolve server version. Make sure client version is compatible.") return - if __version__ != version: - warnings.warn("Warning - Server version \'" + version + "\' is different from client version \'" + __version__ + "\'. Some operations may not work as expected.") + client_major_minor_version = __version__[:__version__.rfind(".")] + server_major_minor__version = server_version[:server_version.rfind(".")] + if client_major_minor_version != server_major_minor__version: + warnings.warn( + f"Warning - Server version '{server_version}' differs in major/minor version from client " + f"version '{__version__}'. Some operations may not work as expected." + ) def _url_for(self, action): return self.address + '/' + action diff --git a/test/csv_integration_test.go b/test/csv_integration_test.go index 6072ca23..d3627e0a 100644 --- a/test/csv_integration_test.go +++ b/test/csv_integration_test.go @@ -98,7 +98,7 @@ func (csvSuite *CsvTestSuite) TestAll() { err = appender.Add(frame) csvSuite.Require().NoError(err) - err = appender.WaitForComplete(3 * time.Second) + err = appender.WaitForComplete(10 * time.Second) csvSuite.Require().NoError(err) time.Sleep(3 * time.Second) // Let DB sync diff --git a/test/kv_integration_test.go b/test/kv_integration_test.go index 4359fa07..2e1abe86 100644 --- a/test/kv_integration_test.go +++ b/test/kv_integration_test.go @@ -145,7 +145,7 @@ func (kvSuite *KvTestSuite) generateSequentialSampleFrame(size int, indexName st } func (kvSuite *KvTestSuite) TestWriteToExistingFolderWithoutSchema() { - table := fmt.Sprintf("TestWriteToExistingFolderWithoutSchema%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestWriteToExistingFolderWithoutSchema%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -244,7 +244,7 @@ func (kvSuite *KvTestSuite) generateSequentialSampleFrameWithTypesV2(size int, i // IG-22141 func (kvSuite *KvTestSuite) TestFloatIndexColumn() { - table := fmt.Sprintf("frames_ci/TestFloatIndexColumn%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/frames_ci/TestFloatIndexColumn%d", time.Now().UnixNano()) columnNames := map[string]string{"idx": "float", "n": "int"} frame := kvSuite.generateSequentialSampleFrameWithTypesV2(3, "idx", columnNames) @@ -286,7 +286,7 @@ func (kvSuite *KvTestSuite) TestFloatIndexColumn() { // IG-22140 func (kvSuite *KvTestSuite) TestBoolIndexColumn() { - table := fmt.Sprintf("frames_ci/TestFloatIndexColumn%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/frames_ci/TestFloatIndexColumn%d", time.Now().UnixNano()) columnNames := map[string]string{"idx": "bool", "n": "int"} frame := kvSuite.generateSequentialSampleFrameWithTypesV2(1, "idx", columnNames) @@ -327,7 +327,7 @@ func (kvSuite *KvTestSuite) TestBoolIndexColumn() { } func (kvSuite *KvTestSuite) TestAll() { - table := fmt.Sprintf("kv_test_all%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_all%d", time.Now().UnixNano()) kvSuite.T().Log("write") frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2", "n3"}) @@ -375,7 +375,7 @@ func (kvSuite *KvTestSuite) TestAll() { } func (kvSuite *KvTestSuite) TestRangeScan() { - table := fmt.Sprintf("kv_range_scan%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_range_scan%d", time.Now().UnixNano()) index := []string{"mike", "joe", "mike", "jim", "mike"} icol, err := frames.NewSliceColumn("key", index) @@ -471,7 +471,7 @@ func (kvSuite *KvTestSuite) TestRangeScan() { } func (kvSuite *KvTestSuite) TestNullValuesWrite() { - table := fmt.Sprintf("kv_test_nulls%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_nulls%d", time.Now().UnixNano()) index := []string{"mike", "joe", "jim"} icol, err := frames.NewSliceColumn("idx", index) @@ -563,7 +563,7 @@ func (kvSuite *KvTestSuite) TestNullValuesWrite() { // IG-19426 func (kvSuite *KvTestSuite) TestNullColumnWrite() { - table := fmt.Sprintf("kv_test_nulls%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_nulls%d", time.Now().UnixNano()) index := []string{"mike", "joe", "jim"} indexCol := &pb.Column{ @@ -661,7 +661,7 @@ func (kvSuite *KvTestSuite) TestNullColumnWrite() { } func (kvSuite *KvTestSuite) TestNullValuesRead() { - table := fmt.Sprintf("kv_test_nulls_read%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_nulls_read%d", time.Now().UnixNano()) data := make(map[string]map[string]interface{}) data["mike"] = map[string]interface{}{"idx": "mike", "n2": "dsad", "n3": true, "n4": time.Now()} @@ -719,7 +719,7 @@ func (kvSuite *KvTestSuite) TestNullValuesRead() { } func (kvSuite *KvTestSuite) TestRequestSpecificColumns() { - table := fmt.Sprintf("TestRequestSpecificColumns%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestRequestSpecificColumns%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(6, "idx", []string{"n1", "n2", "n3"}) wreq := &frames.WriteRequest{ @@ -759,7 +759,7 @@ func (kvSuite *KvTestSuite) TestRequestSpecificColumns() { } func (kvSuite *KvTestSuite) TestRequestSpecificColumnsWithKey() { - table := fmt.Sprintf("TestRequestSpecificColumnsWithKey%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestRequestSpecificColumnsWithKey%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(6, "idx", []string{"n1", "n2", "n3"}) wreq := &frames.WriteRequest{ @@ -800,7 +800,7 @@ func (kvSuite *KvTestSuite) TestRequestSpecificColumnsWithKey() { } func (kvSuite *KvTestSuite) TestDeleteWithFilter() { - table := fmt.Sprintf("kv_delete_filter%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_delete_filter%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2"}) wreq := &frames.WriteRequest{ @@ -848,7 +848,7 @@ func (kvSuite *KvTestSuite) TestDeleteWithFilter() { } func (kvSuite *KvTestSuite) TestRequestSystemAttrs() { - table := fmt.Sprintf("TestRequestSystemAttrs%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestRequestSystemAttrs%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2"}) wreq := &frames.WriteRequest{ @@ -885,7 +885,7 @@ func (kvSuite *KvTestSuite) TestRequestSystemAttrs() { kvSuite.Require().NoError(it.Err()) } func (kvSuite *KvTestSuite) TestNonExistingColumns() { - table := fmt.Sprintf("TestNonExistingColumns%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestNonExistingColumns%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2"}) wreq := &frames.WriteRequest{ @@ -915,7 +915,7 @@ func (kvSuite *KvTestSuite) TestNonExistingColumns() { } func (kvSuite *KvTestSuite) TestUpdateItemNoKey() { - table := fmt.Sprintf("TestUpdateItemNoKey_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestUpdateItemNoKey_%d", time.Now().UnixNano()) requireCtx := kvSuite.Require() columnNames := []string{"col_1", "col_2"} @@ -945,7 +945,7 @@ func (kvSuite *KvTestSuite) TestUpdateItemNoKey() { } func (kvSuite *KvTestSuite) TestOverwriteItemNoKey() { - table := fmt.Sprintf("TestOverwriteItemNoKey_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestOverwriteItemNoKey_%d", time.Now().UnixNano()) requireCtx := kvSuite.Require() columnNames := []string{"col1", "col_2"} @@ -975,7 +975,7 @@ func (kvSuite *KvTestSuite) TestOverwriteItemNoKey() { } func (kvSuite *KvTestSuite) TestUpdateItemNoSortingKey() { - table := fmt.Sprintf("TestUpdateItemNoSortingKey_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestUpdateItemNoSortingKey_%d", time.Now().UnixNano()) requireCtx := kvSuite.Require() columnNames := []string{"col_1", "col_2"} @@ -1005,7 +1005,7 @@ func (kvSuite *KvTestSuite) TestUpdateItemNoSortingKey() { } func (kvSuite *KvTestSuite) TestOverwriteItemNoSortingKey() { - table := fmt.Sprintf("TestOverwriteItemNoSortingKey_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestOverwriteItemNoSortingKey_%d", time.Now().UnixNano()) requireCtx := kvSuite.Require() columnNames := []string{"col1", "col_2"} @@ -1035,7 +1035,7 @@ func (kvSuite *KvTestSuite) TestOverwriteItemNoSortingKey() { } func (kvSuite *KvTestSuite) TestUpdateExpressionWithNullValues() { - table := fmt.Sprintf("kv_test_update_with_nulls_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_update_with_nulls_%d", time.Now().UnixNano()) index := []string{"mike", "joe", "jim", "nil"} icol, err := frames.NewSliceColumn("idx", index) @@ -1159,7 +1159,7 @@ func (kvSuite *KvTestSuite) TestUpdateExpressionWithNullValues() { } func (kvSuite *KvTestSuite) TestWritePartitionedTable() { - table := fmt.Sprintf("TestWritePartitionedTable%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestWritePartitionedTable%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2", "n3"}) wreq := &frames.WriteRequest{ @@ -1207,7 +1207,7 @@ func (kvSuite *KvTestSuite) TestWritePartitionedTable() { } func (kvSuite *KvTestSuite) TestWritePartitionedTableWithMultiplePartitions() { - table := fmt.Sprintf("TestWritePartitionedTable%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestWritePartitionedTable%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2", "n3", "n4"}) wreq := &frames.WriteRequest{ @@ -1255,7 +1255,7 @@ func (kvSuite *KvTestSuite) TestWritePartitionedTableWithMultiplePartitions() { } func (kvSuite *KvTestSuite) TestWritePartitionedBadPartitionColumns() { - table := fmt.Sprintf("TestWritePartitionedTable%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestWritePartitionedTable%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2", "n3"}) wreq := &frames.WriteRequest{ @@ -1276,7 +1276,7 @@ func (kvSuite *KvTestSuite) TestWritePartitionedBadPartitionColumns() { } func (kvSuite *KvTestSuite) TestWritePartitionedTableWithNullValues() { - table := fmt.Sprintf("TestWritePartitionedTableWithNullValues%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestWritePartitionedTableWithNullValues%d", time.Now().UnixNano()) index := []string{"mike", "joe"} icol, err := frames.NewSliceColumn("idx", index) @@ -1334,7 +1334,7 @@ func (kvSuite *KvTestSuite) TestWritePartitionedTableWithNullValues() { } func (kvSuite *KvTestSuite) TestUpdateExpressionWithCondition() { - table := fmt.Sprintf("kv_test_update_with_condition_%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/kv_test_update_with_condition_%d", time.Now().UnixNano()) index := []string{"mike", "joe", "jim", "nil"} icol, err := frames.NewSliceColumn("idx", index) diff --git a/test/kv_save_mode_integration_test.go b/test/kv_save_mode_integration_test.go index 275df4e0..a0b28603 100644 --- a/test/kv_save_mode_integration_test.go +++ b/test/kv_save_mode_integration_test.go @@ -15,7 +15,7 @@ import ( // === SaveMode - errorIfTableExists func (kvSuite *KvTestSuite) TestSaveModeErrorIfExistsTableExists() { - table := fmt.Sprintf("TestSaveModeErrorIfExistsTableExists%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeErrorIfExistsTableExists%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2"}) @@ -50,7 +50,7 @@ func (kvSuite *KvTestSuite) TestSaveModeErrorIfExistsTableExists() { // === SaveMode - OverwriteTable func (kvSuite *KvTestSuite) TestSaveModeOverwriteTableExists() { - table := fmt.Sprintf("TestSaveModeOverwriteTableExists%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteTableExists%d", time.Now().UnixNano()) frame := kvSuite.generateRandomSampleFrame(5, "idx", []string{"n1", "n2"}) wreq := &frames.WriteRequest{ @@ -98,7 +98,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteTableExists() { } func (kvSuite *KvTestSuite) TestSaveModeOverwriteTableDoesntExists() { - table := fmt.Sprintf("TestSaveModeOverwriteTableDoesntExists%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteTableDoesntExists%d", time.Now().UnixNano()) newColumns := []string{"n3", "n4"} frame := kvSuite.generateRandomSampleFrame(5, "idx", newColumns) @@ -133,7 +133,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteTableDoesntExists() { // === SaveMode - UpdateItem func (kvSuite *KvTestSuite) TestSaveModeUpdateItemNewRow() { - table := fmt.Sprintf("TestSaveModeUpdateItemNewRow%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemNewRow%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateRandomSampleFrame(3, "idx", columnNames) @@ -185,7 +185,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemNewRow() { } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemNewAttribute() { - table := fmt.Sprintf("TestSaveModeUpdateItemNewAttribute%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemNewAttribute%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -239,7 +239,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemNewAttribute() { } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemSameAttributeDifferentValues() { - table := fmt.Sprintf("TestSaveModeUpdateItemSameAttributeDifferentValues%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemSameAttributeDifferentValues%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -291,7 +291,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemSameAttributeDifferentValues() } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeColumnType() { - table := fmt.Sprintf("TestSaveModeUpdateItemChangeColumnType%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemChangeColumnType%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -329,7 +329,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeColumnType() { } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeNumricColumnType() { - table := fmt.Sprintf("TestSaveModeUpdateItemChangeNumricColumnType%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemChangeNumricColumnType%d", time.Now().UnixNano()) frame := kvSuite.generateSequentialSampleFrameWithTypes(3, "idx", map[string]string{"n1": "float", "n2": "int"}) wreq := &frames.WriteRequest{ @@ -379,7 +379,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeNumricColumnType() { } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeIndexName() { - table := fmt.Sprintf("TestSaveModeUpdateItemChangeIndexName%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemChangeIndexName%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -417,7 +417,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemChangeIndexName() { } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemUpdateExpressionNewAttributes() { - table := fmt.Sprintf("TestSaveModeUpdateItemUpdateExpressionNewAttributes%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemUpdateExpressionNewAttributes%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -486,7 +486,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemUpdateExpressionNewAttributes( } func (kvSuite *KvTestSuite) TestSaveModeUpdateItemUpdateExpressionChangeAttributeValue() { - table := fmt.Sprintf("TestSaveModeUpdateItemUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeUpdateItemUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -554,7 +554,7 @@ func (kvSuite *KvTestSuite) TestSaveModeUpdateItemUpdateExpressionChangeAttribut // === SaveMode - CreateNewItemsOnly func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyNewRow() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyNewRow%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyNewRow%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateRandomSampleFrame(3, "idx", columnNames) @@ -606,7 +606,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyNewRow() { } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyNewAttribute() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyNewAttribute%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyNewAttribute%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -675,7 +675,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyNewAttribute() { } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlySameAttributeDifferentValues() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlySameAttributeDifferentValues%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlySameAttributeDifferentValues%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -726,7 +726,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlySameAttributeDifferent } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyChangeColumnType() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyChangeColumnType%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyChangeColumnType%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -765,7 +765,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyChangeColumnType() { } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyChangeIndexName() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyChangeIndexName%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyChangeIndexName%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -804,7 +804,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyChangeIndexName() { } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyUpdateExpressionNewAttributes() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyUpdateExpressionNewAttributes%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyUpdateExpressionNewAttributes%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -873,7 +873,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyUpdateExpressionNewAtt } func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyUpdateExpressionChangeAttributeValue() { - table := fmt.Sprintf("TestSaveModeCreateNewItemsOnlyUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeCreateNewItemsOnlyUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -927,7 +927,7 @@ func (kvSuite *KvTestSuite) TestSaveModeCreateNewItemsOnlyUpdateExpressionChange // === SaveMode - OverwriteItem func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemNewRow() { - table := fmt.Sprintf("TestSaveModeOverwriteItemNewRow%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemNewRow%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateRandomSampleFrame(3, "idx", columnNames) @@ -979,7 +979,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemNewRow() { } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemNewAttribute() { - table := fmt.Sprintf("TestSaveModeOverwriteItemNewAttribute%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemNewAttribute%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -1048,7 +1048,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemNewAttribute() { } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemSameAttributeDifferentValues() { - table := fmt.Sprintf("TestSaveModeOverwriteItemSameAttributeDifferentValues%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemSameAttributeDifferentValues%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -1099,7 +1099,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemSameAttributeDifferentValue } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemChangeColumnType() { - table := fmt.Sprintf("TestSaveModeOverwriteItemChangeColumnType%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemChangeColumnType%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -1138,7 +1138,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemChangeColumnType() { } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemChangeIndexName() { - table := fmt.Sprintf("TestSaveModeOverwriteItemChangeIndexName%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemChangeIndexName%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -1177,7 +1177,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemChangeIndexName() { } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemUpdateExpressionNewAttributes() { - table := fmt.Sprintf("TestSaveModeOverwriteItemUpdateExpressionNewAttributes%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemUpdateExpressionNewAttributes%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) @@ -1247,7 +1247,7 @@ func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemUpdateExpressionNewAttribut } func (kvSuite *KvTestSuite) TestSaveModeOverwriteItemUpdateExpressionChangeAttributeValue() { - table := fmt.Sprintf("TestSaveModeOverwriteItemUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestSaveModeOverwriteItemUpdateExpressionChangeAttributeValue%d", time.Now().UnixNano()) columnNames := []string{"n1", "n2"} frame := kvSuite.generateSequentialSampleFrame(3, "idx", columnNames) diff --git a/test/stream_integration_test.go b/test/stream_integration_test.go index 4d60bbe6..816ea6da 100644 --- a/test/stream_integration_test.go +++ b/test/stream_integration_test.go @@ -64,7 +64,7 @@ func (streamSuite *StreamTestSuite) SetupSuite() { } func (streamSuite *StreamTestSuite) TestAll() { - table := fmt.Sprintf("stream_test_all%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/stream_test_all%d", time.Now().UnixNano()) streamSuite.T().Log("create") req := &pb.CreateRequest{ diff --git a/test/tsdb_integration_test.go b/test/tsdb_integration_test.go index 90f9b38d..68046e8b 100644 --- a/test/tsdb_integration_test.go +++ b/test/tsdb_integration_test.go @@ -91,7 +91,7 @@ func (tsdbSuite *TsdbTestSuite) SetupSuite() { } func (tsdbSuite *TsdbTestSuite) TestAll() { - table := fmt.Sprintf("tsdb_test_all%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/tsdb_test_all%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -154,7 +154,7 @@ func (tsdbSuite *TsdbTestSuite) TestAll() { } func (tsdbSuite *TsdbTestSuite) TestRegressionIG14560() { - table := fmt.Sprintf("tsdb_test_all%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/tsdb_test_all%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -235,7 +235,7 @@ func (tsdbSuite *TsdbTestSuite) TestRegressionIG14560() { } func (tsdbSuite *TsdbTestSuite) TestAllStringMetric() { - table := fmt.Sprintf("tsdb_test_all%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/tsdb_test_all%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -296,7 +296,7 @@ func (tsdbSuite *TsdbTestSuite) TestAllStringMetric() { } func (tsdbSuite *TsdbTestSuite) TestDeleteWithTimestamp() { - table := fmt.Sprintf("TestDeleteWithTimestamp%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestDeleteWithTimestamp%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -351,7 +351,7 @@ func (tsdbSuite *TsdbTestSuite) TestDeleteWithTimestamp() { } func (tsdbSuite *TsdbTestSuite) TestDeleteWithRelativeTime() { - table := fmt.Sprintf("TestDeleteWithRelativeTime%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestDeleteWithRelativeTime%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -405,7 +405,7 @@ func (tsdbSuite *TsdbTestSuite) TestDeleteWithRelativeTime() { } func (tsdbSuite *TsdbTestSuite) TestDeleteWithRFC3339Time() { - table := fmt.Sprintf("TestDeleteWithRFC3339Time%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestDeleteWithRFC3339Time%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -461,7 +461,7 @@ func (tsdbSuite *TsdbTestSuite) TestDeleteWithRFC3339Time() { } func (tsdbSuite *TsdbTestSuite) TestDeleteAll() { - table := fmt.Sprintf("TestDeleteAll%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestDeleteAll%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{ @@ -508,7 +508,7 @@ func (tsdbSuite *TsdbTestSuite) TestDeleteAll() { } func (tsdbSuite *TsdbTestSuite) TestDeleteAllSamplesButNotTable() { - table := fmt.Sprintf("TestDeleteAllSamplesButNotTable%d", time.Now().UnixNano()) + table := fmt.Sprintf("frames_ci/TestDeleteAllSamplesButNotTable%d", time.Now().UnixNano()) tsdbSuite.T().Log("create") req := &pb.CreateRequest{