diff --git a/model/src/main/java/org/projectnessie/model/IcebergTable.java b/model/src/main/java/org/projectnessie/model/IcebergTable.java index 1b30a54e7b2..f21c1ee9997 100644 --- a/model/src/main/java/org/projectnessie/model/IcebergTable.java +++ b/model/src/main/java/org/projectnessie/model/IcebergTable.java @@ -28,14 +28,14 @@ * Represents the state of an Iceberg table in Nessie. An Iceberg table is globally identified via * its {@link Contents#getId() unique ID}. * - *

The Iceberg-table-state consists of the location to the table-metadata and the snapshot-ID. + *

The Iceberg-table-state consists of the location to the table-metadata and the state of the ID + * generators using the serialized version of Iceberg's {@code TableIdGenerators} object. * - *

The table-metadata-location is managed globally within Nessie, which means that all versions - * of the same table share the table-metadata across all named-references (branches and tags). There - * is only one version, the current version, of Iceberg's table-metadata. + *

The table-metadata-location is managed on each Nessie reference, which means that all versions + * of the same table have distinct table-metadata across all named-references (branches and tags). * - *

Within each named-reference (branch or tag), the (current) Iceberg-snapshot-ID will be - * different. In other words: changes to an Iceberg table update the snapshot-ID. + *

The information needed to generate IDs for an Iceberg table that need to be globally unique, + * for example the last-column-ID, is managed globally within Nessie. * *

When adding a new table (aka contents-object identified by a contents-id), use a {@link * org.projectnessie.model.Operation.Put} without an expected-value. In all other cases (updating an @@ -69,20 +69,20 @@ public abstract class IcebergTable extends Contents { @NotBlank public abstract String getMetadataLocation(); - /** ID of the current Iceberg snapshot. This value is not present, if there is no snapshot. */ - public abstract long getSnapshotId(); + /** Opaque representation of Iceberg's {@code TableIdGenerators}. */ + public abstract String getIdGenerators(); - public static IcebergTable of(String metadataLocation, long snapshotId) { + public static IcebergTable of(String metadataLocation, String idGenerators) { return ImmutableIcebergTable.builder() .metadataLocation(metadataLocation) - .snapshotId(snapshotId) + .idGenerators(idGenerators) .build(); } - public static IcebergTable of(String metadataLocation, long snapshotId, String contentsId) { + public static IcebergTable of(String metadataLocation, String idGenerators, String contentsId) { return ImmutableIcebergTable.builder() .metadataLocation(metadataLocation) - .snapshotId(snapshotId) + .idGenerators(idGenerators) .id(contentsId) .build(); } diff --git a/perftest/simulations/src/test/scala/org/projectnessie/perftest/gatling/CommitToBranchSimulation.scala b/perftest/simulations/src/test/scala/org/projectnessie/perftest/gatling/CommitToBranchSimulation.scala index 873a5120a2c..deec3582f62 100644 --- a/perftest/simulations/src/test/scala/org/projectnessie/perftest/gatling/CommitToBranchSimulation.scala +++ b/perftest/simulations/src/test/scala/org/projectnessie/perftest/gatling/CommitToBranchSimulation.scala @@ -55,7 +55,7 @@ class CommitToBranchSimulation extends Simulation { val contentsId = tableName val tableMeta = IcebergTable - .of(s"path_on_disk_${tableName}_$commitNum", commitNum, contentsId) + .of(s"path_on_disk_${tableName}_$commitNum", "x", contentsId) // TODO the expectedContents is wrong!! commitNum is for the session, but we need the actual global state!! val op = @@ -65,7 +65,7 @@ class CommitToBranchSimulation extends Simulation { tableMeta, IcebergTable.of( s"path_on_disk_${tableName}_${commitNum - 1}", - commitNum - 1, + "x", contentsId ) ) diff --git a/python/pynessie/model.py b/python/pynessie/model.py index 8c442f621a4..dd11295b02c 100644 --- a/python/pynessie/model.py +++ b/python/pynessie/model.py @@ -30,7 +30,7 @@ class IcebergTable(Contents): """Dataclass for Nessie Contents.""" metadata_location: str = desert.ib(fields.Str(data_key="metadataLocation")) - snapshot_id: int = desert.ib(fields.Int(data_key="snapshotId")) + id_generators: str = desert.ib(fields.Str(data_key="idGenerators")) def requires_expected_state(self: "IcebergTable") -> bool: """Returns True - expected state should be provided for Put operations on Iceberg tables.""" @@ -38,7 +38,7 @@ def requires_expected_state(self: "IcebergTable") -> bool: def pretty_print(self: "IcebergTable") -> str: """Print out for cli.""" - return "Iceberg table:\n\tmetadata-location:{}\n\tsnapshot-id:{}".format(self.metadata_location, self.snapshot_id) + return "Iceberg table:\n\tmetadata-location:{}\n\tid-generators:{}".format(self.metadata_location, self.id_generators) IcebergTableSchema = desert.schema_class(IcebergTable) diff --git a/python/tests/cassettes/test_nessie_cli/test_assign.yaml b/python/tests/cassettes/test_nessie_cli/test_assign.yaml index d0b00d391ee..9829865976d 100644 --- a/python/tests/cassettes/test_nessie_cli/test_assign.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_assign.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -130,11 +130,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_assign", "snapshotId": 42, "metadataLocation": - "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": null, "key": {"elements": - ["assign", "foo", "bar"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "test message", "hash": null, - "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["assign", + "foo", "bar"]}, "contents": {"idGenerators": "xyz", "id": "test_assign", "metadataLocation": + "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie test", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -143,7 +143,7 @@ interactions: Connection: - keep-alive Content-Length: - - '396' + - '401' Content-Type: - application/json User-Agent: @@ -152,7 +152,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '120' @@ -176,7 +176,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '120' @@ -186,8 +186,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -240,8 +240,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -280,8 +280,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n} + \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n} ]" headers: Content-Length: @@ -306,7 +306,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '121' @@ -316,8 +316,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e", - "name": "v1.0", "type": "TAG"}' + body: '{"name": "v1.0", "hash": "250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121", + "type": "TAG"}' headers: Accept: - '*/*' @@ -335,7 +335,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree?sourceRefName=main response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '118' @@ -360,9 +360,9 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}, - {\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n} + \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}, + {\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n} ]" headers: Content-Length: @@ -387,7 +387,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '120' @@ -397,8 +397,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e", - "name": "v1.0", "type": "TAG"}' + body: '{"name": "v1.0", "hash": "250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121", + "type": "TAG"}' headers: Accept: - '*/*' @@ -441,7 +441,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/v1.0 response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '118' @@ -451,8 +451,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e", - "name": "dev", "type": "TAG"}' + body: '{"name": "dev", "hash": "250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121", + "type": "TAG"}' headers: Accept: - '*/*' @@ -467,7 +467,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e + uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121 response: body: string: '' @@ -491,9 +491,9 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}, - {\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n} + \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}, + {\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n} ]" headers: Content-Length: @@ -518,7 +518,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '120' @@ -541,7 +541,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121 response: body: string: '' @@ -564,7 +564,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/v1.0 response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '118' @@ -587,7 +587,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e + uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121 response: body: string: '' @@ -610,7 +610,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\"\n}" headers: Content-Length: - '121' @@ -634,12 +634,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.266760Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.266760Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.206913Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.206913Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '383' @@ -664,10 +663,10 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_assign\",\n \"metadataLocation\" - : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '108' + - '113' Content-Type: - application/json status: @@ -675,9 +674,9 @@ interactions: message: OK - request: body: '{"operations": [{"key": {"elements": ["assign", "foo", "bar"]}, "type": - "DELETE"}], "commitMeta": {"authorTime": null, "properties": null, "committer": - null, "message": "delete_message", "hash": null, "author": null, "signedOffBy": - null, "commitTime": null}}' + "DELETE"}], "commitMeta": {"commitTime": null, "committer": null, "author": + null, "properties": null, "signedOffBy": null, "message": "delete_message", + "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -692,10 +691,10 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=d1e4914f97e9b7872d62c292e080e2acf09a0b066652d303caa463f54681674e + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=250c12f8e22b0e5bf0ccae57254c1b99fa3013c47a2a0e1d636bf36014443121 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"b3104c66ec738a17dc2deed76e4de7c24c061b35a2f044bd26940ca9e9f6b80c\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"51740ceaed0b3d82d22a602f2f99f39b7c1c58f9167914bcad0baf1720d8a83a\"\n}" headers: Content-Length: - '121' @@ -719,7 +718,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"b3104c66ec738a17dc2deed76e4de7c24c061b35a2f044bd26940ca9e9f6b80c\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"51740ceaed0b3d82d22a602f2f99f39b7c1c58f9167914bcad0baf1720d8a83a\"\n}" headers: Content-Length: - '121' @@ -742,7 +741,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=b3104c66ec738a17dc2deed76e4de7c24c061b35a2f044bd26940ca9e9f6b80c + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=51740ceaed0b3d82d22a602f2f99f39b7c1c58f9167914bcad0baf1720d8a83a response: body: string: '' @@ -751,8 +750,8 @@ interactions: code: 204 message: No Content - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_branch.yaml b/python/tests/cassettes/test_nessie_cli/test_branch.yaml index df046a02e39..2cbe1dc93f6 100644 --- a/python/tests/cassettes/test_nessie_cli/test_branch.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_branch.yaml @@ -73,8 +73,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -153,8 +153,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "etl", "type": "BRANCH"}' + body: '{"name": "etl", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_commit_no_expected_state.yaml b/python/tests/cassettes/test_nessie_cli/test_commit_no_expected_state.yaml index ddd6a56f1c5..3003cd86b19 100644 --- a/python/tests/cassettes/test_nessie_cli/test_commit_no_expected_state.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_commit_no_expected_state.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -130,12 +130,13 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_commit_no_expected_state", "metadataLocationHistory": - ["asd111"], "lastCheckpoint": "x", "checkpointLocationHistory": ["def"], "type": - "DELTA_LAKE_TABLE"}, "expectedContents": null, "key": {"elements": ["commit", - "expected", "contents"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "commit 1", "hash": null, - "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["commit", + "expected", "contents"]}, "contents": {"metadataLocationHistory": ["asd111"], + "id": "test_commit_no_expected_state", "checkpointLocationHistory": ["def"], + "lastCheckpoint": "x", "type": "DELTA_LAKE_TABLE"}, "type": "PUT"}], "commitMeta": + {"commitTime": null, "committer": null, "author": "nessie test", "properties": + null, "signedOffBy": null, "message": "commit 1", "authorTime": null, "hash": + null}}' headers: Accept: - '*/*' @@ -153,7 +154,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"94dcaac8ffc3f16b9f30b932abec068bee2926d57d1015eefb416bd081e5b629\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"902d633d055966bc00eb36b536b01170cbb378d363c08bc6eb08d42e48e3fb08\"\n}" headers: Content-Length: - '120' @@ -179,7 +180,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"94dcaac8ffc3f16b9f30b932abec068bee2926d57d1015eefb416bd081e5b629\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"902d633d055966bc00eb36b536b01170cbb378d363c08bc6eb08d42e48e3fb08\"\n} ]" headers: Content-Length: @@ -216,12 +217,13 @@ interactions: code: 200 message: OK - request: - body: '{"operations": [{"contents": {"id": "test_commit_no_expected_state", "metadataLocationHistory": - ["asd222"], "lastCheckpoint": "x", "checkpointLocationHistory": ["def"], "type": - "DELTA_LAKE_TABLE"}, "expectedContents": null, "key": {"elements": ["commit", - "expected", "contents"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "commit 2", "hash": null, - "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["commit", + "expected", "contents"]}, "contents": {"metadataLocationHistory": ["asd222"], + "id": "test_commit_no_expected_state", "checkpointLocationHistory": ["def"], + "lastCheckpoint": "x", "type": "DELTA_LAKE_TABLE"}, "type": "PUT"}], "commitMeta": + {"commitTime": null, "committer": null, "author": "nessie test", "properties": + null, "signedOffBy": null, "message": "commit 2", "authorTime": null, "hash": + null}}' headers: Accept: - '*/*' @@ -236,10 +238,10 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=94dcaac8ffc3f16b9f30b932abec068bee2926d57d1015eefb416bd081e5b629 + uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=902d633d055966bc00eb36b536b01170cbb378d363c08bc6eb08d42e48e3fb08 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"c6ea469d4a3a09689cca2e4101f748ea9de1a7a5c54131576d8b1133d8bb854b\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"55c561467dc61e13c38c9bdb7e0a9cfeb43fd45ad91b59b643409b06e964ad60\"\n}" headers: Content-Length: - '120' @@ -263,7 +265,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"c6ea469d4a3a09689cca2e4101f748ea9de1a7a5c54131576d8b1133d8bb854b\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"55c561467dc61e13c38c9bdb7e0a9cfeb43fd45ad91b59b643409b06e964ad60\"\n}" headers: Content-Length: - '120' @@ -286,7 +288,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=c6ea469d4a3a09689cca2e4101f748ea9de1a7a5c54131576d8b1133d8bb854b + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=55c561467dc61e13c38c9bdb7e0a9cfeb43fd45ad91b59b643409b06e964ad60 response: body: string: '' @@ -295,8 +297,8 @@ interactions: code: 204 message: No Content - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -349,8 +351,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_commit_with_expected_state.yaml b/python/tests/cassettes/test_nessie_cli/test_commit_with_expected_state.yaml index af563cc3ff8..a1b9e5ed548 100644 --- a/python/tests/cassettes/test_nessie_cli/test_commit_with_expected_state.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_commit_with_expected_state.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -130,11 +130,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_expected_contents", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - null, "key": {"elements": ["commit", "expected", "contents"]}, "type": "PUT"}], - "commitMeta": {"authorTime": null, "properties": null, "committer": null, "message": - "commit 1", "hash": null, "author": "nessie test", "signedOffBy": null, "commitTime": + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["commit", + "expected", "contents"]}, "contents": {"idGenerators": "xyz", "id": "test_expected_contents", + "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": + {"commitTime": null, "committer": null, "author": "nessie test", "properties": + null, "signedOffBy": null, "message": "commit 1", "authorTime": null, "hash": null}}' headers: Accept: @@ -144,7 +144,7 @@ interactions: Connection: - keep-alive Content-Length: - - '413' + - '418' Content-Type: - application/json User-Agent: @@ -153,7 +153,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"b2aafcc0ae1d5a6c189d4a0dc5def5773ee9025fc4fe91141b63b3cc0cd8919a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"185f6fbc781d6ae29e9b15e8e9acfab2c56888562cf7ffac87d8a9a485efae8d\"\n}" headers: Content-Length: - '120' @@ -179,7 +179,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"b2aafcc0ae1d5a6c189d4a0dc5def5773ee9025fc4fe91141b63b3cc0cd8919a\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"185f6fbc781d6ae29e9b15e8e9acfab2c56888562cf7ffac87d8a9a485efae8d\"\n} ]" headers: Content-Length: @@ -205,23 +205,23 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_expected_contents\",\n - \ \"metadataLocation\" : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + \ \"metadataLocation\" : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '119' + - '124' Content-Type: - application/json status: code: 200 message: OK - request: - body: '{"operations": [{"contents": {"id": "test_expected_contents", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - {"id": "test_expected_contents", "snapshotId": 42, "metadataLocation": "/a/b/c", - "type": "ICEBERG_TABLE"}, "key": {"elements": ["commit", "expected", "contents"]}, - "type": "PUT"}], "commitMeta": {"authorTime": null, "properties": null, "committer": - null, "message": "commit 2", "hash": null, "author": "nessie test", "signedOffBy": - null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": {"idGenerators": "xyz", "id": "test_expected_contents", + "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "key": {"elements": + ["commit", "expected", "contents"]}, "contents": {"idGenerators": "xyz", "id": + "test_expected_contents", "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, + "type": "PUT"}], "commitMeta": {"commitTime": null, "committer": null, "author": + "nessie test", "properties": null, "signedOffBy": null, "message": "commit 2", + "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -230,16 +230,16 @@ interactions: Connection: - keep-alive Content-Length: - - '514' + - '524' Content-Type: - application/json User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=b2aafcc0ae1d5a6c189d4a0dc5def5773ee9025fc4fe91141b63b3cc0cd8919a + uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=185f6fbc781d6ae29e9b15e8e9acfab2c56888562cf7ffac87d8a9a485efae8d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"03f7b02fb8d1ba2913087d3aae965c7cb0da3b52cffa154ec674e36b86b7139c\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"e8703b6e1d465df68d7215d6cbbd1a674f6159172fa58712917ced81f8c6480f\"\n}" headers: Content-Length: - '120' @@ -263,7 +263,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"03f7b02fb8d1ba2913087d3aae965c7cb0da3b52cffa154ec674e36b86b7139c\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"e8703b6e1d465df68d7215d6cbbd1a674f6159172fa58712917ced81f8c6480f\"\n}" headers: Content-Length: - '120' @@ -286,7 +286,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=03f7b02fb8d1ba2913087d3aae965c7cb0da3b52cffa154ec674e36b86b7139c + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=e8703b6e1d465df68d7215d6cbbd1a674f6159172fa58712917ced81f8c6480f response: body: string: '' @@ -295,8 +295,8 @@ interactions: code: 204 message: No Content - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -349,8 +349,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml b/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml index b4a184c996c..7e633c53a11 100644 --- a/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "contents_listing_dev", "type": "BRANCH"}' + body: '{"name": "contents_listing_dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -132,12 +132,12 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_contents_listing", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - null, "key": {"elements": ["this", "is", "iceberg", "foo"]}, "type": "PUT"}], - "commitMeta": {"authorTime": null, "properties": null, "committer": null, "message": - "test message", "hash": null, "author": "nessie test", "signedOffBy": null, - "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["this", + "is", "iceberg", "foo"]}, "contents": {"idGenerators": "xyz", "id": "test_contents_listing", + "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": + {"commitTime": null, "committer": null, "author": "nessie test", "properties": + null, "signedOffBy": null, "message": "test message", "authorTime": null, "hash": + null}}' headers: Accept: - '*/*' @@ -146,7 +146,7 @@ interactions: Connection: - keep-alive Content-Length: - - '414' + - '419' Content-Type: - application/json User-Agent: @@ -156,7 +156,7 @@ interactions: response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"07ef3e167d74d6a19b8dd9eef4ec9066bee279eecc50569ede7342ed1e9383ef\"\n}" + \ \"hash\" : \"4fb8aacec2cb5c6b6bed5ddc5ee2cc97d05c10f697fd6c7fd082f7b318635ab1\"\n}" headers: Content-Length: - '137' @@ -183,7 +183,7 @@ interactions: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n \ \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n \"hash\" - : \"07ef3e167d74d6a19b8dd9eef4ec9066bee279eecc50569ede7342ed1e9383ef\"\n} + : \"4fb8aacec2cb5c6b6bed5ddc5ee2cc97d05c10f697fd6c7fd082f7b318635ab1\"\n} ]" headers: Content-Length: @@ -220,12 +220,12 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "uuid2", "metadataLocationHistory": - ["asd"], "lastCheckpoint": "x", "checkpointLocationHistory": ["def"], "type": - "DELTA_LAKE_TABLE"}, "expectedContents": null, "key": {"elements": ["this", - "is", "delta", "bar"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "test message", "hash": null, - "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["this", + "is", "delta", "bar"]}, "contents": {"metadataLocationHistory": ["asd"], "id": + "uuid2", "checkpointLocationHistory": ["def"], "lastCheckpoint": "x", "type": + "DELTA_LAKE_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": null, "committer": + null, "author": "nessie test", "properties": null, "signedOffBy": null, "message": + "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -240,11 +240,11 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=07ef3e167d74d6a19b8dd9eef4ec9066bee279eecc50569ede7342ed1e9383ef + uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=4fb8aacec2cb5c6b6bed5ddc5ee2cc97d05c10f697fd6c7fd082f7b318635ab1 response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"2b996ea5cd1da4145bfa5908ce0fdc08b7e9b2c3010af2dd715d5dc719988489\"\n}" + \ \"hash\" : \"e4730fe85f06f85abe8a18d259dca5fd15f6010fa0244a36db265095b2f509e7\"\n}" headers: Content-Length: - '137' @@ -271,7 +271,7 @@ interactions: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n \ \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n \"hash\" - : \"2b996ea5cd1da4145bfa5908ce0fdc08b7e9b2c3010af2dd715d5dc719988489\"\n} + : \"e4730fe85f06f85abe8a18d259dca5fd15f6010fa0244a36db265095b2f509e7\"\n} ]" headers: Content-Length: @@ -308,11 +308,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "uuid3", "sqlText": "SELECT * FROM - foo", "dialect": "SPARK", "type": "VIEW"}, "expectedContents": null, "key": - {"elements": ["this", "is", "sql", "baz"]}, "type": "PUT"}], "commitMeta": {"authorTime": - null, "properties": null, "committer": null, "message": "test message", "hash": - null, "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["this", + "is", "sql", "baz"]}, "contents": {"sqlText": "SELECT * FROM foo", "id": "uuid3", + "dialect": "SPARK", "type": "VIEW"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie test", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -327,11 +327,11 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=2b996ea5cd1da4145bfa5908ce0fdc08b7e9b2c3010af2dd715d5dc719988489 + uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=e4730fe85f06f85abe8a18d259dca5fd15f6010fa0244a36db265095b2f509e7 response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"0ab87b72e7c37ae6dadf2c7a0f2aa1cc2546c0da1cf433982b24961306700e84\"\n}" + \ \"hash\" : \"7d0eb6974235804d012de3d6b3fe0905172d2a0b8c381d083466e7781d92df41\"\n}" headers: Content-Length: - '137' @@ -356,10 +356,10 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_contents_listing\",\n - \ \"metadataLocation\" : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + \ \"metadataLocation\" : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '118' + - '123' Content-Type: - application/json status: @@ -406,9 +406,9 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.contentType+in+%5B%27ICEBERG_TABLE%27%5D response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" : - [ \"this\", \"is\", \"iceberg\", \"foo\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"ICEBERG_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"iceberg\", \"foo\" + ]\n }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '171' @@ -432,9 +432,9 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.contentType+in+%5B%27DELTA_LAKE_TABLE%27%5D response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"DELTA_LAKE_TABLE\",\n \"name\" : {\n \"elements\" - : [ \"this\", \"is\", \"delta\", \"bar\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"DELTA_LAKE_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"delta\", \"bar\" + ]\n }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '172' @@ -458,9 +458,9 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.contentType+%3D%3D+%27ICEBERG_TABLE%27 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" : - [ \"this\", \"is\", \"iceberg\", \"foo\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"ICEBERG_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"iceberg\", \"foo\" + ]\n }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '171' @@ -484,11 +484,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.contentType+in+%5B%27ICEBERG_TABLE%27%2C+%27DELTA_LAKE_TABLE%27%5D response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"DELTA_LAKE_TABLE\",\n \"name\" : {\n \"elements\" - : [ \"this\", \"is\", \"delta\", \"bar\" ]\n }\n }, {\n \"type\" : - \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" : [ \"this\", \"is\", - \"iceberg\", \"foo\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"DELTA_LAKE_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"delta\", \"bar\" + ]\n }\n }, {\n \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" + : [ \"this\", \"is\", \"iceberg\", \"foo\" ]\n }\n } ],\n \"hasMore\" + : false\n}" headers: Content-Length: - '284' @@ -512,9 +512,9 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.namespace.startsWith%28%27this.is.del%27%29 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"DELTA_LAKE_TABLE\",\n \"name\" : {\n \"elements\" - : [ \"this\", \"is\", \"delta\", \"bar\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"DELTA_LAKE_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"delta\", \"bar\" + ]\n }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '172' @@ -538,12 +538,13 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/contents_listing_dev/entries?query_expression=entry.namespace.startsWith%28%27this.is%27%29 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"VIEW\",\n \"name\" : {\n \"elements\" : [ \"this\", - \"is\", \"sql\", \"baz\" ]\n }\n }, {\n \"type\" : \"DELTA_LAKE_TABLE\",\n - \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"delta\", \"bar\" - ]\n }\n }, {\n \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" - : [ \"this\", \"is\", \"iceberg\", \"foo\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"VIEW\",\n + \ \"name\" : {\n \"elements\" : [ \"this\", \"is\", \"sql\", \"baz\" + ]\n }\n }, {\n \"type\" : \"DELTA_LAKE_TABLE\",\n \"name\" : {\n + \ \"elements\" : [ \"this\", \"is\", \"delta\", \"bar\" ]\n }\n }, + {\n \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" + : [ \"this\", \"is\", \"iceberg\", \"foo\" ]\n }\n } ],\n \"hasMore\" + : false\n}" headers: Content-Length: - '383' @@ -568,7 +569,7 @@ interactions: response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"0ab87b72e7c37ae6dadf2c7a0f2aa1cc2546c0da1cf433982b24961306700e84\"\n}" + \ \"hash\" : \"7d0eb6974235804d012de3d6b3fe0905172d2a0b8c381d083466e7781d92df41\"\n}" headers: Content-Length: - '137' @@ -591,7 +592,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev?expectedHash=0ab87b72e7c37ae6dadf2c7a0f2aa1cc2546c0da1cf433982b24961306700e84 + uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev?expectedHash=7d0eb6974235804d012de3d6b3fe0905172d2a0b8c381d083466e7781d92df41 response: body: string: '' diff --git a/python/tests/cassettes/test_nessie_cli/test_log.yaml b/python/tests/cassettes/test_nessie_cli/test_log.yaml index 1b8b07c4dd7..339dd536f4d 100644 --- a/python/tests/cassettes/test_nessie_cli/test_log.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_log.yaml @@ -38,8 +38,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" + string: "{\n \"token\" : null,\n \"operations\" : [ ],\n \"hasMore\" : false\n}" headers: Content-Length: - '63' @@ -100,11 +99,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_log", "snapshotId": 42, "metadataLocation": - "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": null, "key": {"elements": - ["log", "foo", "bar"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "test message", "hash": null, - "author": "nessie_user1", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["log", + "foo", "bar"]}, "contents": {"idGenerators": "xyz", "id": "test_log", "metadataLocation": + "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie_user1", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -113,7 +112,7 @@ interactions: Connection: - keep-alive Content-Length: - - '391' + - '396' Content-Type: - application/json User-Agent: @@ -122,7 +121,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\"\n}" headers: Content-Length: - '121' @@ -146,7 +145,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\"\n}" headers: Content-Length: - '121' @@ -171,10 +170,10 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_log\",\n \"metadataLocation\" - : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '105' + - '110' Content-Type: - application/json status: @@ -195,7 +194,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\"\n}" headers: Content-Length: - '121' @@ -219,12 +218,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '384' @@ -248,7 +246,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\"\n}" headers: Content-Length: - '121' @@ -269,15 +267,14 @@ interactions: User-Agent: - python-requests/2.26.0 method: GET - uri: http://localhost:19120/api/v1/trees/tree/main/log?endHash=4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488 + uri: http://localhost:19120/api/v1/trees/tree/main/log?endHash=e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '384' @@ -301,7 +298,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\"\n}" headers: Content-Length: - '121' @@ -325,9 +322,9 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/entries response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"entries\" : [ {\n - \ \"type\" : \"ICEBERG_TABLE\",\n \"name\" : {\n \"elements\" : - [ \"log\", \"foo\", \"bar\" ]\n }\n } ]\n}" + string: "{\n \"token\" : null,\n \"entries\" : [ {\n \"type\" : \"ICEBERG_TABLE\",\n + \ \"name\" : {\n \"elements\" : [ \"log\", \"foo\", \"bar\" ]\n }\n + \ } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '160' @@ -352,10 +349,10 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_log\",\n \"metadataLocation\" - : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '105' + - '110' Content-Type: - application/json status: @@ -363,9 +360,9 @@ interactions: message: OK - request: body: '{"operations": [{"key": {"elements": ["log", "foo", "bar"]}, "type": "DELETE"}], - "commitMeta": {"authorTime": null, "properties": null, "committer": null, "message": - "delete_message", "hash": null, "author": "nessie_user2", "signedOffBy": null, - "commitTime": null}}' + "commitMeta": {"commitTime": null, "committer": null, "author": "nessie_user2", + "properties": null, "signedOffBy": null, "message": "delete_message", "authorTime": + null, "hash": null}}' headers: Accept: - '*/*' @@ -380,10 +377,10 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488 + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -407,7 +404,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -431,12 +428,12 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?max=1 response: body: - string: "{\n \"hasMore\" : true,\n \"token\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n - \ \"operations\" : [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n + \ \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : true\n}" headers: Content-Length: - '447' @@ -460,7 +457,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -484,16 +481,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '708' @@ -517,7 +513,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -538,15 +534,14 @@ interactions: User-Agent: - python-requests/2.26.0 method: GET - uri: http://localhost:19120/api/v1/trees/tree/main/log?startHash=73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7&endHash=4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488 + uri: http://localhost:19120/api/v1/trees/tree/main/log?startHash=9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70&endHash=e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '384' @@ -570,7 +565,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -594,16 +589,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '708' @@ -627,7 +621,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -651,12 +645,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=commit.author%3D%3D%27nessie_user1%27 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '384' @@ -680,7 +673,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -704,12 +697,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=commit.author%3D%3D%27nessie_user2%27 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '386' @@ -733,7 +725,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -757,16 +749,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=%28commit.author%3D%3D%27nessie_user2%27+%7C%7C+commit.author%3D%3D%27nessie_user1%27%29 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '708' @@ -790,7 +781,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -814,16 +805,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=commit.committer%3D%3D%27%27 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '708' @@ -847,7 +837,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -871,12 +861,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=commit.author+%3D%3D+%27nessie_user2%27+%7C%7C+commit.author+%3D%3D+%27non_existing%27 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '386' @@ -900,7 +889,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -924,16 +913,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log?query_expression=%28timestamp%28commit.commitTime%29+%3E+timestamp%28%272001-01-01T00%3A00%3A00%2B00%3A00%27%29+%26%26+timestamp%28commit.commitTime%29+%3C+timestamp%28%272999-12-30T23%3A00%3A00%2B00%3A00%27%29%29 response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-15T15:46:09.291590Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.291590Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"4aecc077002ac529605447c7c150ffc5be5aa7d655f70f5504def0edb47ee488\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-10-19T13:48:33.783900Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.783900Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"e3dcdefc29ca929e290ebd6438a87ce1d6dbc45a9005bd60321e470915e18c6a\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:09.178152Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:09.178152Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:33.551351Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:33.551351Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '708' @@ -943,8 +931,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -987,7 +975,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70\"\n}" headers: Content-Length: - '121' @@ -997,8 +985,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -1013,7 +1001,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=73f1c93dc045ae165582983bcabc1e6bde9eb646316b7547b61fc36229e14dd7 + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=9f17b9fb59a0738c0d979d481e6b0b2e764d6ad969f623f58c7708cd4efdef70 response: body: string: '' diff --git a/python/tests/cassettes/test_nessie_cli/test_merge.yaml b/python/tests/cassettes/test_nessie_cli/test_merge.yaml index 839ddd84f5e..588e30a7efb 100644 --- a/python/tests/cassettes/test_nessie_cli/test_merge.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_merge.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -130,11 +130,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_merge", "snapshotId": 42, "metadataLocation": - "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": null, "key": {"elements": - ["merge", "foo", "bar"]}, "type": "PUT"}], "commitMeta": {"authorTime": null, - "properties": null, "committer": null, "message": "test message", "hash": null, - "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["merge", + "foo", "bar"]}, "contents": {"idGenerators": "xyz", "id": "test_merge", "metadataLocation": + "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie test", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -143,7 +143,7 @@ interactions: Connection: - keep-alive Content-Length: - - '394' + - '399' Content-Type: - application/json User-Agent: @@ -152,7 +152,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n}" headers: Content-Length: - '120' @@ -178,7 +178,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n} ]" headers: Content-Length: @@ -227,7 +227,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n}" headers: Content-Length: - '120' @@ -237,7 +237,8 @@ interactions: code: 200 message: OK - request: - body: '{"fromRefName": "dev", "fromHash": "2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1"}' + body: '{"fromHash": "fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41", + "fromRefName": "dev"}' headers: Accept: - '*/*' @@ -276,8 +277,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n} + \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n} ]" headers: Content-Length: @@ -302,7 +303,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n}" headers: Content-Length: - '120' @@ -325,7 +326,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1 + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41 response: body: string: '' @@ -348,7 +349,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\"\n}" headers: Content-Length: - '121' @@ -372,12 +373,11 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.607527Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.607527Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.623035Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.623035Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '383' @@ -402,10 +402,10 @@ interactions: response: body: string: "{\n \"type\" : \"ICEBERG_TABLE\",\n \"id\" : \"test_merge\",\n \"metadataLocation\" - : \"/a/b/c\",\n \"snapshotId\" : 42\n}" + : \"/a/b/c\",\n \"idGenerators\" : \"xyz\"\n}" headers: Content-Length: - - '107' + - '112' Content-Type: - application/json status: @@ -413,9 +413,9 @@ interactions: message: OK - request: body: '{"operations": [{"key": {"elements": ["merge", "foo", "bar"]}, "type": - "DELETE"}], "commitMeta": {"authorTime": null, "properties": null, "committer": - null, "message": "delete_message", "hash": null, "author": null, "signedOffBy": - null, "commitTime": null}}' + "DELETE"}], "commitMeta": {"commitTime": null, "committer": null, "author": + null, "properties": null, "signedOffBy": null, "message": "delete_message", + "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -430,10 +430,10 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=2f5224a9b30a9f46c5913203c6c08117c8d0f0a617b1b8246bc719057d3b3ed1 + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=fbd0f7adf0bc7927a2640ad8a3d31d106ee25189c8d6c430e48213c678b19a41 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"f2b685ac5a084eec1af9734ca901ce97ad5ef78dbfe81abfe352ff16d731bccb\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"3a73464201cf1ef2103f87f4f240c90a13770dc750a91c4598face062691433d\"\n}" headers: Content-Length: - '121' @@ -457,7 +457,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"f2b685ac5a084eec1af9734ca901ce97ad5ef78dbfe81abfe352ff16d731bccb\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"3a73464201cf1ef2103f87f4f240c90a13770dc750a91c4598face062691433d\"\n}" headers: Content-Length: - '121' @@ -480,7 +480,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=f2b685ac5a084eec1af9734ca901ce97ad5ef78dbfe81abfe352ff16d731bccb + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=3a73464201cf1ef2103f87f4f240c90a13770dc750a91c4598face062691433d response: body: string: '' @@ -489,8 +489,8 @@ interactions: code: 204 message: No Content - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_tag.yaml b/python/tests/cassettes/test_nessie_cli/test_tag.yaml index 5d10c229201..67dcf028065 100644 --- a/python/tests/cassettes/test_nessie_cli/test_tag.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_tag.yaml @@ -49,8 +49,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev-tag", "type": "TAG"}' + body: '{"name": "dev-tag", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "TAG"}' headers: Accept: - '*/*' @@ -129,8 +129,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "etl-tag", "type": "TAG"}' + body: '{"name": "etl-tag", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "TAG"}' headers: Accept: - '*/*' @@ -351,8 +351,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "v1.0", "type": "TAG"}' + body: '{"name": "v1.0", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "TAG"}' headers: Accept: - '*/*' diff --git a/python/tests/cassettes/test_nessie_cli/test_transplant.yaml b/python/tests/cassettes/test_nessie_cli/test_transplant.yaml index 1140d3cb343..5263de1513a 100644 --- a/python/tests/cassettes/test_nessie_cli/test_transplant.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_transplant.yaml @@ -48,8 +48,8 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "dev", "type": "BRANCH"}' + body: '{"name": "dev", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' @@ -130,11 +130,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_transplant_1", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - null, "key": {"elements": ["transplant", "foo", "bar"]}, "type": "PUT"}], "commitMeta": - {"authorTime": null, "properties": null, "committer": null, "message": "test - message", "hash": null, "author": "nessie test", "signedOffBy": null, "commitTime": + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["transplant", + "foo", "bar"]}, "contents": {"idGenerators": "xyz", "id": "test_transplant_1", + "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": + {"commitTime": null, "committer": null, "author": "nessie test", "properties": + null, "signedOffBy": null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: @@ -144,7 +144,7 @@ interactions: Connection: - keep-alive Content-Length: - - '406' + - '411' Content-Type: - application/json User-Agent: @@ -153,7 +153,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"9070cfe17aec5a4f53df90737ebd21b3ba0fed66a1e013a754b08564e26f4458\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"ed2809449db440abb8f16ed93ea9701b6eef64154185c79e014fcb65795afe35\"\n}" headers: Content-Length: - '120' @@ -179,7 +179,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"9070cfe17aec5a4f53df90737ebd21b3ba0fed66a1e013a754b08564e26f4458\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"ed2809449db440abb8f16ed93ea9701b6eef64154185c79e014fcb65795afe35\"\n} ]" headers: Content-Length: @@ -216,11 +216,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_transplant_2", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - null, "key": {"elements": ["bar", "bar"]}, "type": "PUT"}], "commitMeta": {"authorTime": - null, "properties": null, "committer": null, "message": "test message", "hash": - null, "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["bar", + "bar"]}, "contents": {"idGenerators": "xyz", "id": "test_transplant_2", "metadataLocation": + "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie test", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -229,16 +229,16 @@ interactions: Connection: - keep-alive Content-Length: - - '392' + - '397' Content-Type: - application/json User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=9070cfe17aec5a4f53df90737ebd21b3ba0fed66a1e013a754b08564e26f4458 + uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=ed2809449db440abb8f16ed93ea9701b6eef64154185c79e014fcb65795afe35 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"432823def9af070795615a6d906b485572421c1561aac7549614bf1857d6370e\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"ab1c66c58c6a7dfd81df25014f49401546257ef497cbee9119f2f48218ae1249\"\n}" headers: Content-Length: - '120' @@ -264,7 +264,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"432823def9af070795615a6d906b485572421c1561aac7549614bf1857d6370e\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"ab1c66c58c6a7dfd81df25014f49401546257ef497cbee9119f2f48218ae1249\"\n} ]" headers: Content-Length: @@ -301,11 +301,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"operations": [{"contents": {"id": "test_transplant_3", "snapshotId": - 42, "metadataLocation": "/a/b/c", "type": "ICEBERG_TABLE"}, "expectedContents": - null, "key": {"elements": ["foo", "baz"]}, "type": "PUT"}], "commitMeta": {"authorTime": - null, "properties": null, "committer": null, "message": "test message", "hash": - null, "author": "nessie test", "signedOffBy": null, "commitTime": null}}' + body: '{"operations": [{"expectedContents": null, "key": {"elements": ["foo", + "baz"]}, "contents": {"idGenerators": "xyz", "id": "test_transplant_3", "metadataLocation": + "/a/b/c", "type": "ICEBERG_TABLE"}, "type": "PUT"}], "commitMeta": {"commitTime": + null, "committer": null, "author": "nessie test", "properties": null, "signedOffBy": + null, "message": "test message", "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -314,16 +314,16 @@ interactions: Connection: - keep-alive Content-Length: - - '392' + - '397' Content-Type: - application/json User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=432823def9af070795615a6d906b485572421c1561aac7549614bf1857d6370e + uri: http://localhost:19120/api/v1/trees/branch/dev/commit?expectedHash=ab1c66c58c6a7dfd81df25014f49401546257ef497cbee9119f2f48218ae1249 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd\"\n}" headers: Content-Length: - '120' @@ -349,7 +349,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd\"\n} ]" headers: Content-Length: @@ -374,20 +374,19 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.890549Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.890549Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"432823def9af070795615a6d906b485572421c1561aac7549614bf1857d6370e\",\n + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.959664Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.959664Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"ab1c66c58c6a7dfd81df25014f49401546257ef497cbee9119f2f48218ae1249\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.851865Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.851865Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"9070cfe17aec5a4f53df90737ebd21b3ba0fed66a1e013a754b08564e26f4458\",\n + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.915210Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.915210Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"ed2809449db440abb8f16ed93ea9701b6eef64154185c79e014fcb65795afe35\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.814581Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.814581Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.870734Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.870734Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '1025' @@ -421,8 +420,8 @@ interactions: code: 200 message: OK - request: - body: '{"hashesToTransplant": ["432823def9af070795615a6d906b485572421c1561aac7549614bf1857d6370e", - "45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a"], "fromRefName": + body: '{"hashesToTransplant": ["ab1c66c58c6a7dfd81df25014f49401546257ef497cbee9119f2f48218ae1249", + "c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd"], "fromRefName": "dev"}' headers: Accept: @@ -461,7 +460,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4ba13772c2fc80c830c00896f490eeb768f508241dd724d661289715b600e087\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"cd21ff6755a6061b66dddce329a36457ae3ffc63b472e0f30da68fb0a0eaf6e2\"\n}" headers: Content-Length: - '121' @@ -485,16 +484,15 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4ba13772c2fc80c830c00896f490eeb768f508241dd724d661289715b600e087\",\n + string: "{\n \"token\" : null,\n \"operations\" : [ {\n \"hash\" : \"cd21ff6755a6061b66dddce329a36457ae3ffc63b472e0f30da68fb0a0eaf6e2\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.890549Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.890549Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"2dd251a02e337545fb81c661f511c1294c79546cbe706c763dfaf1e02b6af65f\",\n + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.959664Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.959664Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"9c5b1119011e2a6caf7b9e849520e89e81f86555f71abfcb9a64b1c7a7592a35\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie test\",\n \"signedOffBy\" - : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-15T15:46:10.851865Z\",\n - \ \"authorTime\" : \"2021-10-15T15:46:10.851865Z\",\n \"properties\" - : { }\n } ]\n}" + : null,\n \"message\" : \"test message\",\n \"commitTime\" : \"2021-10-19T13:48:35.915210Z\",\n + \ \"authorTime\" : \"2021-10-19T13:48:35.915210Z\",\n \"properties\" + : { }\n } ],\n \"hasMore\" : false\n}" headers: Content-Length: - '704' @@ -531,9 +529,9 @@ interactions: message: Not Found - request: body: '{"operations": [{"key": {"elements": ["transplant", "foo", "bar"]}, "type": - "DELETE"}], "commitMeta": {"authorTime": null, "properties": null, "committer": - null, "message": "delete_message", "hash": null, "author": null, "signedOffBy": - null, "commitTime": null}}' + "DELETE"}], "commitMeta": {"commitTime": null, "committer": null, "author": + null, "properties": null, "signedOffBy": null, "message": "delete_message", + "authorTime": null, "hash": null}}' headers: Accept: - '*/*' @@ -548,10 +546,10 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=4ba13772c2fc80c830c00896f490eeb768f508241dd724d661289715b600e087 + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=cd21ff6755a6061b66dddce329a36457ae3ffc63b472e0f30da68fb0a0eaf6e2 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"23ce2f71cfc449b58b2f3c0dcff06b21edfeadc8199a48dce0d93268359984f7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"cd3bdbfe778e91a555a1eadb39794a464cf1403e205dcdb39577f4c8d845e852\"\n}" headers: Content-Length: - '121' @@ -575,7 +573,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd\"\n}" headers: Content-Length: - '120' @@ -598,7 +596,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=45ed25ab6a3f5eee253241cee1be219b53ac161e4e6a8869c00c7e4c9149206a + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=c76b98683558733257dc969a00d0a5b7588d794daaef1d6cbf37dcd7fa3ccddd response: body: string: '' @@ -621,7 +619,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"23ce2f71cfc449b58b2f3c0dcff06b21edfeadc8199a48dce0d93268359984f7\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"cd3bdbfe778e91a555a1eadb39794a464cf1403e205dcdb39577f4c8d845e852\"\n}" headers: Content-Length: - '121' @@ -644,7 +642,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=23ce2f71cfc449b58b2f3c0dcff06b21edfeadc8199a48dce0d93268359984f7 + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=cd3bdbfe778e91a555a1eadb39794a464cf1403e205dcdb39577f4c8d845e852 response: body: string: '' @@ -653,8 +651,8 @@ interactions: code: 204 message: No Content - request: - body: '{"hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", - "name": "main", "type": "BRANCH"}' + body: '{"name": "main", "hash": "2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d", + "type": "BRANCH"}' headers: Accept: - '*/*' diff --git a/python/tests/test_nessie_cli.py b/python/tests/test_nessie_cli.py index 13f995325f4..120ce9200b0 100644 --- a/python/tests/test_nessie_cli.py +++ b/python/tests/test_nessie_cli.py @@ -93,7 +93,7 @@ def test_remote() -> None: def _new_table(table_id: str) -> IcebergTable: - return IcebergTable(table_id, "/a/b/c", 42) + return IcebergTable(table_id, "/a/b/c", "xyz") def _make_commit( @@ -370,7 +370,7 @@ def test_contents_listing() -> None: branch = "contents_listing_dev" _run(runner, ["branch", branch]) - iceberg_table = IcebergTable(id="test_contents_listing", metadata_location="/a/b/c", snapshot_id=42) + iceberg_table = IcebergTable(id="test_contents_listing", metadata_location="/a/b/c", id_generators="xyz") delta_lake_table = DeltaLakeTable( id="uuid2", metadata_location_history=["asd"], checkpoint_location_history=["def"], last_checkpoint="x" ) diff --git a/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractResteasyTest.java b/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractResteasyTest.java index 4176e5f96ae..b893579efeb 100644 --- a/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractResteasyTest.java +++ b/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractResteasyTest.java @@ -33,7 +33,6 @@ import org.projectnessie.model.ContentsKey; import org.projectnessie.model.IcebergTable; import org.projectnessie.model.ImmutableBranch; -import org.projectnessie.model.ImmutableIcebergTable; import org.projectnessie.model.ImmutableOperations; import org.projectnessie.model.ImmutablePut; import org.projectnessie.model.LogResponse; @@ -77,7 +76,7 @@ public void testBasic() { newReference, rest().get("trees/tree/test").then().statusCode(200).extract().as(Branch.class)); - IcebergTable table = IcebergTable.of("/the/directory/over/there", -1L); + IcebergTable table = IcebergTable.of("/the/directory/over/there", "x"); Branch commitResponse = rest() @@ -103,21 +102,13 @@ public void testBasic() { updates[i] = ImmutablePut.builder() .key(ContentsKey.of("item", Integer.toString(i))) - .contents( - ImmutableIcebergTable.builder() - .metadataLocation("/the/directory/over/there/" + i) - .snapshotId(-1L) - .build()) + .contents(IcebergTable.of("/the/directory/over/there/" + i, "x")) .build(); } updates[10] = ImmutablePut.builder() .key(ContentsKey.of("xxx", "test")) - .contents( - ImmutableIcebergTable.builder() - .metadataLocation("/the/directory/over/there/has/been/moved") - .snapshotId(-1L) - .build()) + .contents(IcebergTable.of("/the/directory/over/there/has/been/moved", "x")) .build(); Reference branch = rest().get("trees/tree/test").as(Reference.class); @@ -143,12 +134,7 @@ public void testBasic() { Assertions.assertEquals(updates[10].getContents(), res.body().as(Contents.class)); IcebergTable currentTable = table; - table = - ImmutableIcebergTable.builder() - .from(table) - .metadataLocation("/the/directory/over/there/has/been/moved/again") - .snapshotId(-1L) - .build(); + table = IcebergTable.of("/the/directory/over/there/has/been/moved/again", "x", table.getId()); Branch b2 = rest().get("trees/tree/test").as(Branch.class); rest() @@ -251,10 +237,10 @@ private Branch commit( (expectedMetadataUrl != null) ? Put.of( ContentsKey.of(contentsKey), - IcebergTable.of(metadataUrl, -1L, contentsId), - IcebergTable.of(expectedMetadataUrl, -1L, contentsId)) + IcebergTable.of(metadataUrl, "x", contentsId), + IcebergTable.of(expectedMetadataUrl, "x", contentsId)) : Put.of( - ContentsKey.of(contentsKey), IcebergTable.of(metadataUrl, -1L, contentsId))) + ContentsKey.of(contentsKey), IcebergTable.of(metadataUrl, "x", contentsId))) .commitMeta(CommitMeta.builder().author(author).message("").build()) .build(); return rest() diff --git a/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractTestRest.java b/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractTestRest.java index 6a021c11af8..6e377c3fd73 100644 --- a/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractTestRest.java +++ b/servers/jax-rs-tests/src/main/java/org/projectnessie/jaxrs/AbstractTestRest.java @@ -230,7 +230,7 @@ public void referenceNames(String refNamePart) Reference main = api.createReference().sourceRefName("main").reference(Branch.of(root, null)).create(); - IcebergTable meta = IcebergTable.of("meep", -1L); + IcebergTable meta = IcebergTable.of("meep", "x"); main = api.commitMultipleOperations() .branchName(main.getName()) @@ -307,7 +307,7 @@ public void referenceNames(String refNamePart) // Need to have at least one op, otherwise all following operations (assignTag/Branch, merge, // delete) will fail - meta = IcebergTable.of("foo", -1L); + meta = IcebergTable.of("foo", "x"); api.commitMultipleOperations() .branchName(branchName) .hash(branchHash) @@ -588,7 +588,7 @@ protected void createCommits( for (int j = 0; j < numAuthors; j++) { String author = "author-" + j; for (int i = 0; i < commitsPerAuthor; i++) { - IcebergTable meta = IcebergTable.of("some-file-" + i, -1L); + IcebergTable meta = IcebergTable.of("some-file-" + i, "x"); String nextHash = api.commitMultipleOperations() .branchName(branch.getName()) @@ -659,7 +659,7 @@ public void commitLogPaging() throws NessieNotFoundException, NessieConflictExce for (int i = 0; i < commits; i++) { String msg = "message-for-" + i; allMessages.add(msg); - IcebergTable tableMeta = IcebergTable.of("some-file-" + i, -1L); + IcebergTable tableMeta = IcebergTable.of("some-file-" + i, "x"); String nextHash = api.commitMultipleOperations() .branchName(branchName) @@ -732,8 +732,8 @@ public void multiget() throws NessieNotFoundException, NessieConflictException { api.createReference().sourceRefName("main").reference(Branch.of(branch, null)).create(); ContentsKey a = ContentsKey.of("a"); ContentsKey b = ContentsKey.of("b"); - IcebergTable ta = IcebergTable.of("path1", -1L); - IcebergTable tb = IcebergTable.of("path2", -1L); + IcebergTable ta = IcebergTable.of("path1", "x"); + IcebergTable tb = IcebergTable.of("path2", "x"); api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) @@ -795,7 +795,7 @@ public static Stream contentAndOperationTypes() { return Stream.of( new ContentAndOperationType( Type.ICEBERG_TABLE, - Put.of(ContentsKey.of("iceberg"), IcebergTable.of("/iceberg/table", -1L))), + Put.of(ContentsKey.of("iceberg"), IcebergTable.of("/iceberg/table", "x"))), new ContentAndOperationType( Type.VIEW, Put.of( @@ -915,7 +915,7 @@ public void filterEntriesByType() throws NessieNotFoundException, NessieConflict api.createReference().sourceRefName("main").reference(Branch.of(branch, null)).create(); ContentsKey a = ContentsKey.of("a"); ContentsKey b = ContentsKey.of("b"); - IcebergTable tam = IcebergTable.of("path1", -1L); + IcebergTable tam = IcebergTable.of("path1", "x"); SqlView tb = ImmutableSqlView.builder().sqlText("select * from table").dialect(Dialect.DREMIO).build(); api.commitMultipleOperations() @@ -979,25 +979,25 @@ public void filterEntriesByNamespace() throws NessieConflictException, NessieNot api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) - .operation(Put.of(first, IcebergTable.of("path1", -1L))) + .operation(Put.of(first, IcebergTable.of("path1", "x"))) .commitMeta(CommitMeta.fromMessage("commit 1")) .commit(); api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) - .operation(Put.of(second, IcebergTable.of("path2", -1L))) + .operation(Put.of(second, IcebergTable.of("path2", "x"))) .commitMeta(CommitMeta.fromMessage("commit 2")) .commit(); api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) - .operation(Put.of(third, IcebergTable.of("path3", -1L))) + .operation(Put.of(third, IcebergTable.of("path3", "x"))) .commitMeta(CommitMeta.fromMessage("commit 3")) .commit(); api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) - .operation(Put.of(fourth, IcebergTable.of("path4", -1L))) + .operation(Put.of(fourth, IcebergTable.of("path4", "x"))) .commitMeta(CommitMeta.fromMessage("commit 4")) .commit(); @@ -1063,7 +1063,7 @@ public void filterEntriesByNamespaceAndPrefixDepth() api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) - .operation(Put.of(keys.get(i), IcebergTable.of("path" + i, -1L))) + .operation(Put.of(keys.get(i), IcebergTable.of("path" + i, "x"))) .commitMeta(CommitMeta.fromMessage("commit " + i)) .commit(); } @@ -1151,7 +1151,7 @@ public void checkSpecialCharacterRoundTrip() api.createReference().sourceRefName("main").reference(Branch.of(branch, null)).create(); // ContentsKey k = ContentsKey.of("/%国","国.国"); ContentsKey k = ContentsKey.of("a.b", "c.txt"); - IcebergTable ta = IcebergTable.of("path1", -1L); + IcebergTable ta = IcebergTable.of("path1", "x"); api.commitMultipleOperations() .branchName(branch) .hash(r.getHash()) diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/AbstractTestBasicOperations.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/AbstractTestBasicOperations.java index e7e991f7a14..aee5d58c205 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/AbstractTestBasicOperations.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/AbstractTestBasicOperations.java @@ -75,7 +75,7 @@ void testAdmin() throws NessieNotFoundException, NessieConflictException { () -> api.commitMultipleOperations() .branch(branch) - .operation(Put.of(key, IcebergTable.of("foo", 42L, "cid-foo"))) + .operation(Put.of(key, IcebergTable.of("foo", "x", "cid-foo"))) .commitMeta(CommitMeta.fromMessage("empty message")) .commit()); @@ -110,7 +110,7 @@ void testAdmin() throws NessieNotFoundException, NessieConflictException { // have conflicts. api.commitMultipleOperations() .branch(b) - .operation(Put.of(key, IcebergTable.of("bar", 42L, "cid-bar"))) + .operation(Put.of(key, IcebergTable.of("bar", "x", "cid-bar"))) .commitMeta(CommitMeta.fromMessage("")) .commit(); }); diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestAuthorizationRules.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestAuthorizationRules.java index b4e22915061..1585b2127e7 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestAuthorizationRules.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestAuthorizationRules.java @@ -77,7 +77,7 @@ private void testAllOps(String branchName, String role, boolean shouldFail) listAllReferences(branchName, shouldFail); String cid = "cid-foo-" + UUID.randomUUID(); - addContent(branch, Put.of(key, IcebergTable.of("foo", 42L, cid)), role, shouldFail); + addContent(branch, Put.of(key, IcebergTable.of("foo", "x", cid)), role, shouldFail); if (!shouldFail) { // These requests cannot succeed, because "disallowedBranchForTestUser" could not be created @@ -114,7 +114,7 @@ void testCanCommitButNotUpdateOrDeleteEntity() .commitMultipleOperations() .branch(branch) .commitMeta(CommitMeta.fromMessage("add stuff")) - .operation(Put.of(key, IcebergTable.of("foo", 42L, "cid-foo"))) + .operation(Put.of(key, IcebergTable.of("foo", "x", "cid-foo"))) .commit()) .isInstanceOf(NessieForbiddenException.class) .hasMessageContaining( diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/error/ITNativeNessieError.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/error/ITNativeNessieError.java index ec8a46dea8d..8810212847e 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/error/ITNativeNessieError.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/error/ITNativeNessieError.java @@ -50,7 +50,7 @@ void init() { @Test void testNullParamViolation() { ContentsKey k = ContentsKey.of("a"); - IcebergTable t = IcebergTable.of("path1", -1L); + IcebergTable t = IcebergTable.of("path1", "x"); assertEquals( "Bad Request (HTTP/400): commitMultipleOperations.hash: must not be null", assertThrows( diff --git a/servers/store/src/main/java/org/projectnessie/server/store/TableCommitMetaStoreWorker.java b/servers/store/src/main/java/org/projectnessie/server/store/TableCommitMetaStoreWorker.java index 947f18a13ed..a2128cfdb58 100644 --- a/servers/store/src/main/java/org/projectnessie/server/store/TableCommitMetaStoreWorker.java +++ b/servers/store/src/main/java/org/projectnessie/server/store/TableCommitMetaStoreWorker.java @@ -33,7 +33,6 @@ import org.projectnessie.model.SqlView; import org.projectnessie.model.SqlView.Dialect; import org.projectnessie.store.ObjectTypes; -import org.projectnessie.store.ObjectTypes.IcebergTableMetadata; import org.projectnessie.versioned.Serializer; import org.projectnessie.versioned.StoreWorker; @@ -49,9 +48,10 @@ public ByteString toStoreOnReferenceState(Contents contents) { ObjectTypes.Contents.newBuilder().setId(contents.getId()); if (contents instanceof IcebergTable) { IcebergTable state = (IcebergTable) contents; - ObjectTypes.IcebergSnapshot.Builder stateBuilder = - ObjectTypes.IcebergSnapshot.newBuilder().setSnapshotId(state.getSnapshotId()); - builder.setIcebergSnapshot(stateBuilder); + ObjectTypes.IcebergMetadataPointer.Builder stateBuilder = + ObjectTypes.IcebergMetadataPointer.newBuilder() + .setMetadataLocation(state.getMetadataLocation()); + builder.setIcebergMetadataPointer(stateBuilder); } else if (contents instanceof DeltaLakeTable) { ObjectTypes.DeltaLakeTable.Builder table = @@ -85,10 +85,9 @@ public ByteString toStoreGlobalState(Contents contents) { ObjectTypes.Contents.newBuilder().setId(contents.getId()); if (contents instanceof IcebergTable) { IcebergTable state = (IcebergTable) contents; - ObjectTypes.IcebergTableMetadata.Builder stateBuilder = - ObjectTypes.IcebergTableMetadata.newBuilder() - .setMetadataLocation(state.getMetadataLocation()); - builder.setIcebergTableMetadata(stateBuilder); + ObjectTypes.IcebergGlobal.Builder stateBuilder = + ObjectTypes.IcebergGlobal.newBuilder().setIdGenerators(state.getIdGenerators()); + builder.setIcebergGlobal(stateBuilder); } else { throw new IllegalArgumentException("Unknown type " + contents); } @@ -115,13 +114,15 @@ public Contents valueFromStore(ByteString onReferenceValue, Optional } return builder.build(); - case ICEBERG_SNAPSHOT: + case ICEBERG_METADATA_POINTER: + ObjectTypes.Contents global = + globalContents.orElseThrow(TableCommitMetaStoreWorker::noIcebergGlobal); + if (!global.hasIcebergGlobal()) { + throw noIcebergGlobal(); + } return IcebergTable.of( - globalContents - .map(ObjectTypes.Contents::getIcebergTableMetadata) - .map(IcebergTableMetadata::getMetadataLocation) - .orElseThrow(IllegalStateException::new), - contents.getIcebergSnapshot().getSnapshotId(), + contents.getIcebergMetadataPointer().getMetadataLocation(), + global.getIcebergGlobal().getIdGenerators(), contents.getId()); case SQL_VIEW: @@ -138,6 +139,11 @@ public Contents valueFromStore(ByteString onReferenceValue, Optional } } + private static IllegalArgumentException noIcebergGlobal() { + return new IllegalArgumentException( + "Iceberg content from reference must have global state, but has none"); + } + @Override public String getId(Contents contents) { return contents.getId(); diff --git a/servers/store/src/main/proto/table.proto b/servers/store/src/main/proto/table.proto index e7cb6f5ace1..79e615d741f 100644 --- a/servers/store/src/main/proto/table.proto +++ b/servers/store/src/main/proto/table.proto @@ -22,20 +22,20 @@ option java_generate_equals_and_hash = true; message Contents { oneof object_type { - IcebergTableMetadata iceberg_table_metadata = 1; - IcebergSnapshot iceberg_snapshot = 2; + IcebergMetadataPointer iceberg_metadata_pointer = 1; + IcebergGlobal iceberg_global = 2; SqlView sql_view = 3; DeltaLakeTable delta_lake_table = 4; } string id = 5; } -message IcebergTableMetadata { +message IcebergMetadataPointer { string metadata_location = 1; } -message IcebergSnapshot { - int64 snapshot_id = 1; +message IcebergGlobal { + string id_generators = 1; } message SqlView { diff --git a/servers/store/src/test/java/org/projectnessie/server/store/TestStoreWorker.java b/servers/store/src/test/java/org/projectnessie/server/store/TestStoreWorker.java index d3fb3052f75..c24b9d5cb4e 100644 --- a/servers/store/src/test/java/org/projectnessie/server/store/TestStoreWorker.java +++ b/servers/store/src/test/java/org/projectnessie/server/store/TestStoreWorker.java @@ -35,8 +35,8 @@ import org.projectnessie.model.ImmutableSqlView; import org.projectnessie.model.SqlView; import org.projectnessie.store.ObjectTypes; -import org.projectnessie.store.ObjectTypes.IcebergSnapshot; -import org.projectnessie.store.ObjectTypes.IcebergTableMetadata; +import org.projectnessie.store.ObjectTypes.IcebergGlobal; +import org.projectnessie.store.ObjectTypes.IcebergMetadataPointer; class TestStoreWorker { private static final ObjectMapper MAPPER = new ObjectMapper(); @@ -69,25 +69,25 @@ void testSerde(Map.Entry entry) { @Test void testSerdeIceberg() { String path = "foo/bar"; - IcebergTable table = IcebergTable.of(path, 42L, ID); + IcebergTable table = IcebergTable.of(path, "xyz", ID); ObjectTypes.Contents protoTableGlobal = ObjectTypes.Contents.newBuilder() .setId(ID) - .setIcebergTableMetadata( - IcebergTableMetadata.newBuilder().setMetadataLocation(path).build()) + .setIcebergGlobal(IcebergGlobal.newBuilder().setIdGenerators("xyz")) .build(); - ObjectTypes.Contents protoSnapshot = + ObjectTypes.Contents protoOnRef = ObjectTypes.Contents.newBuilder() .setId(ID) - .setIcebergSnapshot(IcebergSnapshot.newBuilder().setSnapshotId(42L).build()) + .setIcebergMetadataPointer( + IcebergMetadataPointer.newBuilder().setMetadataLocation(path)) .build(); ByteString tableGlobalBytes = worker.toStoreGlobalState(table); ByteString snapshotBytes = worker.toStoreOnReferenceState(table); Assertions.assertEquals(protoTableGlobal.toByteString(), tableGlobalBytes); - Assertions.assertEquals(protoSnapshot.toByteString(), snapshotBytes); + Assertions.assertEquals(protoOnRef.toByteString(), snapshotBytes); Contents deserialized = worker.valueFromStore(snapshotBytes, Optional.of(tableGlobalBytes)); Assertions.assertEquals(table, deserialized);