diff --git a/api/swagger.yml b/api/swagger.yml index bf72f730154..1bf5b094497 100644 --- a/api/swagger.yml +++ b/api/swagger.yml @@ -343,7 +343,7 @@ components: properties: type: type: string - enum: [ added, removed, changed, conflict ] + enum: [ added, removed, changed, conflict, prefix_changed ] path: type: string path_type: diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index dfe310dfb73..19c08ac3413 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -5009,6 +5009,7 @@ components: - removed - changed - conflict + - prefix_changed type: string path: type: string diff --git a/clients/java/docs/Diff.md b/clients/java/docs/Diff.md index 5a2856dab7d..640d51ba54f 100644 --- a/clients/java/docs/Diff.md +++ b/clients/java/docs/Diff.md @@ -22,6 +22,7 @@ ADDED | "added" REMOVED | "removed" CHANGED | "changed" CONFLICT | "conflict" +PREFIX_CHANGED | "prefix_changed" diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java index a19286db4e8..70baf55b23e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java @@ -40,7 +40,9 @@ public enum TypeEnum { CHANGED("changed"), - CONFLICT("conflict"); + CONFLICT("conflict"), + + PREFIX_CHANGED("prefix_changed"); private String value; diff --git a/clients/python/lakefs_client/model/diff.py b/clients/python/lakefs_client/model/diff.py index b8bfeee2086..6daaa6b5a53 100644 --- a/clients/python/lakefs_client/model/diff.py +++ b/clients/python/lakefs_client/model/diff.py @@ -61,6 +61,7 @@ class Diff(ModelNormal): 'REMOVED': "removed", 'CHANGED': "changed", 'CONFLICT': "conflict", + 'PREFIX_CHANGED': "prefix_changed", }, ('path_type',): { 'COMMON_PREFIX': "common_prefix", diff --git a/docs/assets/js/swagger.yml b/docs/assets/js/swagger.yml index 9996c4aeb1f..1bf5b094497 100644 --- a/docs/assets/js/swagger.yml +++ b/docs/assets/js/swagger.yml @@ -343,7 +343,7 @@ components: properties: type: type: string - enum: [ added, removed, changed, conflict ] + enum: [ added, removed, changed, conflict, prefix_changed ] path: type: string path_type: @@ -863,7 +863,6 @@ components: format: date-time event_type: type: string - enum: [ pre_commit, pre_merge ] status: type: string enum: [ failed, completed ] @@ -2670,6 +2669,15 @@ paths: - objects operationId: getObject summary: get object content + parameters: + - in: header + name: Range + description: Byte range to retrieve + example: "bytes=0-1023" + required: false + schema: + type: string + pattern: '^bytes=((\d*-\d*,? ?)+)$' responses: 200: description: object content @@ -2692,6 +2700,31 @@ paths: Content-Disposition: schema: type: string + 206: + description: partial object content + content: + application/octet-stream: + schema: + type: string + format: binary + headers: + Content-Length: + schema: + type: integer + format: int64 + Content-Range: + schema: + type: string + pattern: '^bytes=((\d*-\d*,? ?)+)$' + Last-Modified: + schema: + type: string + ETag: + schema: + type: string + Content-Disposition: + schema: + type: string 401: $ref: "#/components/responses/Unauthorized" 404: @@ -2704,6 +2737,12 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + 416: + description: Requested Range Not Satisfiable + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /repositories/{repository}/branches/{branch}/staging/backing: parameters: diff --git a/pkg/api/controller_test.go b/pkg/api/controller_test.go index e650cc1d824..857b70fbdbf 100644 --- a/pkg/api/controller_test.go +++ b/pkg/api/controller_test.go @@ -1385,7 +1385,7 @@ func TestController_DiffRefs(t *testing.T) { if results[0].Path != prefix { t.Fatalf("wrong result: %s", results[0].Path) } - if results[0].Type != "changes under prefix" { + if results[0].Type != "prefix_changed" { t.Fatalf("wrong diff type: %s", results[0].Type) } }) diff --git a/pkg/api/transform.go b/pkg/api/transform.go index dd902fef2e6..8988d9e6669 100644 --- a/pkg/api/transform.go +++ b/pkg/api/transform.go @@ -15,7 +15,7 @@ func transformDifferenceTypeToString(d catalog.DifferenceType) string { case catalog.DifferenceTypeConflict: return "conflict" case catalog.DifferenceTypePrefixChanged: - return "changes under prefix" + return "prefix_changed" default: return "" } diff --git a/webui/src/lib/components/repository/changes.jsx b/webui/src/lib/components/repository/changes.jsx index a5ba425f0d4..c50277fd98a 100644 --- a/webui/src/lib/components/repository/changes.jsx +++ b/webui/src/lib/components/repository/changes.jsx @@ -210,8 +210,7 @@ function extractPathText(entry, relativeTo) { function diffType(entry) { switch (entry.type) { case 'changed': - return 'diff-changed'; - case 'changes under prefix': + case 'prefix_changed': return 'diff-changed'; case 'added': return 'diff-added';