diff --git a/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/NessieTransaction.java b/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/NessieTransaction.java index a6afa6aa509..9ac79eac195 100644 --- a/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/NessieTransaction.java +++ b/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/NessieTransaction.java @@ -125,7 +125,7 @@ public boolean commit() { public List getTables(String dbName, List tableNames) { List keys = tableNames.stream() - .map(t -> new RefKey(defaultHash, ContentsKey.of(dbName, t))) + .map(t -> new RefKey(defaultName, ContentsKey.of(dbName, t))) .collect(Collectors.toList()); try { return store.getItemsForRef(keys).stream() @@ -158,7 +158,7 @@ public void createDatabase(Database db) throws MetaException { public void alterDatabase(Database db) throws MetaException { try { - Optional oldDb = getItemForRef(defaultHash, db.getName()); + Optional oldDb = getItemForRef(defaultName, db.getName()); setItem( Item.wrap(db, oldDb.orElseThrow(() -> new MetaException("Db not found")).getId()), db.getName()); @@ -228,7 +228,7 @@ public Optional getTable(String dbName, String tableName) throws NoSuchObjectException { if (!tableName.contains("@")) { - return getItemForRef(defaultHash, dbName, tableName) + return getItemForRef(defaultName, dbName, tableName) .map(i -> new TableAndPartition(i.getTable(), i.getPartitions(), i.getId())); } @@ -243,7 +243,7 @@ public Optional getTable(String dbName, String tableName) if (ref.equalsIgnoreCase(defaultName) || ref.equalsIgnoreCase(defaultHash)) { // stay in transaction rather than possibly doing a newer read. - return getItemForRef(defaultHash, dbName, tableName) + return getItemForRef(defaultName, dbName, tableName) .map(i -> new TableAndPartition(i.getTable(), i.getPartitions(), i.getId())); } @@ -308,7 +308,7 @@ public void removePartition(String dbName, String tableName, List partit } Optional getDatabase(String database) throws NoSuchObjectException { - return getItemForRef(defaultHash, database).map(Item::getDatabase); + return getItemForRef(defaultName, database).map(Item::getDatabase); } private Optional getItemForRef(String ref, String... elements) diff --git a/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/TransactionStore.java b/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/TransactionStore.java index 36092a7f5e0..a428544fd63 100644 --- a/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/TransactionStore.java +++ b/clients/hmsbridge/core/src/main/java/org/projectnessie/hms/TransactionStore.java @@ -123,9 +123,9 @@ public List getReferences() { } public Stream getEntriesForDefaultRef() throws NessieNotFoundException { - List entries = tree.getEntries(reference.getHash(), null, null, null).getEntries(); + List entries = tree.getEntries(reference.getName(), null, null, null).getEntries(); Supplier> defaultRefKeys = - () -> cachedItems.keySet().stream().filter(k -> k.getRef().equals(reference.getHash())); + () -> cachedItems.keySet().stream().filter(k -> k.getRef().equals(reference.getName())); Set toRemove = defaultRefKeys.get().map(RefKey::getKey).collect(Collectors.toSet()); return Stream.concat( @@ -137,7 +137,7 @@ public Stream getEntriesForDefaultRef() throws NessieNotFoundException { void setItem(ContentsKey key, Item item) { checkWritable(); - cachedItems.put(new RefKey(reference.getHash(), key), item); + cachedItems.put(new RefKey(reference.getName(), key), item); operations.add(Operation.Put.of(key, item.toContents())); } @@ -159,7 +159,7 @@ void commit() throws NessieNotFoundException, NessieConflictException { void deleteItem(ContentsKey key) { checkWritable(); - cachedItems.put(new RefKey(reference.getHash(), key), null); + cachedItems.put(new RefKey(reference.getName(), key), null); operations.add(Operation.Delete.of(key)); } diff --git a/python/docs/log.rst b/python/docs/log.rst index 69d8df1836d..94b6489c410 100644 --- a/python/docs/log.rst +++ b/python/docs/log.rst @@ -4,13 +4,16 @@ Show commit log. - REVISION_RANGE optional branch, tag or hash to start viewing log from. If of - the form .. only show log for given range + REVISION_RANGE optional hash to start viewing log from. If of the form + .. only show log for given range on the particular ref that was + provided PATHS optional list of paths. If given, only show commits which affected the given paths Options: + -r, --ref TEXT branch to list from. If not supplied the + default branch from config is used -n, --number INTEGER number of log entries to return --since, --after TEXT Only include commits newer than specific date --until, --before TEXT Only include commits older than specific date diff --git a/python/pynessie/_log.py b/python/pynessie/_log.py index a3a45d4e5bd..cc46dbf0fef 100644 --- a/python/pynessie/_log.py +++ b/python/pynessie/_log.py @@ -17,13 +17,20 @@ def show_log( Note: limiting by path is not yet supported. """ + start = filtering_args.pop("start", None) end = filtering_args.pop("end", None) raw_log = nessie.get_log(start_ref=start_ref, **filtering_args) def generator() -> Generator[CommitMeta, Any, None]: + # start returning data if we don't have a start point, otherwise + # only start returning data when the start point was found + start_yielding = start is None for i in raw_log: + if start and i.hash_ == start: + start_yielding = True if end and i.hash_ == end: break - yield i + if start_yielding: + yield i return generator() diff --git a/python/pynessie/cli.py b/python/pynessie/cli.py index 93b483c1d2a..c1573c98ebe 100644 --- a/python/pynessie/cli.py +++ b/python/pynessie/cli.py @@ -186,6 +186,7 @@ def set_head(ctx: ContextObject, head: str, delete: bool) -> None: @cli.command("log") +@click.option("-r", "--ref", help="branch to list from. If not supplied the default branch from config is used") @click.option("-n", "--number", help="number of log entries to return", type=int) @click.option("--since", "--after", help="Only include commits newer than specific date") @click.option("--until", "--before", help="Only include commits older than specific date") @@ -221,6 +222,7 @@ def set_head(ctx: ContextObject, head: str, delete: bool) -> None: @error_handler def log( # noqa: C901 ctx: ContextObject, + ref: str, number: int, since: str, until: str, @@ -232,32 +234,34 @@ def log( # noqa: C901 ) -> None: """Show commit log. - REVISION_RANGE optional branch, tag or hash to start viewing log from. If of the form .. only show log - for given range + REVISION_RANGE optional hash to start viewing log from. If of the form .. only show log + for given range on the particular ref that was provided PATHS optional list of paths. If given, only show commits which affected the given paths """ - if not revision_range: - start = ctx.nessie.get_default_branch() - end = None - else: + if not ref: + ref = ctx.nessie.get_default_branch() + start = None + end = None + if revision_range: if ".." in revision_range: start, end = revision_range.split("..") else: start = revision_range - end = None filtering_args: Any = {} if number: filtering_args["max"] = str(number) + if start: + filtering_args["start"] = start if end: filtering_args["end"] = end - + # TODO: we should eventually move "start..end" filtering to the server expr = build_query_expression_for_commit_log_flags(query_expression, author, committer, since, until) if expr: filtering_args["query_expression"] = expr - log_result = show_log(nessie=ctx.nessie, start_ref=start, limits=paths, **filtering_args) + log_result = show_log(nessie=ctx.nessie, start_ref=ref, limits=paths, **filtering_args) if ctx.json: click.echo(CommitMetaSchema().dumps(log_result, many=True)) else: diff --git a/python/tests/cassettes/test_nessie_cli/test_assign.yaml b/python/tests/cassettes/test_nessie_cli/test_assign.yaml index cc41dbb0ebc..0adab7f71ce 100644 --- a/python/tests/cassettes/test_nessie_cli/test_assign.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_assign.yaml @@ -43,7 +43,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, {\n + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" headers: @@ -81,11 +81,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["foo", - "bar"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message", "email": null, "committer": null, + "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", + "bar"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, + "type": "PUT"}]}' headers: Accept: - '*/*' @@ -103,7 +103,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\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '120' @@ -127,7 +127,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -151,7 +151,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '120' @@ -161,7 +161,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a", + body: '{"hash": "2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1", "name": "main", "type": "BRANCH"}' headers: Accept: @@ -177,7 +177,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: PUT - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71 + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc response: body: string: '' @@ -201,8 +201,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n} + \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n} ]" headers: Content-Length: @@ -252,7 +252,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '121' @@ -262,7 +262,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a", + body: '{"hash": "2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1", "name": "v1.0", "type": "TAG"}' headers: Accept: @@ -281,7 +281,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '118' @@ -306,9 +306,9 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}, {\n - \ \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}, - {\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n} + \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}, {\n + \ \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}, + {\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n} ]" headers: Content-Length: @@ -333,7 +333,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/v1.0 response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '118' @@ -357,7 +357,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '120' @@ -367,7 +367,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a", + body: '{"hash": "2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1", "name": "v1.0", "type": "TAG"}' headers: Accept: @@ -383,7 +383,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: PUT - uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a + uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1 response: body: string: '' @@ -407,9 +407,9 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}, {\n - \ \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}, - {\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n} + \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}, {\n + \ \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}, + {\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n} ]" headers: Content-Length: @@ -434,7 +434,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '120' @@ -457,7 +457,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1 response: body: string: '' @@ -480,7 +480,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/v1.0 response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"v1.0\",\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\"\n}" headers: Content-Length: - '118' @@ -503,7 +503,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a + uri: http://localhost:19120/api/v1/trees/tag/v1.0?expectedHash=2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1 response: body: string: '' @@ -527,10 +527,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a\",\n + [ {\n \"hash\" : \"2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:11.418337Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.418337Z\",\n \"properties\" + \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.680521Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.680521Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -566,9 +566,9 @@ interactions: code: 200 message: OK - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "delete_message", "commitTime": null, "signedOffBy": null, - "authorTime": null, "properties": null}, "operations": [{"key": {"elements": + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "delete_message", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", "bar"]}, "type": "DELETE"}]}' headers: Accept: @@ -584,10 +584,10 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=4f7a1ba66376e2735b14b5a92e13a07daa41e5d0ba2306955ba859c62c2fc53a + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=2ad630148a1a6e2704e970f6d2a08b74f86770c6746a99ddda4d8167a819a4b1 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"34b1c0951409923f00f35e971cd819875d066c5639681377ca68abf3d9271cfc\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9ec93d2ab9f9f853f2c0568eb224f616cfff3727c040dc4a37f488dbe7297bb9\"\n}" headers: Content-Length: - '121' @@ -611,7 +611,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"34b1c0951409923f00f35e971cd819875d066c5639681377ca68abf3d9271cfc\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"9ec93d2ab9f9f853f2c0568eb224f616cfff3727c040dc4a37f488dbe7297bb9\"\n}" headers: Content-Length: - '121' @@ -634,7 +634,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=34b1c0951409923f00f35e971cd819875d066c5639681377ca68abf3d9271cfc + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=9ec93d2ab9f9f853f2c0568eb224f616cfff3727c040dc4a37f488dbe7297bb9 response: body: string: '' 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 500a8b55eea..73c8d333a3d 100644 --- a/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_contents_listing.yaml @@ -82,11 +82,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message1", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["this", - "is", "iceberg", "foo"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message1", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": + ["this", "is", "iceberg", "foo"]}, "contents": {"metadataLocation": "/a/b/c", + "id": "uuid", "type": "ICEBERG_TABLE"}, "type": "PUT"}]}' headers: Accept: - '*/*' @@ -105,7 +105,7 @@ interactions: response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"69e12e84434b40aa8e4fa95e988cd75e07c1b1772526fc12efbdac2d496a2566\"\n}" + \ \"hash\" : \"c787fa2a4db4c4a6cb2d933be6372ffb20a38974a23bb07e8818b2c3e05c89ff\"\n}" headers: Content-Length: - '137' @@ -130,7 +130,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"69e12e84434b40aa8e4fa95e988cd75e07c1b1772526fc12efbdac2d496a2566\"\n}, + \ \"hash\" : \"c787fa2a4db4c4a6cb2d933be6372ffb20a38974a23bb07e8818b2c3e05c89ff\"\n}, {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" headers: @@ -168,12 +168,12 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message2", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"checkpointLocationHistory": - ["def"], "id": "uuid2", "lastCheckpoint": "x", "metadataLocationHistory": ["asd"], - "type": "DELTA_LAKE_TABLE"}, "key": {"elements": ["this", "is", "delta", "bar"]}, - "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message2", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": + ["this", "is", "delta", "bar"]}, "contents": {"checkpointLocationHistory": ["def"], + "metadataLocationHistory": ["asd"], "id": "uuid2", "lastCheckpoint": "x", "type": + "DELTA_LAKE_TABLE"}, "type": "PUT"}]}' headers: Accept: - '*/*' @@ -188,11 +188,11 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=69e12e84434b40aa8e4fa95e988cd75e07c1b1772526fc12efbdac2d496a2566 + uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev/commit?expectedHash=c787fa2a4db4c4a6cb2d933be6372ffb20a38974a23bb07e8818b2c3e05c89ff response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"8abd1e42fc86700926fbe7e23b48ba454a15c676d8b234409e8164e3d754847a\"\n}" + \ \"hash\" : \"45a97dc5238189a5191359a3b89bbce93b350db629a0d68d0c43114d6f6ef07f\"\n}" headers: Content-Length: - '137' @@ -428,7 +428,7 @@ interactions: response: body: string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"contents_listing_dev\",\n - \ \"hash\" : \"8abd1e42fc86700926fbe7e23b48ba454a15c676d8b234409e8164e3d754847a\"\n}" + \ \"hash\" : \"45a97dc5238189a5191359a3b89bbce93b350db629a0d68d0c43114d6f6ef07f\"\n}" headers: Content-Length: - '137' @@ -451,7 +451,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev?expectedHash=8abd1e42fc86700926fbe7e23b48ba454a15c676d8b234409e8164e3d754847a + uri: http://localhost:19120/api/v1/trees/branch/contents_listing_dev?expectedHash=45a97dc5238189a5191359a3b89bbce93b350db629a0d68d0c43114d6f6ef07f 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 59a45729196..e7245345ceb 100644 --- a/python/tests/cassettes/test_nessie_cli/test_log.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_log.yaml @@ -76,11 +76,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - "nessie_user1", "message": "test_message", "commitTime": null, "signedOffBy": - null, "authorTime": null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["foo", - "bar"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message", "email": null, "committer": null, + "author": "nessie_user1", "properties": null}, "operations": [{"key": {"elements": + ["foo", "bar"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": + "ICEBERG_TABLE"}, "type": "PUT"}]}' headers: Accept: - '*/*' @@ -98,7 +98,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\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\"\n}" headers: Content-Length: - '121' @@ -148,10 +148,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + [ {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -173,14 +173,14 @@ interactions: User-Agent: - python-requests/2.25.1 method: GET - uri: http://localhost:19120/api/v1/trees/tree/e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0/log + uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + [ {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -242,10 +242,10 @@ interactions: code: 200 message: OK - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - "nessie_user2", "message": "delete_message", "commitTime": null, "signedOffBy": - null, "authorTime": null, "properties": null}, "operations": [{"key": {"elements": - ["foo", "bar"]}, "type": "DELETE"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "delete_message", "email": null, "committer": + null, "author": "nessie_user2", "properties": null}, "operations": [{"key": + {"elements": ["foo", "bar"]}, "type": "DELETE"}]}' headers: Accept: - '*/*' @@ -260,10 +260,10 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0 + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -288,14 +288,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -317,18 +317,18 @@ interactions: User-Agent: - python-requests/2.25.1 method: GET - uri: http://localhost:19120/api/v1/trees/tree/ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71/log + uri: http://localhost:19120/api/v1/trees/tree/main/log response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -354,14 +354,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -387,10 +387,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + [ {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -416,10 +416,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -445,14 +445,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -478,14 +478,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -511,10 +511,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -540,14 +540,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\",\n + [ {\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user2\",\n \"signedOffBy\" - : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.797866Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.797866Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e9bd4a56dfcd6c53b23a96a823026958677246cce18f55891d784520de67e5c0\",\n + : null,\n \"message\" : \"delete_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.075939Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.075939Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"3b98bd0a716a99445202fd1977968f4b23a3dc6d6f479fc6df5254ae02cacb8c\",\n \ \"committer\" : \"\",\n \"author\" : \"nessie_user1\",\n \"signedOffBy\" - : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:10.693676Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:10.693676Z\",\n \"properties\" + : null,\n \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:11.977377Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:11.977377Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: diff --git a/python/tests/cassettes/test_nessie_cli/test_merge.yaml b/python/tests/cassettes/test_nessie_cli/test_merge.yaml index 5bf0a12886c..134e3fc4290 100644 --- a/python/tests/cassettes/test_nessie_cli/test_merge.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_merge.yaml @@ -81,11 +81,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["foo", - "bar"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message", "email": null, "committer": null, + "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", + "bar"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, + "type": "PUT"}]}' headers: Accept: - '*/*' @@ -103,7 +103,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\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n}" headers: Content-Length: - '120' @@ -129,7 +129,7 @@ interactions: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n} + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n} ]" headers: Content-Length: @@ -154,7 +154,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n}" headers: Content-Length: - '120' @@ -164,7 +164,7 @@ interactions: code: 200 message: OK - request: - body: '{"fromHash": "deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f"}' + body: '{"fromHash": "7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262"}' headers: Accept: - '*/*' @@ -203,8 +203,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n} + \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n} ]" headers: Content-Length: @@ -229,7 +229,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\"\n}" headers: Content-Length: - '120' @@ -252,7 +252,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262 response: body: string: '' @@ -276,10 +276,10 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f\",\n + [ {\n \"hash\" : \"7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:11.710317Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.710317Z\",\n \"properties\" + \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:12.972070Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:12.972070Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -315,9 +315,9 @@ interactions: code: 200 message: OK - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "delete_message", "commitTime": null, "signedOffBy": null, - "authorTime": null, "properties": null}, "operations": [{"key": {"elements": + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "delete_message", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", "bar"]}, "type": "DELETE"}]}' headers: Accept: @@ -333,10 +333,10 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=deb09e5be22500e529f1c59559b0fc1ca8827b6c2d41734506a5035ee7d08e2f + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=7d8bcb33399f5cbd058697d6768ce41cc736d2f4c1cac1a2036a7eaf41050262 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"1dc4c3bfe99e71bd9db1d75427d16c63136767bb722468fec78d2f41979c2add\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"c49aada17fb3f55769a4e5d00eda26fa891f7e573a1bb2692a211ecc1622a13c\"\n}" headers: Content-Length: - '121' @@ -360,7 +360,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"1dc4c3bfe99e71bd9db1d75427d16c63136767bb722468fec78d2f41979c2add\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"c49aada17fb3f55769a4e5d00eda26fa891f7e573a1bb2692a211ecc1622a13c\"\n}" headers: Content-Length: - '121' @@ -383,7 +383,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=1dc4c3bfe99e71bd9db1d75427d16c63136767bb722468fec78d2f41979c2add + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=c49aada17fb3f55769a4e5d00eda26fa891f7e573a1bb2692a211ecc1622a13c response: body: string: '' diff --git a/python/tests/cassettes/test_nessie_cli/test_owner_repo_config_cli.yaml b/python/tests/cassettes/test_nessie_cli/test_owner_repo_config_cli.yaml index 2ac7785a22e..cccb39c050a 100644 --- a/python/tests/cassettes/test_nessie_cli/test_owner_repo_config_cli.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_owner_repo_config_cli.yaml @@ -1,1333 +1,4 @@ interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/ursus/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees/tree/main/log - response: - body: - string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ ]\n}" - headers: - Content-Length: - - '63' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/snazy/ursus/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees/tree - response: - body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n}" - headers: - Content-Length: - - '121' - Content-Type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.25.1 - method: GET - uri: http://localhost:19120/api/v1/robert/elani/trees - response: - body: - string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" - headers: - Content-Length: - - '125' - Content-Type: - - application/json - status: - code: 200 - message: OK - request: body: null headers: diff --git a/python/tests/cassettes/test_nessie_cli/test_ref.yaml b/python/tests/cassettes/test_nessie_cli/test_ref.yaml index 9b87d212aba..17977ff421b 100644 --- a/python/tests/cassettes/test_nessie_cli/test_ref.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_ref.yaml @@ -15,7 +15,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} ]" + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: - '125' @@ -68,7 +68,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, {\n + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" headers: @@ -119,7 +119,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -129,7 +129,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71", + body: '{"hash": "de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc", "name": "etl", "type": "BRANCH"}' headers: Accept: @@ -148,7 +148,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"etl\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"etl\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '120' @@ -173,8 +173,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"etl\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d\"\n} ]" headers: @@ -200,7 +200,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/etl response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"etl\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"etl\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '120' @@ -223,7 +223,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/etl?expectedHash=ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71 + uri: http://localhost:19120/api/v1/trees/branch/etl?expectedHash=de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc response: body: string: '' @@ -293,7 +293,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} ]" + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: - '125' diff --git a/python/tests/cassettes/test_nessie_cli/test_tag.yaml b/python/tests/cassettes/test_nessie_cli/test_tag.yaml index b806f7a7a81..32efa988dd2 100644 --- a/python/tests/cassettes/test_nessie_cli/test_tag.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_tag.yaml @@ -15,7 +15,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} ]" + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: - '125' @@ -64,7 +64,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -74,7 +74,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71", + body: '{"hash": "de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc", "name": "dev-tag", "type": "TAG"}' headers: Accept: @@ -93,7 +93,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -118,8 +118,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: @@ -169,7 +169,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -179,7 +179,7 @@ interactions: code: 200 message: OK - request: - body: '{"hash": "ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71", + body: '{"hash": "de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc", "name": "etl-tag", "type": "TAG"}' headers: Accept: @@ -198,7 +198,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -223,9 +223,9 @@ interactions: response: body: string: "[ {\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}, - {\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}, + {\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: @@ -250,7 +250,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/etl-tag response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"etl-tag\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -273,7 +273,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/tag/etl-tag?expectedHash=ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71 + uri: http://localhost:19120/api/v1/trees/tag/etl-tag?expectedHash=de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc response: body: string: '' @@ -296,7 +296,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev-tag response: body: - string: "{\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n}" + string: "{\n \"type\" : \"TAG\",\n \"name\" : \"dev-tag\",\n \"hash\" : \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n}" headers: Content-Length: - '121' @@ -319,7 +319,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/tag/dev-tag?expectedHash=ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71 + uri: http://localhost:19120/api/v1/trees/tag/dev-tag?expectedHash=de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc response: body: string: '' @@ -343,7 +343,7 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"ce2e56ac15086d4f9a8f2ce38a9e8a51e538d2a81ade50b6ef08a49ea73b5f71\"\n} ]" + \"de1098aaea0df0212f38c818b16e14fa81a5b45e83dd39ae842ac9daeba09bfc\"\n} ]" headers: Content-Length: - '125' diff --git a/python/tests/cassettes/test_nessie_cli/test_transplant.yaml b/python/tests/cassettes/test_nessie_cli/test_transplant.yaml index 4c2af3347dd..8ee6bec93f6 100644 --- a/python/tests/cassettes/test_nessie_cli/test_transplant.yaml +++ b/python/tests/cassettes/test_nessie_cli/test_transplant.yaml @@ -81,11 +81,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["foo", - "bar"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message", "email": null, "committer": null, + "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", + "bar"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, + "type": "PUT"}]}' headers: Accept: - '*/*' @@ -103,7 +103,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\" : \"9003cd17b8c578b8c74aa2ec8621f0ca524583aeb4e3207c0cd1a925a4b3a59d\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"fce7f679521802dbef2620356e2ec04147b3ae66435e97b094bf2e3dbaff7be0\"\n}" headers: Content-Length: - '120' @@ -139,11 +139,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message2", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["bar", - "bar"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message2", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": + ["bar", "bar"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": + "ICEBERG_TABLE"}, "type": "PUT"}]}' headers: Accept: - '*/*' @@ -161,7 +161,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\" : \"f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d\"\n}" headers: Content-Length: - '120' @@ -197,11 +197,11 @@ interactions: code: 404 message: Not Found - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "test_message3", "commitTime": null, "signedOffBy": null, "authorTime": - null, "properties": null}, "operations": [{"contents": {"metadataLocation": - "/a/b/c", "id": "uuid", "type": "ICEBERG_TABLE"}, "key": {"elements": ["foo", - "baz"]}, "type": "PUT"}]}' + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "test_message3", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": + ["foo", "baz"]}, "contents": {"metadataLocation": "/a/b/c", "id": "uuid", "type": + "ICEBERG_TABLE"}, "type": "PUT"}]}' headers: Accept: - '*/*' @@ -219,7 +219,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\" : \"e5042beb10e85119357d10973eee2dc9813e84a90a4b15dd385ea532d9159ca6\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"5e842b4f84b17ed2955b79275420241d8c0d29440b171849a6803dc2af833e63\"\n}" headers: Content-Length: - '121' @@ -244,8 +244,8 @@ interactions: response: body: string: "[ {\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : - \"e5042beb10e85119357d10973eee2dc9813e84a90a4b15dd385ea532d9159ca6\"\n}, {\n - \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf\"\n} + \"5e842b4f84b17ed2955b79275420241d8c0d29440b171849a6803dc2af833e63\"\n}, {\n + \ \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d\"\n} ]" headers: Content-Length: @@ -271,14 +271,14 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf\",\n + [ {\n \"hash\" : \"42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message2\",\n \"commitTime\" : \"2021-06-30T09:17:11.936346Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.936346Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"9003cd17b8c578b8c74aa2ec8621f0ca524583aeb4e3207c0cd1a925a4b3a59d\",\n + \ \"message\" : \"test_message2\",\n \"commitTime\" : \"2021-07-12T17:24:13.199974Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:13.199974Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"fce7f679521802dbef2620356e2ec04147b3ae66435e97b094bf2e3dbaff7be0\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:11.898457Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.898457Z\",\n \"properties\" + \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:13.162184Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:13.162184Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -289,8 +289,8 @@ interactions: code: 200 message: OK - request: - body: '{"hashesToTransplant": ["9003cd17b8c578b8c74aa2ec8621f0ca524583aeb4e3207c0cd1a925a4b3a59d", - "f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf"]}' + body: '{"hashesToTransplant": ["fce7f679521802dbef2620356e2ec04147b3ae66435e97b094bf2e3dbaff7be0", + "42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d"]}' headers: Accept: - '*/*' @@ -305,7 +305,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/transplant?expectedHash=e5042beb10e85119357d10973eee2dc9813e84a90a4b15dd385ea532d9159ca6 + uri: http://localhost:19120/api/v1/trees/branch/main/transplant?expectedHash=5e842b4f84b17ed2955b79275420241d8c0d29440b171849a6803dc2af833e63 response: body: string: '' @@ -329,18 +329,18 @@ interactions: response: body: string: "{\n \"hasMore\" : false,\n \"token\" : null,\n \"operations\" : - [ {\n \"hash\" : \"91300eec7fb2386dc56eb5af6c117c1ee4fb069e449bf13e7cc02426f93e50ac\",\n + [ {\n \"hash\" : \"e1765084d866de2be6ccbfbf898f9337969c9bd46df24455eb9d7e9442f4d191\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message2\",\n \"commitTime\" : \"2021-06-30T09:17:11.936346Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.936346Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"2dfb452628e51c7ebb75394c7729f6956165baf58225363425fd35c5ac746da8\",\n + \ \"message\" : \"test_message2\",\n \"commitTime\" : \"2021-07-12T17:24:13.199974Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:13.199974Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"021952fdd1672b89c035b150e8aa9dc2ce5bef47e573ecc1b6dde887f8f88e41\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-06-30T09:17:11.898457Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.898457Z\",\n \"properties\" - : { }\n }, {\n \"hash\" : \"e5042beb10e85119357d10973eee2dc9813e84a90a4b15dd385ea532d9159ca6\",\n + \ \"message\" : \"test_message\",\n \"commitTime\" : \"2021-07-12T17:24:13.162184Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:13.162184Z\",\n \"properties\" + : { }\n }, {\n \"hash\" : \"5e842b4f84b17ed2955b79275420241d8c0d29440b171849a6803dc2af833e63\",\n \ \"committer\" : \"\",\n \"author\" : \"\",\n \"signedOffBy\" : null,\n - \ \"message\" : \"test_message3\",\n \"commitTime\" : \"2021-06-30T09:17:11.975357Z\",\n - \ \"authorTime\" : \"2021-06-30T09:17:11.975357Z\",\n \"properties\" + \ \"message\" : \"test_message3\",\n \"commitTime\" : \"2021-07-12T17:24:13.239845Z\",\n + \ \"authorTime\" : \"2021-07-12T17:24:13.239845Z\",\n \"properties\" : { }\n } ]\n}" headers: Content-Length: @@ -376,9 +376,9 @@ interactions: code: 200 message: OK - request: - body: '{"commitMeta": {"hash": null, "committer": null, "email": null, "author": - null, "message": "delete_message", "commitTime": null, "signedOffBy": null, - "authorTime": null, "properties": null}, "operations": [{"key": {"elements": + body: '{"commitMeta": {"commitTime": null, "hash": null, "signedOffBy": null, + "authorTime": null, "message": "delete_message", "email": null, "committer": + null, "author": null, "properties": null}, "operations": [{"key": {"elements": ["foo", "bar"]}, "type": "DELETE"}]}' headers: Accept: @@ -394,10 +394,10 @@ interactions: User-Agent: - python-requests/2.25.1 method: POST - uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=91300eec7fb2386dc56eb5af6c117c1ee4fb069e449bf13e7cc02426f93e50ac + uri: http://localhost:19120/api/v1/trees/branch/main/commit?expectedHash=e1765084d866de2be6ccbfbf898f9337969c9bd46df24455eb9d7e9442f4d191 response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"570d59de1f5db96e77c38960fbb49eacacd48adb92a51657baf3300fc86cb6b1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"797a08c7a1cf8672ce87e087bb7e9c597fe24066065592f8f62c47b58220bc6b\"\n}" headers: Content-Length: - '121' @@ -421,7 +421,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/dev response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"dev\",\n \"hash\" : \"42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d\"\n}" headers: Content-Length: - '120' @@ -444,7 +444,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=f7f89b2bd2c5d619a23a093c26cb30f2fa87f7a279c5374bd7cac6f37b0ea2cf + uri: http://localhost:19120/api/v1/trees/branch/dev?expectedHash=42ddd3e560f15ee5b96a085a120b726fb76de1af432073401d1f896bd69bbe8d response: body: string: '' @@ -467,7 +467,7 @@ interactions: uri: http://localhost:19120/api/v1/trees/tree/main response: body: - string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"570d59de1f5db96e77c38960fbb49eacacd48adb92a51657baf3300fc86cb6b1\"\n}" + string: "{\n \"type\" : \"BRANCH\",\n \"name\" : \"main\",\n \"hash\" : \"797a08c7a1cf8672ce87e087bb7e9c597fe24066065592f8f62c47b58220bc6b\"\n}" headers: Content-Length: - '121' @@ -490,7 +490,7 @@ interactions: User-Agent: - python-requests/2.25.1 method: DELETE - uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=570d59de1f5db96e77c38960fbb49eacacd48adb92a51657baf3300fc86cb6b1 + uri: http://localhost:19120/api/v1/trees/branch/main?expectedHash=797a08c7a1cf8672ce87e087bb7e9c597fe24066065592f8f62c47b58220bc6b response: body: string: '' diff --git a/python/tests/test_nessie_cli.py b/python/tests/test_nessie_cli.py index d486a9efc01..82dfb9a8fc4 100644 --- a/python/tests/test_nessie_cli.py +++ b/python/tests/test_nessie_cli.py @@ -371,7 +371,7 @@ def test_transplant() -> None: ) refs = ReferenceSchema().loads(_run(runner, ["--json", "branch", "-l"]).output, many=True) main_hash = next(i.hash_ for i in refs if i.name == "main") - result = _run(runner, ["--json", "log", "dev"]) + result = _run(runner, ["--json", "log", "--ref", "dev"]) logs = simplejson.loads(result.output) first_hash = [i["hash"] for i in logs] _run(runner, ["cherry-pick", "-c", main_hash, first_hash[1], first_hash[0]]) diff --git a/servers/jax-rs/src/test/java/org/projectnessie/jaxrs/AbstractTestRest.java b/servers/jax-rs/src/test/java/org/projectnessie/jaxrs/AbstractTestRest.java index cef3783b964..efbb69e8ed8 100644 --- a/servers/jax-rs/src/test/java/org/projectnessie/jaxrs/AbstractTestRest.java +++ b/servers/jax-rs/src/test/java/org/projectnessie/jaxrs/AbstractTestRest.java @@ -1185,6 +1185,29 @@ void invalidTags(String invalidTagNameIn, String validHash) { + "`org.projectnessie.model.Tag`: known type ids = []\n")); } + @Test + public void testInvalidRefs() { + ContentsKey key = ContentsKey.of("x"); + MultiGetContentsRequest mgReq = MultiGetContentsRequest.of(key); + String invalidRef = "1234567890123456"; + + assertThatThrownBy(() -> tree.getCommitLog(invalidRef, null, null, null)) + .isInstanceOf(NessieBadRequestException.class) + .hasMessageStartingWith("Bad Request (HTTP/400): " + REF_NAME_MESSAGE); + + assertThatThrownBy(() -> tree.getEntries(invalidRef, null, null, null)) + .isInstanceOf(NessieBadRequestException.class) + .hasMessageStartingWith("Bad Request (HTTP/400): " + REF_NAME_MESSAGE); + + assertThatThrownBy(() -> contents.getContents(key, invalidRef)) + .isInstanceOf(NessieBadRequestException.class) + .hasMessageStartingWith("Bad Request (HTTP/400): " + REF_NAME_MESSAGE); + + assertThatThrownBy(() -> contents.getMultipleContents(invalidRef, mgReq)) + .isInstanceOf(NessieBadRequestException.class) + .hasMessageStartingWith("Bad Request (HTTP/400): " + REF_NAME_MESSAGE); + } + void unwrap(Executable exec) throws Throwable { try { exec.execute(); diff --git a/servers/services/src/main/java/org/projectnessie/services/rest/BaseResource.java b/servers/services/src/main/java/org/projectnessie/services/rest/BaseResource.java index 66aab8269d5..b9100c86e82 100644 --- a/servers/services/src/main/java/org/projectnessie/services/rest/BaseResource.java +++ b/servers/services/src/main/java/org/projectnessie/services/rest/BaseResource.java @@ -21,6 +21,7 @@ import org.projectnessie.error.NessieNotFoundException; import org.projectnessie.model.CommitMeta; import org.projectnessie.model.Contents; +import org.projectnessie.model.Validation; import org.projectnessie.services.config.ServerConfig; import org.projectnessie.versioned.Hash; import org.projectnessie.versioned.Ref; @@ -58,6 +59,17 @@ Optional getHash(String ref) { } } + WithHash namedRefWithHashOrThrow(String ref) throws NessieNotFoundException { + try { + if (null != ref) { + ref = Validation.validateReferenceName(ref); + } + return store.toRef(Optional.ofNullable(ref).orElse(config.getDefaultBranch())); + } catch (ReferenceNotFoundException e) { + throw new NessieNotFoundException(String.format("Ref for %s not found", ref)); + } + } + Hash getHashOrThrow(String ref) throws NessieNotFoundException { return getHash(ref) .orElseThrow(() -> new NessieNotFoundException(String.format("Ref for %s not found", ref))); diff --git a/servers/services/src/main/java/org/projectnessie/services/rest/ContentsResource.java b/servers/services/src/main/java/org/projectnessie/services/rest/ContentsResource.java index 56961e9e83a..d50dcc1103e 100644 --- a/servers/services/src/main/java/org/projectnessie/services/rest/ContentsResource.java +++ b/servers/services/src/main/java/org/projectnessie/services/rest/ContentsResource.java @@ -59,7 +59,7 @@ protected SecurityContext getSecurityContext() { @Override public Contents getContents(ContentsKey key, String incomingRef) throws NessieNotFoundException { - Hash ref = getHashOrThrow(incomingRef); + Hash ref = namedRefWithHashOrThrow(incomingRef).getHash(); try { Contents obj = getStore().getValue(ref, toKey(key)); if (obj != null) { @@ -76,7 +76,7 @@ public Contents getContents(ContentsKey key, String incomingRef) throws NessieNo public MultiGetContentsResponse getMultipleContents( String refName, MultiGetContentsRequest request) throws NessieNotFoundException { try { - Hash ref = getHashOrThrow(refName); + Hash ref = namedRefWithHashOrThrow(refName).getHash(); List externalKeys = request.getRequestedKeys(); List internalKeys = externalKeys.stream().map(ContentsResource::toKey).collect(Collectors.toList()); diff --git a/servers/services/src/main/java/org/projectnessie/services/rest/TreeResource.java b/servers/services/src/main/java/org/projectnessie/services/rest/TreeResource.java index a6acf313ff9..042ec764b67 100644 --- a/servers/services/src/main/java/org/projectnessie/services/rest/TreeResource.java +++ b/servers/services/src/main/java/org/projectnessie/services/rest/TreeResource.java @@ -180,7 +180,16 @@ public LogResponse getCommitLog( throws NessieNotFoundException { int max = Math.min(maxRecords != null ? maxRecords : MAX_COMMIT_LOG_ENTRIES, MAX_COMMIT_LOG_ENTRIES); - Hash startRef = getHashOrThrow(pageToken != null ? pageToken : ref); + + Ref startRef; + if (null == pageToken) { + // we should only allow named references when no paging is defined + startRef = namedRefWithHashOrThrow(ref).getValue(); + } else { + // TODO: this is atm an insecure design where users can put it any hashes and retrieve all the + // commits. Once authz + tvs2 is in place we should revisit this + startRef = getHashOrThrow(pageToken); + } try (Stream s = getStore() @@ -285,7 +294,7 @@ public EntriesResponse getEntries( String refName, Integer maxRecords, String pageToken, String queryExpression) throws NessieNotFoundException { - final Hash hash = getHashOrThrow(refName); + final Hash hash = namedRefWithHashOrThrow(refName).getHash(); // TODO Implement paging. At the moment, we do not expect that many keys/entries to be returned. // So the size of the whole result is probably reasonable and unlikely to "kill" either the // server or client. We have to figure out _how_ to implement paging for keys/entries, i.e.