From 68ce04e4085acb5d1053a8e18df888e4b2b3bd7c Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Mon, 18 Nov 2024 03:21:31 +0530 Subject: [PATCH 1/6] Support `directory` syntax & functionality (#1323) --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 4 +- .../command/dump/internal/airline/zilla.lua | 45 ++- .../read.file.extension/client.rpt | 5 +- .../read.file.extension/server.rpt | 5 +- ...licationIT_shouldReadFileExtensionOnly.txt | 50 ++- pom.xml | 10 +- .../stream/FileSystemServerFactory.java | 295 +++++++++++++----- .../filesystem/model/FileSystemObject.java | 29 ++ .../src/main/moditect/module-info.java | 1 + .../internal/stream/FileSystemServerIT.java | 83 +++++ .../config/HttpFileSystemConditionConfig.java | 20 +- .../HttpFileSystemConditionConfigBuilder.java | 61 ++++ .../config/HttpFileSystemBindingConfig.java | 13 +- .../HttpFileSystemConditionConfigAdapter.java | 15 +- .../HttpFileSystemConditionMatcher.java | 14 +- .../config/HttpFileSystemRouteConfig.java | 5 +- .../config/HttpFileSystemWithConfig.java | 18 +- .../HttpFileSystemWithConfigAdapter.java | 9 +- .../HttpFileSystemWithConfigBuilder.java | 61 ++++ .../config/HttpFileSystemWithResolver.java | 128 +++++--- .../config/HttpFileSystemWithResult.java | 8 + .../stream/HttpFileSystemProxyFactory.java | 57 ++-- ...pFileSystemConditionConfigAdapterTest.java | 4 +- .../HttpFileSystemWithConfigAdapterTest.java | 2 +- .../stream/HttpFileSystemProxyIT.java | 10 + .../internal/FileSystemFunctions.java | 22 ++ .../resources/META-INF/zilla/filesystem.idl | 27 +- .../application/client.read.abort/client.rpt | 2 +- .../application/client.read.abort/server.rpt | 2 +- .../client.read.begin.not.modified/client.rpt | 2 +- .../client.read.begin.not.modified/server.rpt | 2 +- .../client.read.file.not.found/client.rpt | 2 +- .../application/client.write.abort/client.rpt | 2 +- .../application/client.write.abort/server.rpt | 2 +- .../application/create.directory/client.rpt | 37 +++ .../application/create.directory/server.rpt | 38 +++ .../create.file.payload/client.rpt | 4 +- .../create.file.payload/server.rpt | 4 +- .../application/delete.directory/client.rpt | 35 +++ .../application/delete.directory/server.rpt | 38 +++ .../delete.file.payload.failed/client.rpt | 2 +- .../delete.file.payload/client.rpt | 4 +- .../delete.file.payload/server.rpt | 4 +- .../read.directory.empty/client.rpt | 37 +++ .../read.directory.empty/server.rpt | 40 +++ .../read.directory.failed/client.rpt | 25 ++ .../read.directory.failed/server.rpt | 19 ++ .../application/read.directory/client.rpt | 37 +++ .../application/read.directory/server.rpt | 40 +++ .../read.file.extension.default/client.rpt | 4 +- .../read.file.extension.default/server.rpt | 4 +- .../read.file.extension/client.rpt | 4 +- .../read.file.extension/server.rpt | 4 +- .../read.file.payload.empty/client.rpt | 4 +- .../read.file.payload.empty/server.rpt | 4 +- .../read.file.payload.extension/client.rpt | 4 +- .../read.file.payload.extension/server.rpt | 4 +- .../client.rpt | 4 +- .../server.rpt | 4 +- .../client.rpt | 4 +- .../server.rpt | 4 +- .../client.rpt | 8 +- .../server.rpt | 8 +- .../read.file.payload.modified/client.rpt | 4 +- .../read.file.payload.modified/server.rpt | 4 +- .../client.rpt | 4 +- .../server.rpt | 4 +- .../application/read.file.payload/client.rpt | 4 +- .../application/read.file.payload/server.rpt | 4 +- .../write.file.payload.interrupt/client.rpt | 2 +- .../write.file.payload.interrupt/server.rpt | 2 +- .../client.rpt | 2 +- .../write.file.payload.modified/client.rpt | 4 +- .../write.file.payload.modified/server.rpt | 4 +- .../internal/FileSystemFunctionsTest.java | 82 +++-- .../streams/application/FileSystemIT.java | 50 +++ .../config/proxy.with.directory.dynamic.yaml | 27 ++ .../schema/http.filesystem.schema.patch.json | 41 ++- .../client.rpt | 4 +- .../server.rpt | 4 +- .../filesystem/client.create.file/client.rpt | 4 +- .../filesystem/client.create.file/server.rpt | 4 +- .../filesystem/client.delete.file/client.rpt | 4 +- .../filesystem/client.delete.file/server.rpt | 4 +- .../client.rpt | 2 +- .../server.rpt | 2 +- .../client.read.directory/client.rpt | 36 +++ .../client.read.directory/server.rpt | 40 +++ .../client.read.file.info/client.rpt | 4 +- .../client.read.file.info/server.rpt | 4 +- .../client.read.file.map.modified/client.rpt | 4 +- .../client.read.file.map.modified/server.rpt | 4 +- .../client.rpt | 4 +- .../server.rpt | 4 +- .../filesystem/client.read.file/client.rpt | 4 +- .../filesystem/client.read.file/server.rpt | 4 +- .../client.write.file.failed/client.rpt | 2 +- .../client.write.file.failed/server.rpt | 2 +- .../filesystem/client.write.file/client.rpt | 4 +- .../filesystem/client.write.file/server.rpt | 4 +- .../http/client.read.directory/client.rpt | 38 +++ .../http/client.read.directory/server.rpt | 39 +++ .../client.rpt | 1 - .../server.rpt | 1 - .../http/filesystem/config/SchemaTest.java | 8 + .../http/filesystem/streams/FileSystemIT.java | 9 + .../http/filesystem/streams/HttpIT.java | 9 + 108 files changed, 1607 insertions(+), 329 deletions(-) create mode 100644 runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/model/FileSystemObject.java create mode 100644 runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfigBuilder.java create mode 100644 runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigBuilder.java create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/client.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/server.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/client.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/server.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/client.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/server.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/client.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/server.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/client.rpt create mode 100644 specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/server.rpt create mode 100644 specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/config/proxy.with.directory.dynamic.yaml create mode 100644 specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/client.rpt create mode 100644 specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/server.rpt create mode 100644 specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/client.rpt create mode 100644 specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/server.rpt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 419e015628..df9606fc7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 17, 21, 22 ] + java: [ 20, 21, 22 ] steps: - name: Checkout GitHub sources diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8b44379671..f82eb57165 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -48,11 +48,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup JDK 17 + - name: Setup JDK 20 uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 20 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/incubator/command-dump/src/main/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/zilla.lua b/incubator/command-dump/src/main/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/zilla.lua index 6bfafd76cb..60043e2fd3 100644 --- a/incubator/command-dump/src/main/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/zilla.lua +++ b/incubator/command-dump/src/main/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/zilla.lua @@ -408,12 +408,26 @@ local fields = { -- filesystem extension filesystem_ext_capabilities = ProtoField.uint32("zilla.filesystem_ext.capabilities", "Capabilities", base.HEX), - filesystem_ext_capabilities_read_payload = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_payload", - "READ_PAYLOAD", base.DEC, flags_types, 0x01), - filesystem_ext_capabilities_read_extension = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_extension", - "READ_EXTENSION", base.DEC, flags_types, 0x02), - filesystem_ext_capabilities_read_changes = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_changes", - "READ_CHANGES", base.DEC, flags_types, 0x04), + filesystem_ext_capabilities_create_directory = ProtoField.uint32("zilla.filesystem_ext.capabilities_create_directory", + "CREATE_DIRECTORY", base.DEC, flags_types, 0x01), + filesystem_ext_capabilities_create_file = ProtoField.uint32("zilla.filesystem_ext.capabilities_create_file", + "CREATE_FILE", base.DEC, flags_types, 0x02), + filesystem_ext_capabilities_delete_directory = ProtoField.uint32("zilla.filesystem_ext.capabilities_delete_directory", + "DELETE_DIRECTORY", base.DEC, flags_types, 0x04), + filesystem_ext_capabilities_delete_file = ProtoField.uint32("zilla.filesystem_ext.capabilities_delete_file", + "DELETE_FILE", base.DEC, flags_types, 0x08), + filesystem_ext_capabilities_read_directory = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_directory", + "READ_DIRECTORY", base.DEC, flags_types, 0x10), + filesystem_ext_capabilities_read_file = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_file", + "READ_FILE", base.DEC, flags_types, 0x20), + filesystem_ext_capabilities_read_file_changes = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_file_changes", + "READ_FILE_CHANGES", base.DEC, flags_types, 0x40), + filesystem_ext_capabilities_read_metadata = ProtoField.uint32("zilla.filesystem_ext.capabilities_read_metadata", + "READ_METADATA", base.DEC, flags_types, 0x80), + filesystem_ext_capabilities_write_file = ProtoField.uint32("zilla.filesystem_ext.capabilities_write_file", + "WRITE_FILE", base.DEC, flags_types, 0x100), + filesystem_ext_directory_length = ProtoField.int16("zilla.filesystem_ext.directory_length", "Length", base.DEC), + filesystem_ext_directory = ProtoField.string("zilla.filesystem_ext.directory", "Directory", base.NONE), filesystem_ext_path_length = ProtoField.int16("zilla.filesystem_ext.path_length", "Length", base.DEC), filesystem_ext_path = ProtoField.string("zilla.filesystem_ext.path", "Path", base.NONE), filesystem_ext_type_length = ProtoField.int16("zilla.filesystem_ext.type_length", "Length", base.DEC), @@ -1563,11 +1577,22 @@ function handle_filesystem_extension(buffer, offset, ext_subtree) local slice_capabilities = buffer(capabilities_offset, capabilities_length) local capabilities_label = string.format("Capabilities: 0x%08x", slice_capabilities:le_uint()) local capabilities_subtree = ext_subtree:add(zilla_protocol, slice_capabilities, capabilities_label) - capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_payload, slice_capabilities) - capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_extension, slice_capabilities) - capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_changes, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_create_directory, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_create_file, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_delete_directory, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_delete_file, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_directory, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_file, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_file_changes, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_read_metadata, slice_capabilities) + capabilities_subtree:add_le(fields.filesystem_ext_capabilities_write_file, slice_capabilities) + -- directory + local directory_offset = capabilities_offset + capabilities_length + local directory_length, slice_directory_length, slice_directory_text = dissect_length_value(buffer, directory_offset, 2) + add_string_as_subtree(buffer(directory_offset, directory_length), ext_subtree, "Directory: %s", + slice_directory_length, slice_directory_text, fields.filesystem_ext_directory_length, fields.filesystem_ext_directory) -- path - local path_offset = capabilities_offset + capabilities_length + local path_offset = directory_offset + directory_length local path_length, slice_path_length, slice_path_text = dissect_length_value(buffer, path_offset, 2) add_string_as_subtree(buffer(path_offset, path_length), ext_subtree, "Path: %s", slice_path_length, slice_path_text, fields.filesystem_ext_path_length, fields.filesystem_ext_path) diff --git a/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/client.rpt b/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/client.rpt index 350550a300..ff15368195 100644 --- a/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/client.rpt +++ b/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/client.rpt @@ -21,8 +21,9 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") + .payloadSize(0) .build()} connected @@ -30,7 +31,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/server.rpt b/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/server.rpt index fba37d7530..0008f7db51 100644 --- a/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/server.rpt +++ b/incubator/command-dump/src/main/scripts/io/aklivity/zilla/runtime/command/dump/binding/filesystem/streams/application/read.file.extension/server.rpt @@ -21,8 +21,9 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") + .payloadSize(0) .build()} connected @@ -30,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/FileSystemApplicationIT_shouldReadFileExtensionOnly.txt b/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/FileSystemApplicationIT_shouldReadFileExtensionOnly.txt index 8f2c26d801..1ec0c4f527 100644 --- a/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/FileSystemApplicationIT_shouldReadFileExtensionOnly.txt +++ b/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/FileSystemApplicationIT_shouldReadFileExtensionOnly.txt @@ -1,7 +1,7 @@ -Frame 1: 250 bytes on wire (2000 bits), 250 bytes captured (2000 bits) +Frame 1: 252 bytes on wire (2016 bits), 252 bytes captured (2016 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:2, Dst: fe80::3f3f:0:0:3 -Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 0, Ack: 1, Len: 176 +Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 0, Ack: 1, Len: 178 Zilla Frame Frame Type ID: 0x00000001 Frame Type: BEGIN @@ -29,10 +29,19 @@ Zilla Frame Extension: filesystem Stream Type ID: 0x9eaae6e4 Stream Type: filesystem - Capabilities: 0x00000002 - .... .... .... .... .... .... .... ...0 = READ_PAYLOAD: Not set (0) - .... .... .... .... .... .... .... ..1. = READ_EXTENSION: Set (1) - .... .... .... .... .... .... .... .0.. = READ_CHANGES: Not set (0) + Capabilities: 0x00000080 + .... .... .... .... .... .... .... ...0 = CREATE_DIRECTORY: Not set (0) + .... .... .... .... .... .... .... ..0. = CREATE_FILE: Not set (0) + .... .... .... .... .... .... .... .0.. = DELETE_DIRECTORY: Not set (0) + .... .... .... .... .... .... .... 0... = DELETE_FILE: Not set (0) + .... .... .... .... .... .... ...0 .... = READ_DIRECTORY: Not set (0) + .... .... .... .... .... .... ..0. .... = READ_FILE: Not set (0) + .... .... .... .... .... .... .0.. .... = READ_FILE_CHANGES: Not set (0) + .... .... .... .... .... .... 1... .... = READ_METADATA: Set (1) + .... .... .... .... .... ...0 .... .... = WRITE_FILE: Not set (0) + Directory: + Length: -1 + Directory: Path: index.html Length: 10 Path: index.html @@ -48,7 +57,7 @@ Zilla Frame Frame 2: 211 bytes on wire (1688 bits), 211 bytes captured (1688 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:2, Dst: fe80::3f3f:0:0:3 -Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 176, Ack: 1, Len: 137 +Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 178, Ack: 1, Len: 137 Zilla Frame Frame Type ID: 0x40000002 Frame Type: WINDOW @@ -82,7 +91,7 @@ Zilla Frame Frame 3: 194 bytes on wire (1552 bits), 194 bytes captured (1552 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:2, Dst: fe80::3f3f:0:0:3 -Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 313, Ack: 1, Len: 120 +Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 315, Ack: 1, Len: 120 Zilla Frame Frame Type ID: 0x00000003 Frame Type: END @@ -107,10 +116,10 @@ Zilla Frame Trace ID: 0x8000000000000003 Authorization: 0x0000000000000000 -Frame 4: 259 bytes on wire (2072 bits), 259 bytes captured (2072 bits) +Frame 4: 261 bytes on wire (2088 bits), 261 bytes captured (2088 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:3, Dst: fe80::3f3f:0:0:2 -Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 1, Ack: 433, Len: 185 +Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 1, Ack: 435, Len: 187 Zilla Frame Frame Type ID: 0x00000001 Frame Type: BEGIN @@ -138,10 +147,19 @@ Zilla Frame Extension: filesystem Stream Type ID: 0x9eaae6e4 Stream Type: filesystem - Capabilities: 0x00000002 - .... .... .... .... .... .... .... ...0 = READ_PAYLOAD: Not set (0) - .... .... .... .... .... .... .... ..1. = READ_EXTENSION: Set (1) - .... .... .... .... .... .... .... .0.. = READ_CHANGES: Not set (0) + Capabilities: 0x00000080 + .... .... .... .... .... .... .... ...0 = CREATE_DIRECTORY: Not set (0) + .... .... .... .... .... .... .... ..0. = CREATE_FILE: Not set (0) + .... .... .... .... .... .... .... .0.. = DELETE_DIRECTORY: Not set (0) + .... .... .... .... .... .... .... 0... = DELETE_FILE: Not set (0) + .... .... .... .... .... .... ...0 .... = READ_DIRECTORY: Not set (0) + .... .... .... .... .... .... ..0. .... = READ_FILE: Not set (0) + .... .... .... .... .... .... .0.. .... = READ_FILE_CHANGES: Not set (0) + .... .... .... .... .... .... 1... .... = READ_METADATA: Set (1) + .... .... .... .... .... ...0 .... .... = WRITE_FILE: Not set (0) + Directory: + Length: -1 + Directory: Path: index.html Length: 10 Path: index.html @@ -157,7 +175,7 @@ Zilla Frame Frame 5: 194 bytes on wire (1552 bits), 194 bytes captured (1552 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:3, Dst: fe80::3f3f:0:0:2 -Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 186, Ack: 433, Len: 120 +Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 188, Ack: 435, Len: 120 Zilla Frame Frame Type ID: 0x00000003 Frame Type: END @@ -185,7 +203,7 @@ Zilla Frame Frame 6: 211 bytes on wire (1688 bits), 211 bytes captured (1688 bits) Ethernet II, Src: Send_00 (20:53:45:4e:44:00), Dst: Receive_00 (20:52:45:43:56:00) Internet Protocol Version 6, Src: fe80::3f3f:0:0:3, Dst: fe80::3f3f:0:0:2 -Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 306, Ack: 433, Len: 137 +Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 308, Ack: 435, Len: 137 Zilla Frame Frame Type ID: 0x40000002 Frame Type: WINDOW diff --git a/pom.xml b/pom.xml index 538d8d33da..98261cf74f 100644 --- a/pom.xml +++ b/pom.xml @@ -49,9 +49,9 @@ UTF-8 UTF-8 - 17 - 17 - 17 + 20 + 20 + 20 io/aklivity/zilla/conf/checkstyle/configuration.xml io/aklivity/zilla/conf/checkstyle/suppressions.xml 4.13.0 @@ -392,7 +392,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.0 + 3.6.0 package @@ -699,7 +699,7 @@ No Snapshots Allowed! - [17,18) + [21,22) release diff --git a/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerFactory.java b/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerFactory.java index 62c5ca3663..8572fa2359 100644 --- a/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerFactory.java +++ b/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerFactory.java @@ -15,7 +15,10 @@ package io.aklivity.zilla.runtime.binding.filesystem.internal.stream; import static io.aklivity.zilla.runtime.binding.filesystem.config.FileSystemSymbolicLinksConfig.IGNORE; -import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.FILE_ALREADY_EXISTS; +import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.DIRECTORY_EXISTS; +import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.DIRECTORY_NOT_EMPTY; +import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.DIRECTORY_NOT_FOUND; +import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.FILE_EXISTS; import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.FILE_MODIFIED; import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.FILE_NOT_FOUND; import static io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.FileSystemError.FILE_TAG_MISSING; @@ -32,6 +35,7 @@ import java.io.InputStream; import java.net.URI; import java.nio.channels.ByteChannel; +import java.nio.charset.StandardCharsets; import java.nio.file.FileSystem; import java.nio.file.Files; import java.nio.file.LinkOption; @@ -44,6 +48,10 @@ import java.util.function.LongFunction; import java.util.function.LongUnaryOperator; import java.util.function.Supplier; +import java.util.stream.Stream; + +import jakarta.json.bind.Jsonb; +import jakarta.json.bind.JsonbBuilder; import org.agrona.BitUtil; import org.agrona.DirectBuffer; @@ -70,6 +78,7 @@ import io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.ResetFW; import io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.SignalFW; import io.aklivity.zilla.runtime.binding.filesystem.internal.types.stream.WindowFW; +import io.aklivity.zilla.runtime.binding.filesystem.model.FileSystemObject; import io.aklivity.zilla.runtime.engine.EngineContext; import io.aklivity.zilla.runtime.engine.binding.function.MessageConsumer; import io.aklivity.zilla.runtime.engine.budget.BudgetDebitor; @@ -84,15 +93,20 @@ public final class FileSystemServerFactory implements FileSystemStreamFactory private static final OctetsFW EMPTY_EXTENSION = new OctetsFW().wrap(new UnsafeBuffer(new byte[0]), 0, 0); - private static final int READ_PAYLOAD_MASK = 1 << FileSystemCapabilities.READ_PAYLOAD.ordinal(); - private static final int WRITE_PAYLOAD_MASK = 1 << FileSystemCapabilities.WRITE_PAYLOAD.ordinal(); - private static final int CREATE_PAYLOAD_MASK = 1 << FileSystemCapabilities.CREATE_PAYLOAD.ordinal(); - private static final int DELETE_PAYLOAD_MASK = 1 << FileSystemCapabilities.DELETE_PAYLOAD.ordinal(); + private static final int READ_FILE_MASK = 1 << FileSystemCapabilities.READ_FILE.ordinal(); + private static final int WRITE_FILE_MASK = 1 << FileSystemCapabilities.WRITE_FILE.ordinal(); + private static final int CREATE_FILE_MASK = 1 << FileSystemCapabilities.CREATE_FILE.ordinal(); + private static final int DELETE_FILE_MASK = 1 << FileSystemCapabilities.DELETE_FILE.ordinal(); + private static final int READ_DIRECTORY_MASK = 1 << FileSystemCapabilities.READ_DIRECTORY.ordinal(); + private static final int CREATE_DIRECTORY_MASK = 1 << FileSystemCapabilities.CREATE_DIRECTORY.ordinal(); + private static final int DELETE_DIRECTORY_MASK = 1 << FileSystemCapabilities.DELETE_DIRECTORY.ordinal(); private static final String DEFAULT_CONTENT_TYPE = "application/octet-stream"; private static final int TIMEOUT_EXPIRED_SIGNAL_ID = 0; public static final int FILE_CHANGED_SIGNAL_ID = 1; private static final int FLAG_FIN = 0x01; private static final int FLAG_INIT = 0x02; + private static final String DIRECTORY_NAME = "directory"; + private static final String FILE_NAME = "file"; private final BeginFW beginRO = new BeginFW(); private final DataFW dataRO = new DataFW(); @@ -122,6 +136,7 @@ public final class FileSystemServerFactory implements FileSystemStreamFactory private final MutableDirectBuffer extBuffer; private final MutableDirectBuffer errorBuffer; private final MutableDirectBuffer readBuffer; + private final MutableDirectBuffer directoryBuffer; private final LongFunction supplyDebitor; private final LongUnaryOperator supplyReplyId; private final int fileSystemTypeId; @@ -145,6 +160,7 @@ public FileSystemServerFactory( this.extBuffer = new UnsafeBuffer(new byte[writeBuffer.capacity()]); this.readBuffer = new UnsafeBuffer(new byte[writeBuffer.capacity()]); this.errorBuffer = new UnsafeBuffer(new byte[1]); + this.directoryBuffer = new UnsafeBuffer(); this.supplyDebitor = context::supplyDebitor; this.supplyReplyId = context::supplyReplyId; this.fileSystemTypeId = context.supplyTypeId(FileSystemBinding.NAME); @@ -199,10 +215,13 @@ public MessageConsumer newStream( final LinkOption[] symlinks = options.symlinks == IGNORE ? LINK_OPTIONS_NOFOLLOW : LINK_OPTIONS_NONE; final int capabilities = beginEx.capabilities(); + final String relativeDir = beginEx.directory().asString(); + final String resolvedDir = resolvedRoot.resolve(relativeDir != null ? relativeDir : "").getPath(); final String relativePath = beginEx.path().asString(); - final String resolvedPath = resolvedRoot.resolve(relativePath).getPath(); - final Path path = fileSystem.getPath(resolvedPath); + final Path path = fileSystem.getPath(resolvedDir).resolve(relativePath != null ? relativePath : ""); + final String resolvedPath = path.toAbsolutePath().toString(); + final String tag = beginEx.tag().asString(); try { @@ -216,6 +235,7 @@ public MessageConsumer newStream( initialId, type, symlinks, + relativeDir, relativePath, resolvedPath, capabilities, @@ -233,6 +253,7 @@ public MessageConsumer newStream( initialId, type, symlinks, + relativeDir, relativePath, resolvedPath, capabilities, @@ -280,6 +301,7 @@ private final class FileSystemServerReader private final long initialId; private final long replyId; private final String type; + private final String relativeDir; private final String relativePath; private final Path resolvedPath; private final int capabilities; @@ -311,6 +333,7 @@ private FileSystemServerReader( long initialId, String type, LinkOption[] symlinks, + String relativeDir, String relativePath, String resolvedPath, int capabilities, @@ -323,6 +346,7 @@ private FileSystemServerReader( this.replyId = supplyReplyId.applyAsLong(initialId); this.type = type; this.symlinks = symlinks; + this.relativeDir = relativeDir; this.relativePath = relativePath; this.resolvedPath = Paths.get(resolvedPath); this.capabilities = capabilities; @@ -405,7 +429,7 @@ private void onAppBegin( } } - private BasicFileAttributes getAttributes() + private BasicFileAttributes readAttributes() { BasicFileAttributes attributes = null; try @@ -585,21 +609,23 @@ private void doAppBegin( int capabilities) { state = FileSystemState.openingReply(state); - attributes = getAttributes(); - long size = 0L; - if (attributes != null) - { - size = attributes.size(); - } - Flyweight extension = beginExRW + attributes = readAttributes(); + + long size = (capabilities & READ_DIRECTORY_MASK) == 0 && attributes != null + ? attributes.size() + : FileSystemBeginExFW.Builder.DEFAULT_PAYLOAD_SIZE; + + FileSystemBeginExFW extension = beginExRW .wrap(extBuffer, 0, extBuffer.capacity()) .typeId(fileSystemTypeId) .capabilities(capabilities) + .directory(relativeDir) .path(relativePath) .type(type) .payloadSize(size) .tag(tag) .build(); + doBegin(app, originId, routedId, replyId, replySeq, replyAck, replyMax, traceId, 0L, 0L, extension); } @@ -674,57 +700,108 @@ private void flushAppData( if (replyWin > 0) { - InputStream input = getInputStream(); - try { - if (input != null) + if (canReadDirectory(capabilities)) { - input.skip(replyBytes); - } + try (Jsonb jsonb = JsonbBuilder.create(); + Stream list = Files.list(resolvedPath)) + { + String response = jsonb.toJson( + list.map(path -> new FileSystemObject( + path.getFileName().toString(), + Files.isDirectory(path) ? DIRECTORY_NAME : FILE_NAME)) + .toList()); + byte[] responseBytes = response.getBytes(StandardCharsets.UTF_8); + int size = responseBytes.length; + + if (size > 0) + { + directoryBuffer.wrap(responseBytes); - int available = input != null ? input.available() : 0; + int reserved = Math.min(replyWin, size + replyPad); + int length = Math.max(reserved - replyPad, 0); - if (available > 0) + if (length > 0 && replyDebIndex != NO_DEBITOR_INDEX && replyDeb != null) + { + final int minimum = Math.min(bufferPool.slotCapacity(), reserved); + reserved = replyDeb.claim(traceId, replyDebIndex, replyId, minimum, reserved, 0); + length = Math.max(reserved - replyPad, 0); + } + + if (length > 0) + { + OctetsFW payload = payloadRO.wrap(directoryBuffer, 0, size); + + doAppData(traceId, reserved, payload); + + replyBytes += size; + + if (replyBytes == size) + { + replyBytes = 0; + doAppEnd(traceId); + } + } + } + else + { + doAppEnd(traceId); + } + } + } + else { - int reserved = Math.min(replyWin, available + replyPad); - int length = Math.max(reserved - replyPad, 0); + InputStream input = getInputStream(); - if (length > 0 && replyDebIndex != NO_DEBITOR_INDEX && replyDeb != null) + if (input != null) { - final int minimum = Math.min(bufferPool.slotCapacity(), reserved); // TODO: fragmentation - reserved = replyDeb.claim(traceId, replyDebIndex, replyId, minimum, reserved, 0); - length = Math.max(reserved - replyPad, 0); + input.skip(replyBytes); } - if (length > 0) + int available = input != null ? input.available() : 0; + + if (available > 0) { - final byte[] readArray = readBuffer.byteArray(); - int bytesRead = input.read(readArray, 0, Math.min(readArray.length, length)); - if (bytesRead != -1) + int reserved = Math.min(replyWin, available + replyPad); + int length = Math.max(reserved - replyPad, 0); + + if (length > 0 && replyDebIndex != NO_DEBITOR_INDEX && replyDeb != null) { - OctetsFW payload = payloadRO.wrap(readBuffer, 0, bytesRead); + final int minimum = Math.min(bufferPool.slotCapacity(), reserved); // TODO: fragmentation + reserved = replyDeb.claim(traceId, replyDebIndex, replyId, minimum, reserved, 0); + length = Math.max(reserved - replyPad, 0); + } - doAppData(traceId, reserved, payload); + if (length > 0) + { + final byte[] readArray = readBuffer.byteArray(); + int bytesRead = input.read(readArray, 0, Math.min(readArray.length, length)); + if (bytesRead != -1) + { + OctetsFW payload = payloadRO.wrap(readBuffer, 0, bytesRead); - replyBytes += bytesRead; + doAppData(traceId, reserved, payload); - if (replyBytes == attributes.size()) - { - input.close(); - input = null; - replyBytes = 0; + replyBytes += bytesRead; + + if (replyBytes == attributes.size()) + { + input.close(); + input = null; + replyBytes = 0; + } } } } - } - if (available <= 0 || input == null) - { - doAppEnd(traceId); + if (available <= 0 || input == null) + { + doAppEnd(traceId); + } } } - catch (IOException ex) + catch (Exception ex) { doAppAbort(traceId); } @@ -740,6 +817,7 @@ private final class FileSystemServerWriter private final long initialId; private final long replyId; private final String type; + private final String relativeDir; private final String relativePath; private final Path resolvedPath; private final int capabilities; @@ -767,6 +845,7 @@ private FileSystemServerWriter( long initialId, String type, LinkOption[] symlinks, + String relativeDir, String relativePath, String resolvedPath, int capabilities, @@ -779,6 +858,7 @@ private FileSystemServerWriter( this.replyId = supplyReplyId.applyAsLong(initialId); this.type = type; this.symlinks = symlinks; + this.relativeDir = relativeDir; this.relativePath = relativePath; this.resolvedPath = Paths.get(resolvedPath); this.capabilities = capabilities; @@ -841,13 +921,43 @@ private void onAppBegin( state = FileSystemState.openingInitial(state); + FileSystemError error = detectErrorCondition(traceId); + + if (error != null) + { + errorExRW.wrap(errorBuffer, 0, errorBuffer.capacity()).set(error); + + FileSystemResetExFW extension = resetExRW + .wrap(extBuffer, 0, extBuffer.capacity()) + .typeId(fileSystemTypeId) + .error(errorExRW.build()) + .build(); + + doAppReset(traceId, extension); + } + else + { + processOperation(traceId); + } + } + + private FileSystemError detectErrorCondition( + long traceId) + { FileSystemError error = null; - if ((capabilities & CREATE_PAYLOAD_MASK) != 0 && Files.exists(resolvedPath)) + if ((capabilities & CREATE_FILE_MASK) != 0) { - error = FILE_ALREADY_EXISTS; + if (Files.notExists(resolvedPath.getParent())) + { + error = DIRECTORY_NOT_FOUND; + } + else if (Files.exists(resolvedPath)) + { + error = FILE_EXISTS; + } } - else if ((capabilities & WRITE_PAYLOAD_MASK) != 0) + else if ((capabilities & WRITE_FILE_MASK) != 0) { if (Files.notExists(resolvedPath)) { @@ -862,7 +972,7 @@ else if (!validateTag()) error = FILE_MODIFIED; } } - else if ((capabilities & DELETE_PAYLOAD_MASK) != 0) + else if ((capabilities & DELETE_FILE_MASK) != 0) { if (Files.notExists(resolvedPath)) { @@ -873,26 +983,33 @@ else if (tag != null && !validateTag()) { error = FILE_MODIFIED; } + } + else if ((capabilities & CREATE_DIRECTORY_MASK) != 0 && Files.exists(resolvedPath)) + { + error = DIRECTORY_EXISTS; + } + else if ((capabilities & DELETE_DIRECTORY_MASK) != 0) + { + if (Files.notExists(resolvedPath)) + { + error = DIRECTORY_NOT_FOUND; + } else { - delete(traceId); + try (Stream files = Files.list(resolvedPath)) + { + if (files.findAny().isPresent()) + { + error = DIRECTORY_NOT_EMPTY; + } + } + catch (Exception ex) + { + cleanup(traceId); + } } } - - if (error != null) - { - errorExRW.wrap(errorBuffer, 0, errorBuffer.capacity()).set(error); - - FileSystemResetExFW extension = resetExRW - .wrap(extBuffer, 0, extBuffer.capacity()) - .typeId(fileSystemTypeId) - .error(errorExRW.build()) - .build(); - - doAppReset(traceId, extension); - } - - doAppWindow(traceId); + return error; } private void onAppData( @@ -936,7 +1053,7 @@ private void onAppData( { out.close(); - if ((capabilities & WRITE_PAYLOAD_MASK) != 0) + if ((capabilities & WRITE_FILE_MASK) != 0) { Files.move(tmpPath, resolvedPath, REPLACE_EXISTING, ATOMIC_MOVE); } @@ -1056,6 +1173,7 @@ private void doAppBegin( .wrap(extBuffer, 0, extBuffer.capacity()) .typeId(fileSystemTypeId) .capabilities(capabilities) + .directory(relativeDir) .path(relativePath) .tag(tag) .build(); @@ -1199,15 +1317,30 @@ else if (canWritePayload(capabilities, resolvedPath)) return output; } - private void delete( + private void processOperation( long traceId) { try { - Files.delete(resolvedPath); + boolean processed = false; + if ((capabilities & DELETE_FILE_MASK) != 0 || (capabilities & DELETE_DIRECTORY_MASK) != 0) + { + Files.delete(resolvedPath); + processed = true; + } + else if ((capabilities & CREATE_DIRECTORY_MASK) != 0) + { + Files.createDirectory(resolvedPath); + processed = true; + } + doAppWindow(traceId); - doAppBegin(traceId, null); - doAppEnd(traceId); + + if (processed) + { + doAppBegin(traceId, null); + doAppEnd(traceId); + } } catch (IOException ex) { @@ -1391,35 +1524,43 @@ private void doWindow( private boolean canReadPayload( int capabilities) { - return (capabilities & READ_PAYLOAD_MASK) != 0; + return (capabilities & READ_FILE_MASK) != 0; + } + + private boolean canReadDirectory( + int capabilities) + { + return (capabilities & READ_DIRECTORY_MASK) != 0; } private boolean canWritePayload( int capabilities, Path path) { - return (capabilities & WRITE_PAYLOAD_MASK) != 0 && Files.exists(path); + return (capabilities & WRITE_FILE_MASK) != 0 && Files.exists(path); } private boolean canCreatePayload( int capabilities, Path path) { - return (capabilities & CREATE_PAYLOAD_MASK) != 0 && Files.notExists(path); + return (capabilities & CREATE_FILE_MASK) != 0 && Files.notExists(path); } private boolean canDeletePayload( int capabilities, Path path) { - return (capabilities & DELETE_PAYLOAD_MASK) != 0 && Files.exists(path); + return (capabilities & DELETE_FILE_MASK) != 0 && Files.exists(path); } private boolean writeOperation( int capabilities) { - return (capabilities & CREATE_PAYLOAD_MASK) != 0 || - (capabilities & WRITE_PAYLOAD_MASK) != 0 || - (capabilities & DELETE_PAYLOAD_MASK) != 0; + return (capabilities & CREATE_FILE_MASK) != 0 || + (capabilities & WRITE_FILE_MASK) != 0 || + (capabilities & DELETE_FILE_MASK) != 0 || + (capabilities & CREATE_DIRECTORY_MASK) != 0 || + (capabilities & DELETE_DIRECTORY_MASK) != 0; } } diff --git a/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/model/FileSystemObject.java b/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/model/FileSystemObject.java new file mode 100644 index 0000000000..5f21ec4793 --- /dev/null +++ b/runtime/binding-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/filesystem/model/FileSystemObject.java @@ -0,0 +1,29 @@ +/* + * Copyright 2021-2024 Aklivity Inc + * + * Licensed under the Aklivity Community License (the "License"); you may not use + * this file except in compliance with the License. You may obtain a copy of the + * License at + * + * https://www.aklivity.io/aklivity-community-license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package io.aklivity.zilla.runtime.binding.filesystem.model; + +public final class FileSystemObject +{ + public String path; + public String type; + + public FileSystemObject( + String path, + String type) + { + this.path = path; + this.type = type; + } +} diff --git a/runtime/binding-filesystem/src/main/moditect/module-info.java b/runtime/binding-filesystem/src/main/moditect/module-info.java index 76e117c6cd..0f9949f9d4 100644 --- a/runtime/binding-filesystem/src/main/moditect/module-info.java +++ b/runtime/binding-filesystem/src/main/moditect/module-info.java @@ -17,6 +17,7 @@ requires io.aklivity.zilla.runtime.engine; exports io.aklivity.zilla.runtime.binding.filesystem.config; + exports io.aklivity.zilla.runtime.binding.filesystem.model; provides io.aklivity.zilla.runtime.engine.binding.BindingFactorySpi with io.aklivity.zilla.runtime.binding.filesystem.internal.FileSystemBindingFactorySpi; diff --git a/runtime/binding-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerIT.java b/runtime/binding-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerIT.java index f9e47e6cd7..c2e19e1e36 100644 --- a/runtime/binding-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerIT.java +++ b/runtime/binding-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/filesystem/internal/stream/FileSystemServerIT.java @@ -353,4 +353,87 @@ public void shouldRejectDeleteFilePayload() throws Exception { k3po.finish(); } + + @Test + @Configuration("server.yaml") + @Specification({ + "${app}/read.directory/client", + }) + public void shouldReadDirectory() throws Exception + { + Path targetDirectory = Paths.get("target/files").toAbsolutePath(); + Path varDirectory = targetDirectory.resolve("var"); + Files.createDirectories(varDirectory); + Path indexFile = varDirectory.resolve("index.html"); + + Files.createDirectories(targetDirectory); + + Files.write(indexFile, """ + + Welcome + Hello, world + + """.getBytes()); + + k3po.finish(); + + Files.delete(indexFile); + Files.delete(varDirectory); + } + + @Test + @Configuration("server.yaml") + @Specification({ + "${app}/read.directory.empty/client", + }) + public void shouldReadDirectoryEmpty() throws Exception + { + Path targetDirectory = Paths.get("target/files").toAbsolutePath(); + Path varDirectory = targetDirectory.resolve("var"); + Files.createDirectories(varDirectory); + + k3po.finish(); + + Files.delete(varDirectory); + } + + @Test + @Configuration("server.yaml") + @Specification({ + "${app}/read.directory.failed/client", + }) + public void shouldRejectReadDirectory() throws Exception + { + k3po.finish(); + } + + @Test + @Configuration("server.yaml") + @Specification({ + "${app}/create.directory/client", + }) + public void shouldCreateDirectory() throws Exception + { + Path targetDirectory = Paths.get("target/files").toAbsolutePath(); + Path varDirectory = targetDirectory.resolve("var"); + + k3po.finish(); + + Files.delete(varDirectory); + } + + @Test + @Configuration("server.yaml") + @Specification({ + "${app}/delete.directory/client", + }) + public void shouldDeleteDirectory() throws Exception + { + Path targetDirectory = Paths.get("target/files").toAbsolutePath(); + Path varDirectory = targetDirectory.resolve("var"); + + Files.createDirectory(varDirectory); + + k3po.finish(); + } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfig.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfig.java index b75ae7e1f7..f85a3a0c99 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfig.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfig.java @@ -14,15 +14,31 @@ */ package io.aklivity.zilla.runtime.binding.http.filesystem.config; +import java.util.function.Function; + import io.aklivity.zilla.runtime.engine.config.ConditionConfig; public final class HttpFileSystemConditionConfig extends ConditionConfig { public final String path; + public final String method; - public HttpFileSystemConditionConfig( - String path) + HttpFileSystemConditionConfig( + String path, + String method) { this.path = path; + this.method = method; + } + + public static HttpFileSystemConditionConfigBuilder builder() + { + return new HttpFileSystemConditionConfigBuilder<>(HttpFileSystemConditionConfig.class::cast); + } + + public static HttpFileSystemConditionConfigBuilder builder( + Function mapper) + { + return new HttpFileSystemConditionConfigBuilder<>(mapper); } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfigBuilder.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfigBuilder.java new file mode 100644 index 0000000000..b63951fef7 --- /dev/null +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/config/HttpFileSystemConditionConfigBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2021-2024 Aklivity Inc + * + * Licensed under the Aklivity Community License (the "License"); you may not use + * this file except in compliance with the License. You may obtain a copy of the + * License at + * + * https://www.aklivity.io/aklivity-community-license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package io.aklivity.zilla.runtime.binding.http.filesystem.config; + +import java.util.function.Function; + +import io.aklivity.zilla.runtime.engine.config.ConditionConfig; +import io.aklivity.zilla.runtime.engine.config.ConfigBuilder; + +public final class HttpFileSystemConditionConfigBuilder extends ConfigBuilder> +{ + private final Function mapper; + + private String path; + private String method; + + HttpFileSystemConditionConfigBuilder( + Function mapper) + { + this.mapper = mapper; + } + + public HttpFileSystemConditionConfigBuilder path( + String path) + { + this.path = path; + return this; + } + + public HttpFileSystemConditionConfigBuilder method( + String method) + { + this.method = method; + return this; + } + + @Override + @SuppressWarnings("unchecked") + protected Class> thisType() + { + return (Class>) getClass(); + } + + @Override + public T build() + { + return mapper.apply(new HttpFileSystemConditionConfig(path, method)); + } +} diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemBindingConfig.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemBindingConfig.java index 690c95ed56..89f6a349f6 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemBindingConfig.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemBindingConfig.java @@ -27,12 +27,15 @@ public final class HttpFileSystemBindingConfig { - private static final Predicate HEADER_NAME_PATH; + private static final Predicate HEADER_METHOD_NAME; + private static final Predicate HEADER_PATH_NAME; static { + String8FW headerMethod = new String8FW(":method"); String8FW headerPath = new String8FW(":path"); - HEADER_NAME_PATH = h -> headerPath.equals(h.name()); + HEADER_METHOD_NAME = h -> headerMethod.equals(h.name()); + HEADER_PATH_NAME = h -> headerPath.equals(h.name()); } public final long id; @@ -53,10 +56,12 @@ public HttpFileSystemRouteConfig resolve( long authorization, HttpBeginExFW beginEx) { - HttpHeaderFW pathHeader = beginEx != null ? beginEx.headers().matchFirst(HEADER_NAME_PATH) : null; + HttpHeaderFW methodHeader = beginEx != null ? beginEx.headers().matchFirst(HEADER_METHOD_NAME) : null; + String method = methodHeader != null ? methodHeader.value().asString() : null; + HttpHeaderFW pathHeader = beginEx != null ? beginEx.headers().matchFirst(HEADER_PATH_NAME) : null; String path = asPathWithoutQuery(pathHeader); return routes.stream() - .filter(r -> r.authorized(authorization) && r.matches(path)) + .filter(r -> r.authorized(authorization) && r.matches(path, method)) .findFirst() .orElse(null); } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapter.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapter.java index c672d7cb8f..d8ece66ba4 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapter.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapter.java @@ -28,6 +28,7 @@ public final class HttpFileSystemConditionConfigAdapter implements ConditionConfigAdapterSpi, JsonbAdapter { private static final String PATH_NAME = "path"; + private static final String METHOD_NAME = "method"; @Override public String type() @@ -43,6 +44,11 @@ public JsonObject adaptToJson( JsonObjectBuilder object = Json.createObjectBuilder(); + if (httpCondition.method != null) + { + object.add(METHOD_NAME, httpCondition.method); + } + if (httpCondition.path != null) { object.add(PATH_NAME, httpCondition.path); @@ -59,6 +65,13 @@ public ConditionConfig adaptFromJson( ? object.getString(PATH_NAME) : null; - return new HttpFileSystemConditionConfig(path); + String method = object.containsKey(METHOD_NAME) + ? object.getString(METHOD_NAME) + : null; + + return HttpFileSystemConditionConfig.builder() + .path(path) + .method(method) + .build(); } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionMatcher.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionMatcher.java index 3d0a1a8e09..a6a15ed8d1 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionMatcher.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionMatcher.java @@ -22,6 +22,7 @@ public final class HttpFileSystemConditionMatcher { + private final String method; private final Matcher path; private Consumer observer; @@ -29,19 +30,22 @@ public HttpFileSystemConditionMatcher( HttpFileSystemConditionConfig condition) { this.path = condition.path != null ? asMatcher(condition.path) : null; + this.method = condition.method; } public boolean matches( - String path) + String path, + String method) { return matchPath(path) && + matchMethod(method) && observeMatched(); } public String parameter( String name) { - return path.group(name); + return path.namedGroups().containsKey(name) ? path.group(name) : null; } public void observe( @@ -66,6 +70,12 @@ private boolean matchPath( return this.path == null || this.path.reset(path).matches(); } + private boolean matchMethod( + String method) + { + return this.method == null || this.method.equals(method); + } + private static Matcher asMatcher( String wildcard) { diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemRouteConfig.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemRouteConfig.java index fd1e2e9467..8e30d00aab 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemRouteConfig.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemRouteConfig.java @@ -55,8 +55,9 @@ boolean authorized( } boolean matches( - String path) + String path, + String method) { - return when.isEmpty() || path != null && when.stream().anyMatch(m -> m.matches(path)); + return when.isEmpty() || path != null && when.stream().anyMatch(m -> m.matches(path, method)); } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfig.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfig.java index 47bc726374..055f1ec3a7 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfig.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfig.java @@ -14,15 +14,31 @@ */ package io.aklivity.zilla.runtime.binding.http.filesystem.internal.config; +import java.util.function.Function; + import io.aklivity.zilla.runtime.engine.config.WithConfig; public final class HttpFileSystemWithConfig extends WithConfig { + public final String directory; public final String path; - public HttpFileSystemWithConfig( + HttpFileSystemWithConfig( + String directory, String path) { + this.directory = directory; this.path = path; } + + public static HttpFileSystemWithConfigBuilder builder() + { + return new HttpFileSystemWithConfigBuilder<>(HttpFileSystemWithConfig.class::cast); + } + + public static HttpFileSystemWithConfigBuilder builder( + Function mapper) + { + return new HttpFileSystemWithConfigBuilder<>(mapper); + } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapter.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapter.java index ab039929d9..f801454606 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapter.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapter.java @@ -26,6 +26,7 @@ public final class HttpFileSystemWithConfigAdapter implements WithConfigAdapterSpi, JsonbAdapter { private static final String PATH_NAME = "path"; + private static final String DIRECTORY_NAME = "directory"; @Override public String type() @@ -50,8 +51,12 @@ public JsonObject adaptToJson( public WithConfig adaptFromJson( JsonObject object) { - String newPath = object.getString(PATH_NAME); + String directory = object.containsKey(DIRECTORY_NAME) ? object.getString(DIRECTORY_NAME) : null; + String path = object.containsKey(PATH_NAME) ? object.getString(PATH_NAME) : null; - return new HttpFileSystemWithConfig(newPath); + return HttpFileSystemWithConfig.builder() + .directory(directory) + .path(path) + .build(); } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigBuilder.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigBuilder.java new file mode 100644 index 0000000000..0a7094e593 --- /dev/null +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2021-2024 Aklivity Inc + * + * Licensed under the Aklivity Community License (the "License"); you may not use + * this file except in compliance with the License. You may obtain a copy of the + * License at + * + * https://www.aklivity.io/aklivity-community-license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package io.aklivity.zilla.runtime.binding.http.filesystem.internal.config; + +import java.util.function.Function; + +import io.aklivity.zilla.runtime.engine.config.ConfigBuilder; +import io.aklivity.zilla.runtime.engine.config.WithConfig; + +public final class HttpFileSystemWithConfigBuilder extends ConfigBuilder> +{ + private final Function mapper; + + private String directory; + private String path; + + HttpFileSystemWithConfigBuilder( + Function mapper) + { + this.mapper = mapper; + } + + public HttpFileSystemWithConfigBuilder directory( + String directory) + { + this.directory = directory; + return this; + } + + public HttpFileSystemWithConfigBuilder path( + String path) + { + this.path = path; + return this; + } + + @Override + @SuppressWarnings("unchecked") + protected Class> thisType() + { + return (Class>) getClass(); + } + + @Override + public T build() + { + return mapper.apply(new HttpFileSystemWithConfig(directory, path)); + } +} diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResolver.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResolver.java index e765c96b94..54d47ecca5 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResolver.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResolver.java @@ -14,11 +14,14 @@ */ package io.aklivity.zilla.runtime.binding.http.filesystem.internal.config; -import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.CREATE_PAYLOAD; -import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.DELETE_PAYLOAD; -import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.READ_EXTENSION; -import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.READ_PAYLOAD; -import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.WRITE_PAYLOAD; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.CREATE_DIRECTORY; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.CREATE_FILE; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.DELETE_DIRECTORY; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.DELETE_FILE; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.READ_DIRECTORY; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.READ_FILE; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.READ_METADATA; +import static io.aklivity.zilla.runtime.binding.http.filesystem.internal.types.FileSystemCapabilities.WRITE_FILE; import java.util.concurrent.TimeUnit; import java.util.function.Function; @@ -33,11 +36,14 @@ public final class HttpFileSystemWithResolver { - public static final int HEADER_METHOD_MASK_HEAD = 1 << READ_EXTENSION.ordinal(); - private static final int HEADER_METHOD_MASK_GET = 1 << READ_PAYLOAD.ordinal() | 1 << READ_EXTENSION.ordinal(); - public static final int HEADER_METHOD_MASK_POST = 1 << CREATE_PAYLOAD.ordinal(); - public static final int HEADER_METHOD_MASK_PUT = 1 << WRITE_PAYLOAD.ordinal(); - public static final int HEADER_METHOD_MASK_DELETE = 1 << DELETE_PAYLOAD.ordinal(); + private static final int HEADER_METHOD_MASK_HEAD = 1 << READ_METADATA.ordinal(); + private static final int HEADER_METHOD_MASK_GET = 1 << READ_FILE.ordinal() | 1 << READ_METADATA.ordinal(); + private static final int HEADER_METHOD_MASK_POST = 1 << CREATE_FILE.ordinal(); + private static final int HEADER_METHOD_MASK_PUT = 1 << WRITE_FILE.ordinal(); + private static final int HEADER_METHOD_MASK_DELETE = 1 << DELETE_FILE.ordinal(); + private static final int HEADER_METHOD_MASK_POST_DIRECTORY = 1 << CREATE_DIRECTORY.ordinal(); + private static final int HEADER_METHOD_MASK_DELETE_DIRECTORY = 1 << DELETE_DIRECTORY.ordinal(); + private static final int HEADER_METHOD_MASK_GET_DIRECTORY = 1 << READ_DIRECTORY.ordinal(); private static final Pattern PARAMS_PATTERN = Pattern.compile("\\$\\{params\\.([a-zA-Z_]+)\\}"); private static final Pattern PREFER_WAIT_PATTERN = Pattern.compile("wait=(\\d+)"); @@ -69,23 +75,68 @@ public HttpFileSystemWithResolver( public void onConditionMatched( HttpFileSystemConditionMatcher condition) { - this.replacer = r -> condition.parameter(r.group(1)); + this.replacer = r -> + { + String replacement = condition.parameter(r.group(1)); + return replacement != null ? replacement : ""; + }; } public HttpFileSystemWithResult resolve( HttpBeginExFW httpBeginEx) { - // TODO: hoist to constructor if constant String path0 = with.path; - Matcher pathMatcher = paramsMatcher.reset(with.path); - if (pathMatcher.matches()) + if (path0 != null) { - path0 = pathMatcher.replaceAll(replacer); + Matcher pathMatcher = paramsMatcher.reset(with.path); + if (pathMatcher.matches()) + { + path0 = pathMatcher.replaceAll(replacer); + } } + boolean isDir = path0 == null || path0.isEmpty() || path0.endsWith("/"); String16FW path = new String16FW(path0); + + String directory0 = with.directory; + if (directory0 != null) + { + Matcher directoryMatcher = paramsMatcher.reset(with.directory); + if (directoryMatcher.matches()) + { + directory0 = directoryMatcher.replaceAll(replacer); + } + } + String16FW directory = new String16FW(directory0); + String16FW etag = new String16FW(""); HttpHeaderFW method = httpBeginEx.headers().matchFirst(h -> HEADER_METHOD_NAME.equals(h.name())); + int capabilities = getCapabilities(method, isDir); + HttpHeaderFW tag = httpBeginEx.headers().matchFirst(h -> + HEADER_IF_MATCH_NAME.equals(h.name()) || HEADER_IF_NONE_MATCH_NAME.equals(h.name())); + if (tag != null) + { + String16FW value = tag.value(); + etag = etagRO.wrap(value.buffer(), value.offset(), value.limit()); + } + + HttpHeaderFW prefer = httpBeginEx.headers().matchFirst(h -> HEADER_PREFER_NAME.equals(h.name())); + int wait = 0; + if (prefer != null) + { + Matcher waitMatcher = preferWaitMatcher.reset(prefer.value().asString()); + if (waitMatcher.find()) + { + wait = Integer.parseInt(waitMatcher.group(1)); + } + } + return new HttpFileSystemWithResult(directory, path, capabilities, etag, TimeUnit.SECONDS.toMillis(wait)); + } + + private static int getCapabilities( + HttpHeaderFW method, + boolean isDir) + { int capabilities = 0; if (method != null) { @@ -95,11 +146,25 @@ public HttpFileSystemWithResult resolve( } else if (HEADER_METHOD_VALUE_GET.equals(method.value())) { - capabilities = HEADER_METHOD_MASK_GET; + if (isDir) + { + capabilities = HEADER_METHOD_MASK_GET_DIRECTORY; + } + else + { + capabilities = HEADER_METHOD_MASK_GET; + } } else if (HEADER_METHOD_VALUE_POST.equals(method.value())) { - capabilities = HEADER_METHOD_MASK_POST; + if (isDir) + { + capabilities = HEADER_METHOD_MASK_POST_DIRECTORY; + } + else + { + capabilities = HEADER_METHOD_MASK_POST; + } } else if (HEADER_METHOD_VALUE_PUT.equals(method.value())) { @@ -107,27 +172,16 @@ else if (HEADER_METHOD_VALUE_PUT.equals(method.value())) } else if (HEADER_METHOD_VALUE_DELETE.equals(method.value())) { - capabilities = HEADER_METHOD_MASK_DELETE; - } - } - HttpHeaderFW tag = httpBeginEx.headers().matchFirst(h -> - HEADER_IF_MATCH_NAME.equals(h.name()) || HEADER_IF_NONE_MATCH_NAME.equals(h.name())); - if (tag != null) - { - String16FW value = tag.value(); - etag = etagRO.wrap(value.buffer(), value.offset(), value.limit()); - } - - HttpHeaderFW prefer = httpBeginEx.headers().matchFirst(h -> HEADER_PREFER_NAME.equals(h.name())); - int wait = 0; - if (prefer != null) - { - Matcher waitMatcher = preferWaitMatcher.reset(prefer.value().asString()); - if (waitMatcher.find()) - { - wait = Integer.parseInt(waitMatcher.group(1)); + if (isDir) + { + capabilities = HEADER_METHOD_MASK_DELETE_DIRECTORY; + } + else + { + capabilities = HEADER_METHOD_MASK_DELETE; + } } } - return new HttpFileSystemWithResult(path, capabilities, etag, TimeUnit.SECONDS.toMillis(wait)); + return capabilities; } } diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResult.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResult.java index 6181705582..dec5f3e9f6 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResult.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithResult.java @@ -18,23 +18,31 @@ public class HttpFileSystemWithResult { + private final String16FW directory; private final String16FW path; private final int capabilities; private final String16FW tag; private final long timeout; HttpFileSystemWithResult( + String16FW directory, String16FW path, int capabilities, String16FW tag, long timeout) { + this.directory = directory; this.path = path; this.capabilities = capabilities; this.tag = tag; this.timeout = timeout; } + public String16FW directory() + { + return directory; + } + public String16FW path() { return path; diff --git a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyFactory.java b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyFactory.java index b10ad0dcc6..50d779f653 100644 --- a/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyFactory.java +++ b/runtime/binding-http-filesystem/src/main/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyFactory.java @@ -68,10 +68,13 @@ public final class HttpFileSystemProxyFactory implements HttpFileSystemStreamFac private static final String8FW HEADER_CONTENT_TYPE_NAME = new String8FW("content-type"); private static final String8FW HEADER_CONTENT_LENGTH_NAME = new String8FW("content-length"); private static final OctetsFW EMPTY_EXTENSION = new OctetsFW().wrap(new UnsafeBuffer(new byte[0]), 0, 0); - private static final int READ_PAYLOAD_MASK = 1 << FileSystemCapabilities.READ_PAYLOAD.ordinal(); - private static final int WRITE_PAYLOAD_MASK = 1 << FileSystemCapabilities.WRITE_PAYLOAD.ordinal(); - private static final int CREATE_PAYLOAD_MASK = 1 << FileSystemCapabilities.CREATE_PAYLOAD.ordinal(); - private static final int DELETE_PAYLOAD_MASK = 1 << FileSystemCapabilities.DELETE_PAYLOAD.ordinal(); + private static final int READ_FILE_MASK = 1 << FileSystemCapabilities.READ_FILE.ordinal(); + private static final int WRITE_FILE_MASK = 1 << FileSystemCapabilities.WRITE_FILE.ordinal(); + private static final int CREATE_FILE_MASK = 1 << FileSystemCapabilities.CREATE_FILE.ordinal(); + private static final int DELETE_FILE_MASK = 1 << FileSystemCapabilities.DELETE_FILE.ordinal(); + private static final int CREATE_DIRECTORY_MASK = 1 << FileSystemCapabilities.CREATE_DIRECTORY.ordinal(); + private static final int DELETE_DIRECTORY_MASK = 1 << FileSystemCapabilities.DELETE_DIRECTORY.ordinal(); + private static final int READ_DIRECTORY_MASK = 1 << FileSystemCapabilities.READ_DIRECTORY.ordinal(); private static final Predicate SUPPORTED_HTTP_METHOD; @@ -545,7 +548,9 @@ private void doHttpReset( FileSystemError errorMessage = error.get(); switch (errorMessage) { - case FILE_ALREADY_EXISTS: + case FILE_EXISTS: + case DIRECTORY_EXISTS: + case DIRECTORY_NOT_EMPTY: httpStatus = HEADER_STATUS_VALUE_409; break; case FILE_MODIFIED: @@ -741,28 +746,31 @@ private void onFileSystemBegin( final boolean validTag = tag != null ? tag.length() != -1 && tag.asString() != null : false; int capabilities = fsBeginEx.capabilities(); - if (createOrWritePayload(capabilities) && validTag) - { - httpBeginExBuilder.headersItem(h -> h.name(HEADER_STATUS_NAME).value(HEADER_STATUS_VALUE_204)) - .headersItem(h -> h.name(HEADER_ETAG_NAME).value(tag)) - .headersItem(h -> h.name(HEADER_CONTENT_LENGTH_NAME).value("0")); - } - else if ((capabilities & DELETE_PAYLOAD_MASK) != 0) + if (writeOperation(capabilities)) { httpBeginExBuilder.headersItem(h -> h.name(HEADER_STATUS_NAME).value(HEADER_STATUS_VALUE_204)) .headersItem(h -> h.name(HEADER_CONTENT_LENGTH_NAME).value("0")); } else { - httpBeginExBuilder.headersItem(h -> h.name(HEADER_STATUS_NAME).value(getStatus(fsBeginEx))) - .headersItem(h -> h.name(HEADER_CONTENT_TYPE_NAME).value(type)) - .headersItem(h -> h.name(HEADER_CONTENT_LENGTH_NAME).value(length)); + httpBeginExBuilder.headersItem(h -> h.name(HEADER_STATUS_NAME).value(getStatus(fsBeginEx))); - if (validTag) + if (type.length() != -1) { - httpBeginExBuilder.headersItem(h -> h.name(HEADER_ETAG_NAME).value(tag)); + httpBeginExBuilder.headersItem(h -> h.name(HEADER_CONTENT_TYPE_NAME).value(type)); + } + + if (Integer.parseInt(length) != -1) + { + httpBeginExBuilder.headersItem(h -> h.name(HEADER_CONTENT_LENGTH_NAME).value(length)); } } + + if (validTag) + { + httpBeginExBuilder.headersItem(h -> h.name(HEADER_ETAG_NAME).value(tag)); + } + httpBeginEx = httpBeginExBuilder.build(); } @@ -782,13 +790,23 @@ private String16FW getStatus( private boolean canReadPayload( int capabilities) { - return (capabilities & READ_PAYLOAD_MASK) != 0; + return (capabilities & READ_FILE_MASK) != 0; } private boolean createOrWritePayload( int capabilities) { - return (capabilities & CREATE_PAYLOAD_MASK) != 0 || (capabilities & WRITE_PAYLOAD_MASK) != 0; + return (capabilities & CREATE_FILE_MASK) != 0 || (capabilities & WRITE_FILE_MASK) != 0; + } + + private boolean writeOperation( + int capabilities) + { + return (capabilities & CREATE_FILE_MASK) != 0 || + (capabilities & WRITE_FILE_MASK) != 0 || + (capabilities & DELETE_FILE_MASK) != 0 || + (capabilities & CREATE_DIRECTORY_MASK) != 0 || + (capabilities & DELETE_DIRECTORY_MASK) != 0; } private void onFileSystemData( @@ -1109,6 +1127,7 @@ private MessageConsumer newFileSystemStream( fsBeginExRW.wrap(writeBuffer, BeginFW.FIELD_OFFSET_EXTENSION, writeBuffer.capacity()) .typeId(fsTypeId) .capabilities(resolved.capabilities()) + .directory(resolved.directory()) .path(resolved.path()) .tag(resolved.tag()) .timeout(resolved.timeout()) diff --git a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapterTest.java b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapterTest.java index e20de24fd9..965f700680 100644 --- a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapterTest.java +++ b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemConditionConfigAdapterTest.java @@ -57,7 +57,9 @@ public void shouldReadCondition() @Test public void shouldWriteCondition() { - HttpFileSystemConditionConfig condition = new HttpFileSystemConditionConfig("/test"); + HttpFileSystemConditionConfig condition = HttpFileSystemConditionConfig.builder() + .path("/test") + .build(); String text = jsonb.toJson(condition); diff --git a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapterTest.java b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapterTest.java index 8f53d1f33b..412f7ea85f 100644 --- a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapterTest.java +++ b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/config/HttpFileSystemWithConfigAdapterTest.java @@ -55,7 +55,7 @@ public void shouldReadWithTopic() @Test public void shouldWriteWithTopic() { - HttpFileSystemWithConfig with = new HttpFileSystemWithConfig("test"); + HttpFileSystemWithConfig with = HttpFileSystemWithConfig.builder().path("test").build(); String text = jsonb.toJson(with); diff --git a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyIT.java b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyIT.java index ae8ca7ba1d..293e4c3180 100644 --- a/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyIT.java +++ b/runtime/binding-http-filesystem/src/test/java/io/aklivity/zilla/runtime/binding/http/filesystem/internal/stream/HttpFileSystemProxyIT.java @@ -254,4 +254,14 @@ public void shouldRejectClientDeleteNonExistentFile() throws Exception { k3po.finish(); } + + @Test + @Configuration("proxy.with.directory.dynamic.yaml") + @Specification({ + "${http}/client.read.directory/client", + "${filesystem}/client.read.directory/server"}) + public void shouldReceiveClientReadDirectory() throws Exception + { + k3po.finish(); + } } diff --git a/specs/binding-filesystem.spec/src/main/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctions.java b/specs/binding-filesystem.spec/src/main/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctions.java index 0aefa37ac4..aa68293443 100644 --- a/specs/binding-filesystem.spec/src/main/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctions.java +++ b/specs/binding-filesystem.spec/src/main/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctions.java @@ -84,6 +84,13 @@ public FileSystemBeginExBuilder capabilities( return this; } + public FileSystemBeginExBuilder directory( + String directory) + { + beginExRW.directory(directory); + return this; + } + public FileSystemBeginExBuilder path( String path) { @@ -137,6 +144,7 @@ public static final class FileSystemBeginExMatcherBuilder private Integer typeId; private Integer capabilities; private String path; + private String directory; private String type; private Long payloadSize; private Long modifiedTime; @@ -161,6 +169,13 @@ public FileSystemBeginExMatcherBuilder capabilities( return this; } + public FileSystemBeginExMatcherBuilder directory( + String directory) + { + this.directory = directory; + return this; + } + public FileSystemBeginExMatcherBuilder path( String path) { @@ -215,6 +230,7 @@ private FileSystemBeginExFW match( if (beginEx != null && matchTypeId(beginEx) && matchCapabilities(beginEx) && + matchDirectory(beginEx) && matchPath(beginEx) && matchType(beginEx) && matchPayloadSize(beginEx) && @@ -246,6 +262,12 @@ private boolean matchPayloadSize( return payloadSize == null || payloadSize == beginEx.payloadSize(); } + private boolean matchDirectory( + FileSystemBeginExFW beginEx) + { + return directory == null || directory.equals(beginEx.directory().asString()); + } + private boolean matchPath( FileSystemBeginExFW beginEx) { diff --git a/specs/binding-filesystem.spec/src/main/resources/META-INF/zilla/filesystem.idl b/specs/binding-filesystem.spec/src/main/resources/META-INF/zilla/filesystem.idl index 92552c2e5a..abb5e7182a 100644 --- a/specs/binding-filesystem.spec/src/main/resources/META-INF/zilla/filesystem.idl +++ b/specs/binding-filesystem.spec/src/main/resources/META-INF/zilla/filesystem.idl @@ -16,12 +16,15 @@ scope filesystem { enum FileSystemCapabilities { - READ_PAYLOAD, - READ_EXTENSION, - READ_CHANGES, - CREATE_PAYLOAD, - WRITE_PAYLOAD, - DELETE_PAYLOAD + CREATE_DIRECTORY, + CREATE_FILE, + DELETE_DIRECTORY, + DELETE_FILE, + READ_DIRECTORY, + READ_FILE, + READ_FILE_CHANGES, + READ_METADATA, + WRITE_FILE } scope stream @@ -29,17 +32,21 @@ scope filesystem enum FileSystemError { FILE_NOT_FOUND, - FILE_ALREADY_EXISTS, + FILE_EXISTS, FILE_MODIFIED, - FILE_TAG_MISSING + FILE_TAG_MISSING, + DIRECTORY_EXISTS, + DIRECTORY_NOT_FOUND, + DIRECTORY_NOT_EMPTY } struct FileSystemBeginEx extends core::stream::Extension { int32 capabilities = 3; - string16 path; + string16 directory = null; + string16 path = null; string16 type = null; - int64 payloadSize = 0; + int64 payloadSize = -1; string16 tag = null; int64 timeout = 0; } diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/client.rpt index 31a8738ec4..e60e27a39e 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .build()} connected diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/server.rpt index f4c726c3f1..ce4784111b 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.abort/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .build()} connected diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/client.rpt index a246c86472..ee44bbaa2c 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(1000) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/server.rpt index 3233669107..f3409dcc8d 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.begin.not.modified/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(1000) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.file.not.found/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.file.not.found/client.rpt index 0c476e8551..bf73aa0d54 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.file.not.found/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.read.file.not.found/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("not_there.html") .build()} connect aborted diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/client.rpt index c803ee7b38..6baf74bfed 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/server.rpt index b703cdbc32..651c51cea2 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/client.write.abort/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/client.rpt new file mode 100644 index 0000000000..aec57867fc --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/client.rpt @@ -0,0 +1,37 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("CREATE_DIRECTORY") + .directory("var") + .build()} +connected + +write flush + +write close + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("CREATE_DIRECTORY") + .directory("var") + .build()} + +read closed diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/server.rpt new file mode 100644 index 0000000000..17aaf3568c --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.directory/server.rpt @@ -0,0 +1,38 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("CREATE_DIRECTORY") + .directory("var") + .build()} +connected + +read closed + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("CREATE_DIRECTORY") + .directory("var") + .build()} + +write flush + +write close diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/client.rpt index d89504515a..728560b71a 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) @@ -36,7 +36,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index_write.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .build()} diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/server.rpt index dcde111481..5d9720a6b3 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/create.file.payload/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) @@ -36,7 +36,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index_write.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .build()} diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/client.rpt new file mode 100644 index 0000000000..2643cd350e --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/client.rpt @@ -0,0 +1,35 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("DELETE_DIRECTORY") + .directory("var") + .build()} +connected + +write close + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("DELETE_DIRECTORY") + .directory("var") + .build()} + +read closed diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/server.rpt new file mode 100644 index 0000000000..897e025fb4 --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.directory/server.rpt @@ -0,0 +1,38 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("DELETE_DIRECTORY") + .directory("var") + .build()} +connected + +read closed + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("DELETE_DIRECTORY") + .directory("var") + .build()} + +write flush + +write close diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload.failed/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload.failed/client.rpt index bdcba4d477..872aa63aef 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload.failed/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload.failed/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("error.html") .build()} connect aborted diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/client.rpt index cb15ded6c1..93e6b9979e 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("error.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("error.html") .build()} diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/server.rpt index 4e68418642..a7178e5248 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/delete.file.payload/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("error.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("error.html") .build()} diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/client.rpt new file mode 100644 index 0000000000..caa0bd36d1 --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/client.rpt @@ -0,0 +1,37 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +write close + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} + +read '[]' + +read closed diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/server.rpt new file mode 100644 index 0000000000..0837859c4d --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.empty/server.rpt @@ -0,0 +1,40 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +read closed + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +write flush + +write '[]' +write flush + +write close diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/client.rpt new file mode 100644 index 0000000000..b2e1d3f5ae --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/client.rpt @@ -0,0 +1,25 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var/www") + .build()} +connect aborted diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/server.rpt new file mode 100644 index 0000000000..67d4f2732e --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory.failed/server.rpt @@ -0,0 +1,19 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +rejected diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/client.rpt new file mode 100644 index 0000000000..5b89cd4aae --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/client.rpt @@ -0,0 +1,37 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +write close + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} + +read '[{"path":"index.html","type":"file"}]' + +read closed diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/server.rpt new file mode 100644 index 0000000000..e9f11a2634 --- /dev/null +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.directory/server.rpt @@ -0,0 +1,40 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +read closed + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +write flush + +write '[{"path":"index.html","type":"file"}]' +write flush + +write close diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/client.rpt index 8b837adeea..87460ae8e8 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("script.js.map") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("script.js.map") .type("application/octet-stream") .payloadSize(3) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/server.rpt index 849d68eeac..455b63031c 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension.default/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("script.js.map") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("script.js.map") .type("application/octet-stream") .payloadSize(3) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/client.rpt index 409236670e..101cef18cf 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/server.rpt index 45b596b083..742ec435ca 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.extension/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/client.rpt index 1abd04b690..ec641b373a 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("empty.txt") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("empty.txt") .type("text/plain") .payloadSize(0) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/server.rpt index 8322f28cfd..33e864b7f9 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.empty/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("empty.txt") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("empty.txt") .type("text/plain") .payloadSize(0) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/client.rpt index 4033795b5e..3e337a8bb8 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/server.rpt index 354e8e2b2e..9a731eb70b 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.extension/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/client.rpt index 5da2f6d6cc..5fca1fae78 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink_changes.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(600000) @@ -31,7 +31,7 @@ write notify CONNECTED read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink_changes.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/server.rpt index 89992b5355..21b18c2bd5 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlink.changes/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -31,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/client.rpt index 41d40f9699..b55e674d71 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -31,7 +31,7 @@ write notify CONNECTED read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/server.rpt index 89992b5355..21b18c2bd5 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.follow.symlinks/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -31,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify_symlink.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/client.rpt index 6e319fb5e8..3142494cea 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -32,7 +32,7 @@ write notify CONNECTED1 read await FILE_MODIFIED read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) @@ -52,7 +52,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -65,7 +65,7 @@ write notify CONNECTED2 read await FILE_MODIFIED read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/server.rpt index 93d397433d..f383cc90d4 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified.multi.client/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -32,7 +32,7 @@ read closed write notify FILE_MODIFIED write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) @@ -52,7 +52,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -64,7 +64,7 @@ read closed write notify FILE_MODIFIED write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/client.rpt index 6ba8bf750e..7f76cd7126 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -31,7 +31,7 @@ write notify CONNECTED read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/server.rpt index 0d548b9274..545b8a7bbf 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.modified/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .tag("f2c912a30f38a124c3249f8e802e0d90") .timeout(60000) @@ -31,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index_modify.html") .type("text/html") .payloadSize(74) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/client.rpt index f75c4c2d80..cb53543313 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .tag("INIT") .timeout(60000) @@ -30,7 +30,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/server.rpt index 314ae478bf..55655e149f 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload.tag.not.matched/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .tag("INIT") .timeout(60000) @@ -32,7 +32,7 @@ read closed write notify FILE_MODIFIED write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/client.rpt index df44ef1223..c16923fa6b 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/server.rpt index 01bfedeaa0..8eabc06af7 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/read.file.payload/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/client.rpt index 4ec9492625..02cc1722f4 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/server.rpt index bb4fc7a573..5825d67279 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.interrupt/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified.abort/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified.abort/client.rpt index 5629cebb52..26cf936c93 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified.abort/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified.abort/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/client.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/client.rpt index 23def1fa23..393c7d36ee 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/client.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/app0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) @@ -37,7 +37,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .tag("c3ce2fda552e43985939a773852f45d1") .build()} diff --git a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/server.rpt b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/server.rpt index d849c8305e..b86f3797a3 100644 --- a/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/server.rpt +++ b/specs/binding-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/filesystem/streams/application/write.file.payload.modified/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .type("text/html") .payloadSize(77) @@ -37,7 +37,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index_write.html") .tag("c3ce2fda552e43985939a773852f45d1") .build()} diff --git a/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctionsTest.java b/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctionsTest.java index a983bdf236..77db2eba49 100644 --- a/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctionsTest.java +++ b/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/internal/FileSystemFunctionsTest.java @@ -14,8 +14,8 @@ */ package io.aklivity.zilla.specs.binding.filesystem.internal; -import static io.aklivity.zilla.specs.binding.filesystem.internal.types.FileSystemCapabilities.READ_EXTENSION; -import static io.aklivity.zilla.specs.binding.filesystem.internal.types.FileSystemCapabilities.READ_PAYLOAD; +import static io.aklivity.zilla.specs.binding.filesystem.internal.types.FileSystemCapabilities.READ_FILE; +import static io.aklivity.zilla.specs.binding.filesystem.internal.types.FileSystemCapabilities.READ_METADATA; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -56,7 +56,8 @@ public void shouldGenerateBeginExtension() { byte[] build = FileSystemFunctions.beginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") + .directory("var/www") .path("index.html") .type("text/html") .payloadSize(77L) @@ -69,7 +70,8 @@ public void shouldGenerateBeginExtension() assertEquals(0x01, beginEx.typeId()); assertEquals("index.html", beginEx.path().asString()); - assertEquals(1 << READ_PAYLOAD.ordinal(), beginEx.capabilities()); + assertEquals("var/www", beginEx.directory().asString()); + assertEquals(1 << READ_FILE.ordinal(), beginEx.capabilities()); assertEquals(77L, beginEx.payloadSize()); } @@ -78,7 +80,8 @@ public void shouldMatchBeginExtension() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") + .directory("var/www") .path("index.html") .type("text/html") .payloadSize(77L) @@ -90,7 +93,8 @@ public void shouldMatchBeginExtension() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) + .directory("var/www") .path("index.html") .type("text/html") .payloadSize(77L) @@ -112,7 +116,7 @@ public void shouldMatchBeginExtensionWhenUnconstrained() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -127,7 +131,7 @@ public void shouldMatchBeginExtensionWhenUnconstrained() throws Exception public void shouldNotMatchBeginExtensionWhenTypeIdMissing() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .tag("AAAAAAAAAAAAAAAA") @@ -138,7 +142,7 @@ public void shouldNotMatchBeginExtensionWhenTypeIdMissing() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -154,7 +158,7 @@ public void shouldNotMatchBeginExtensionWhenTypeIdDiffers() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .tag("AAAAAAAAAAAAAAAA") @@ -165,7 +169,7 @@ public void shouldNotMatchBeginExtensionWhenTypeIdDiffers() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x02) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -181,7 +185,7 @@ public void shouldNotMatchBeginExtensionWhenCapabilitiesDiffer() throws Exceptio { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77L) @@ -193,7 +197,7 @@ public void shouldNotMatchBeginExtensionWhenCapabilitiesDiffer() throws Exceptio new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_EXTENSION.ordinal()) + .capabilities(1 << READ_METADATA.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -209,7 +213,7 @@ public void shouldNotMatchBeginExtensionWhenPathDiffers() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.json") .type("text/html") .payloadSize(77L) @@ -221,7 +225,37 @@ public void shouldNotMatchBeginExtensionWhenPathDiffers() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) + .path("index.html") + .type("text/html") + .payloadSize(77L) + .tag("AAAAAAAAAAAAAAAA") + .timeout(60) + .build(); + + matcher.match(byteBuf); + } + + @Test(expected = Exception.class) + public void shouldNotMatchBeginExtensionWhenDirectoryDiffers() throws Exception + { + BytesMatcher matcher = FileSystemFunctions.matchBeginEx() + .typeId(0x01) + .capabilities("READ_FILE") + .directory("var/www") + .path("index.json") + .type("text/html") + .payloadSize(77L) + .tag("AAAAAAAAAAAAAAAA") + .timeout(60) + .build(); + + ByteBuffer byteBuf = ByteBuffer.allocate(1024); + + new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) + .typeId(0x01) + .capabilities(1 << READ_FILE.ordinal()) + .directory("var/www/tmp") .path("index.html") .type("text/html") .payloadSize(77L) @@ -237,7 +271,7 @@ public void shouldNotMatchBeginExtensionWhenTypeDiffers() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("application/json") .payloadSize(77L) @@ -247,7 +281,7 @@ public void shouldNotMatchBeginExtensionWhenTypeDiffers() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -263,7 +297,7 @@ public void shouldNotMatchBeginExtensionWhenTagDiffers() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77L) @@ -274,7 +308,7 @@ public void shouldNotMatchBeginExtensionWhenTagDiffers() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -290,7 +324,7 @@ public void shouldNotMatchBeginExtensionWhenTimeoutDiffers() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77L) @@ -301,7 +335,7 @@ public void shouldNotMatchBeginExtensionWhenTimeoutDiffers() throws Exception new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(77L) @@ -317,7 +351,7 @@ public void shouldNotMatchBeginExtensionWhenPayloadSizeDiffers() throws Exceptio { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77L) @@ -329,7 +363,7 @@ public void shouldNotMatchBeginExtensionWhenPayloadSizeDiffers() throws Exceptio new FileSystemBeginExFW.Builder().wrap(new UnsafeBuffer(byteBuf), 0, byteBuf.capacity()) .typeId(0x01) - .capabilities(1 << READ_PAYLOAD.ordinal()) + .capabilities(1 << READ_FILE.ordinal()) .path("index.html") .type("text/html") .payloadSize(76L) @@ -345,7 +379,7 @@ public void shouldNotMatchBeginExtensionWhenBufferOverflow() throws Exception { BytesMatcher matcher = FileSystemFunctions.matchBeginEx() .typeId(0x01) - .capabilities("READ_PAYLOAD") + .capabilities("READ_FILE") .path("index.html") .type("text/html") .payloadSize(77L) diff --git a/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/streams/application/FileSystemIT.java b/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/streams/application/FileSystemIT.java index 93e9443973..c4a986a92c 100644 --- a/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/streams/application/FileSystemIT.java +++ b/specs/binding-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/filesystem/streams/application/FileSystemIT.java @@ -225,4 +225,54 @@ public void shouldDeleteFilePayloadFailed() throws Exception { k3po.finish(); } + + @Test + @Specification({ + "${app}/read.directory/client", + "${app}/read.directory/server", + }) + public void shouldReadDirectory() throws Exception + { + k3po.finish(); + } + + @Test + @Specification({ + "${app}/read.directory.empty/client", + "${app}/read.directory.empty/server", + }) + public void shouldReadDirectoryEmpty() throws Exception + { + k3po.finish(); + } + + @Test + @Specification({ + "${app}/read.directory.failed/client", + "${app}/read.directory.failed/server", + }) + public void shouldRejectReadDirectory() throws Exception + { + k3po.finish(); + } + + @Test + @Specification({ + "${app}/create.directory/client", + "${app}/create.directory/server", + }) + public void shouldCreateDirectory() throws Exception + { + k3po.finish(); + } + + @Test + @Specification({ + "${app}/delete.directory/client", + "${app}/delete.directory/server", + }) + public void shouldDeleteDirectory() throws Exception + { + k3po.finish(); + } } diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/config/proxy.with.directory.dynamic.yaml b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/config/proxy.with.directory.dynamic.yaml new file mode 100644 index 0000000000..b1031b2730 --- /dev/null +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/config/proxy.with.directory.dynamic.yaml @@ -0,0 +1,27 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +--- +name: test +bindings: + http0: + type: http-filesystem + kind: proxy + routes: + - exit: filesystem0 + when: + - path: /storage/{directory} + with: + directory: ${params.directory} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/schema/http.filesystem.schema.patch.json b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/schema/http.filesystem.schema.patch.json index 15351b15fa..41897310ba 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/schema/http.filesystem.schema.patch.json +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/schema/http.filesystem.schema.patch.json @@ -52,6 +52,18 @@ "type": "object", "properties": { + "method": + { + "type": "string", + "enum": + [ + "GET", + "PUT", + "POST", + "DELETE", + "HEAD" + ] + }, "path": { "title": "Path", @@ -67,14 +79,37 @@ { "path": { - "title": "Topic", + "title": "Path", + "type": "string" + }, + "directory": + { + "title": "Directory", "type": "string" } }, "additionalProperties": false, - "required": + "anyOf": [ - "path" + { + "required": + [ + "path" + ] + }, + { + "required": + [ + "directory" + ] + }, + { + "required": + [ + "path", + "directory" + ] + } ] } } diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/client.rpt index 00ecd03acf..1c83151ba0 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/client.rpt @@ -19,14 +19,14 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .build()} connected read zilla:reset.ext ${filesystem:resetEx() .typeId(zilla:id("filesystem")) - .error("FILE_ALREADY_EXISTS") + .error("FILE_EXISTS") .build()} write aborted diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/server.rpt index 788bbdfa6f..2ef663ed40 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.existing.file.failed/server.rpt @@ -20,14 +20,14 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .build()} connected write zilla:reset.ext ${filesystem:resetEx() .typeId(zilla:id("filesystem")) - .error("FILE_ALREADY_EXISTS") + .error("FILE_EXISTS") .build()} read abort diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/client.rpt index c1010cdb66..6b679c2765 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .build()} connected @@ -34,7 +34,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/server.rpt index 097d446b9d..4622d777dc 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.create.file/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .build()} connected @@ -34,7 +34,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("CREATE_PAYLOAD") + .capabilities("CREATE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/client.rpt index 29c8d68272..21bab20bb5 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/server.rpt index b76b292bcd..3f0a7a6a8f 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.file/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} write flush diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/client.rpt index 6f801aeeb9..c37d628dbf 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} connected diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/server.rpt index 7a0da09e1c..1a3192f614 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.delete.non.existent.file/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("DELETE_PAYLOAD") + .capabilities("DELETE_FILE") .path("index.html") .build()} connected diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/client.rpt new file mode 100644 index 0000000000..43d0f29e8c --- /dev/null +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/client.rpt @@ -0,0 +1,36 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/filesystem0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +write close + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +read '[{"path":"index.html","type":"file"}]' + +read closed diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/server.rpt new file mode 100644 index 0000000000..da8f0589a1 --- /dev/null +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.directory/server.rpt @@ -0,0 +1,40 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/filesystem0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${filesystem:matchBeginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +connected + +read closed + +write zilla:begin.ext ${filesystem:beginEx() + .typeId(zilla:id("filesystem")) + .capabilities("READ_DIRECTORY") + .directory("var") + .build()} +write flush + +write '[{"path":"index.html","type":"file"}]' +write flush + +write close diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/client.rpt index 26ebe2f035..3e1954eb55 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/server.rpt index fc5149891d..1bdf94116d 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.info/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/client.rpt index 9475abc8c5..7155e50127 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .tag("AAAAAAAAAAAAAAAA") .timeout(60000) @@ -30,7 +30,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/server.rpt index 657825192e..aac1d50d99 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.modified/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .tag("AAAAAAAAAAAAAAAA") .timeout(60000) @@ -31,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/client.rpt index b3f9af7a4b..7258e88901 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .tag("AAAAAAAAAAAAAAAA") .timeout(60000) @@ -30,7 +30,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .tag("AAAAAAAAAAAAAAAA") diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/server.rpt index 2b183cbfaa..64163c9808 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file.map.not.modified/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .tag("AAAAAAAAAAAAAAAA") .timeout(60000) @@ -31,7 +31,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_EXTENSION") + .capabilities("READ_METADATA") .path("index.html") .type("text/html") .tag("AAAAAAAAAAAAAAAA") diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/client.rpt index 5c00178e5f..b3466cd851 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .build()} connected @@ -28,7 +28,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/server.rpt index 128312bc07..e5b0fdaeaf 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.read.file/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .build()} connected @@ -29,7 +29,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("READ_PAYLOAD", "READ_EXTENSION") + .capabilities("READ_FILE", "READ_METADATA") .path("index.html") .type("text/html") .payloadSize(77) diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/client.rpt index 35c3b0c8ca..b6d53324b8 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/server.rpt index ffa9df505d..7e12e1b272 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file.failed/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/client.rpt index 36860eb001..06e634d4a4 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/client.rpt @@ -19,7 +19,7 @@ connect "zilla://streams/filesystem0" write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} @@ -35,7 +35,7 @@ write close read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c3ce2fda552e43985939a773852f45d1") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/server.rpt index c6844cf4dc..810174f4b1 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/filesystem/client.write.file/server.rpt @@ -20,7 +20,7 @@ accepted read zilla:begin.ext ${filesystem:matchBeginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c7183509522eb56e5cf927a3b2e8c15a") .build()} @@ -35,7 +35,7 @@ read closed write zilla:begin.ext ${filesystem:beginEx() .typeId(zilla:id("filesystem")) - .capabilities("WRITE_PAYLOAD") + .capabilities("WRITE_FILE") .path("index.html") .tag("c3ce2fda552e43985939a773852f45d1") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/client.rpt new file mode 100644 index 0000000000..beeccc0f48 --- /dev/null +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/client.rpt @@ -0,0 +1,38 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/http0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":method", "GET") + .header(":scheme", "https") + .header(":authority", "example.com:9090") + .header(":path", "/storage/var") + .build()} + +connected + +write close + +read zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .build()} +read '[{"path":"index.html","type":"file"}]' + +read closed diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/server.rpt new file mode 100644 index 0000000000..76b2d51fcc --- /dev/null +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.directory/server.rpt @@ -0,0 +1,39 @@ +# +# Copyright 2021-2024 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +accept "zilla://streams/http0" + option zilla:window 8192 + option zilla:transmission "half-duplex" +accepted + +read zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":method", "GET") + .header(":scheme", "https") + .header(":authority", "example.com:9090") + .header(":path", "/storage/var") + .build()} + +connected + +read closed + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .build()} +write '[{"path":"index.html","type":"file"}]' + +write close diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/client.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/client.rpt index 0a4b5fb39e..a78ba017ef 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/client.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/client.rpt @@ -35,7 +35,6 @@ read zilla:begin.ext ${http:beginEx() .typeId(zilla:id("http")) .header(":status", "304") .header("content-type", "text/html") - .header("content-length", "0") .header("etag", "AAAAAAAAAAAAAAAA") .build()} diff --git a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/server.rpt b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/server.rpt index ff9434f744..3e565490cf 100644 --- a/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/server.rpt +++ b/specs/binding-http-filesystem.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/filesystem/streams/http/client.read.file.map.not.modified/server.rpt @@ -36,7 +36,6 @@ write zilla:begin.ext ${http:beginEx() .typeId(zilla:id("http")) .header(":status", "304") .header("content-type", "text/html") - .header("content-length", "0") .header("etag", "AAAAAAAAAAAAAAAA") .build()} write close diff --git a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/config/SchemaTest.java b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/config/SchemaTest.java index 6036d1a7a6..20e4267416 100644 --- a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/config/SchemaTest.java +++ b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/config/SchemaTest.java @@ -39,4 +39,12 @@ public void shouldValidateProxyWithPath() assertThat(config, not(nullValue())); } + + @Test + public void shouldValidateProxyWithDynamicDirectory() + { + JsonObject config = schema.validate("proxy.with.directory.dynamic.yaml"); + + assertThat(config, not(nullValue())); + } } diff --git a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/FileSystemIT.java b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/FileSystemIT.java index fc5b9b4b3f..22eca92952 100644 --- a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/FileSystemIT.java +++ b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/FileSystemIT.java @@ -170,4 +170,13 @@ public void shouldRejectClientDeleteNonExistentFile() throws Exception { k3po.finish(); } + + @Test + @Specification({ + "${filesystem}/client.read.directory/client", + "${filesystem}/client.read.directory/server"}) + public void shouldReceiveClientReadDirectory() throws Exception + { + k3po.finish(); + } } diff --git a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/HttpIT.java b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/HttpIT.java index 173d9892c1..352ad10bd5 100644 --- a/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/HttpIT.java +++ b/specs/binding-http-filesystem.spec/src/test/java/io/aklivity/zilla/specs/binding/http/filesystem/streams/HttpIT.java @@ -198,4 +198,13 @@ public void shouldRejectClientDeleteNonExistentFile() throws Exception { k3po.finish(); } + + @Test + @Specification({ + "${http}/client.read.directory/client", + "${http}/client.read.directory/server"}) + public void shouldReceiveClientReadDirectory() throws Exception + { + k3po.finish(); + } } From 3695c9f9e0bdb304b34b1c3fbd0d536071a0b01a Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Tue, 19 Nov 2024 12:23:04 +0530 Subject: [PATCH 2/6] validate `begin` frame type for `ws` client (#1332) --- .../binding/ws/internal/stream/WsClientFactory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/binding-ws/src/main/java/io/aklivity/zilla/runtime/binding/ws/internal/stream/WsClientFactory.java b/runtime/binding-ws/src/main/java/io/aklivity/zilla/runtime/binding/ws/internal/stream/WsClientFactory.java index e251a574d6..03ca8b3204 100644 --- a/runtime/binding-ws/src/main/java/io/aklivity/zilla/runtime/binding/ws/internal/stream/WsClientFactory.java +++ b/runtime/binding-ws/src/main/java/io/aklivity/zilla/runtime/binding/ws/internal/stream/WsClientFactory.java @@ -55,6 +55,7 @@ import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.ChallengeFW; import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.DataFW; import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.EndFW; +import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.ExtensionFW; import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.FlushFW; import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.HttpBeginExFW; import io.aklivity.zilla.runtime.binding.ws.internal.types.stream.ResetFW; @@ -113,6 +114,7 @@ public final class WsClientFactory implements WsStreamFactory private final OctetsFW.Builder payloadRW = new OctetsFW.Builder(); private final OctetsFW payloadRO = new OctetsFW(); + private final ExtensionFW extensionExRO = new ExtensionFW(); private final HttpBeginExFW httpBeginExRO = new HttpBeginExFW(); private final HttpBeginExFW.Builder httpBeginExRW = new HttpBeginExFW.Builder(); @@ -184,7 +186,10 @@ public MessageConsumer newStream( final long initialId = begin.streamId(); final long authorization = begin.authorization(); final OctetsFW extension = begin.extension(); - final WsBeginExFW wsBeginEx = extension.get(wsBeginExRO::tryWrap); + final ExtensionFW extensionEx = extension.get(extensionExRO::tryWrap); + final WsBeginExFW wsBeginEx = extensionEx != null && extensionEx.typeId() == wsTypeId + ? extension.get(wsBeginExRO::tryWrap) + : null; MessageConsumer newStream = null; From bc34b234e013a12dc48f9f8d36ad355163654454 Mon Sep 17 00:00:00 2001 From: John Fallows Date: Wed, 20 Nov 2024 13:41:35 -0800 Subject: [PATCH 3/6] Enhance test vault and test exporter (#1333) --- .../zilla/runtime/engine/test/EngineRule.java | 3 ++- .../test/internal/exporter/TestExporterHandler.java | 13 ++++++++++++- .../test/internal/vault/TestVaultHandler.java | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EngineRule.java b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EngineRule.java index ca35be258c..dc1739a07f 100644 --- a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EngineRule.java +++ b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EngineRule.java @@ -24,6 +24,7 @@ import static io.aklivity.zilla.runtime.engine.EngineConfiguration.ENGINE_WORKERS; import static java.nio.file.FileVisitOption.FOLLOW_LINKS; import static java.nio.file.Files.exists; +import static java.util.Collections.synchronizedList; import static java.util.Objects.requireNonNull; import static org.junit.runners.model.MultipleFailureException.assertEmpty; @@ -317,7 +318,7 @@ public void evaluate() throws Throwable { final EngineConfiguration config = configuration(); final Thread baseThread = Thread.currentThread(); - final List errors = new ArrayList<>(); + final List errors = synchronizedList(new ArrayList<>()); final ErrorHandler errorHandler = ex -> { ex.printStackTrace(); diff --git a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/exporter/TestExporterHandler.java b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/exporter/TestExporterHandler.java index a50335d330..b86f245690 100644 --- a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/exporter/TestExporterHandler.java +++ b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/exporter/TestExporterHandler.java @@ -67,6 +67,12 @@ public void stop() { readEvent.read(this::handleEvent, Integer.MAX_VALUE); } + + if (options.events == null || + options.events.isEmpty()) + { + readEvent.read(this::handleEvent, 1); + } } catch (Exception ex) { @@ -87,7 +93,12 @@ private void handleEvent( String name = context.supplyEventName(event.id()); String message = formatter.format(msgTypeId, buffer, index, length); - if (options.events != null && eventIndex < options.events.size()) + if (options.events == null || options.events.isEmpty()) + { + throw new IllegalStateException(String.format("event not expected: %s %s %s %s", + qname, id, name, message)); + } + else if (eventIndex < options.events.size()) { TestExporterOptionsConfig.Event e = options.events.get(eventIndex); if (!qname.equals(e.qName) || !id.equals(e.id) || !name.equals(e.name) || !message.equals(e.message)) diff --git a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/vault/TestVaultHandler.java b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/vault/TestVaultHandler.java index d3f1e03722..09f06109ed 100644 --- a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/vault/TestVaultHandler.java +++ b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/vault/TestVaultHandler.java @@ -47,8 +47,8 @@ public final class TestVaultHandler implements VaultHandler { private static final Pattern PATTERN_KEY_ENTRY = Pattern.compile( - "(?-----BEGIN PRIVATE KEY-----\n[^-]+-----END PRIVATE KEY-----\n)" + - "(?(?:-----BEGIN CERTIFICATE-----\n[^-]+-----END CERTIFICATE-----\n)+)"); + "(?-----BEGIN PRIVATE KEY-----[^-]+-----END PRIVATE KEY-----[^-]+)" + + "(?(?:-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----[^-]+)+)"); private final TestVaultEntryConfig key; private final TestVaultEntryConfig signer; @@ -87,8 +87,8 @@ public KeyManagerFactory initKeys( String base64 = encodedKey .replace("-----BEGIN PRIVATE KEY-----", "") - .replaceAll(System.lineSeparator(), "") - .replace("-----END PRIVATE KEY-----", ""); + .replace("-----END PRIVATE KEY-----", "") + .replaceAll("[^a-zA-Z0-9+/=]", ""); byte[] encoded = Base64.getMimeDecoder().decode(base64); KeySpec keySpec = new PKCS8EncodedKeySpec(encoded); From 34c39ae86201b57e893a4ab093d4e99312675592 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 27 Nov 2024 12:00:14 +0530 Subject: [PATCH 4/6] resolve nested `$ref` in schema (#1337) --- .../internal/model/resolver/AsyncapiSchemaResolver.java | 8 ++++++++ .../zilla/specs/binding/asyncapi/config/server.http.yaml | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/binding-asyncapi/src/main/java/io/aklivity/zilla/runtime/binding/asyncapi/internal/model/resolver/AsyncapiSchemaResolver.java b/runtime/binding-asyncapi/src/main/java/io/aklivity/zilla/runtime/binding/asyncapi/internal/model/resolver/AsyncapiSchemaResolver.java index 693d270cfb..3313cdfc82 100644 --- a/runtime/binding-asyncapi/src/main/java/io/aklivity/zilla/runtime/binding/asyncapi/internal/model/resolver/AsyncapiSchemaResolver.java +++ b/runtime/binding-asyncapi/src/main/java/io/aklivity/zilla/runtime/binding/asyncapi/internal/model/resolver/AsyncapiSchemaResolver.java @@ -14,6 +14,8 @@ */ package io.aklivity.zilla.runtime.binding.asyncapi.internal.model.resolver; +import static java.util.stream.Collectors.toMap; + import java.util.Map; import java.util.Optional; import java.util.regex.Pattern; @@ -54,6 +56,12 @@ public AsyncapiSchema resolve( resolved.items = resolve(resolved.items); } + if (resolved.properties != null) + { + resolved.properties = resolved.properties.entrySet().stream() + .collect(toMap(Map.Entry::getKey, entry -> resolve(entry.getValue()))); + } + return resolved; } diff --git a/specs/binding-asyncapi.spec/src/main/scripts/io/aklivity/zilla/specs/binding/asyncapi/config/server.http.yaml b/specs/binding-asyncapi.spec/src/main/scripts/io/aklivity/zilla/specs/binding/asyncapi/config/server.http.yaml index 6b0ddd2012..9169dfaacb 100644 --- a/specs/binding-asyncapi.spec/src/main/scripts/io/aklivity/zilla/specs/binding/asyncapi/config/server.http.yaml +++ b/specs/binding-asyncapi.spec/src/main/scripts/io/aklivity/zilla/specs/binding/asyncapi/config/server.http.yaml @@ -83,6 +83,9 @@ catalogs: petsCorrelationId: location: '$message.header#/CorrelId' schemas: + name: + type: string + description: Pet name. petPayload: type: object properties: @@ -91,8 +94,7 @@ catalogs: minimum: 0 description: Pet id. name: - type: string - description: Pet name. + $ref: '#/components/schemas/name' tag: type: string description: Tag. From bbbd5fe1ef96187c8b7cc4f591a1e52239aaa264 Mon Sep 17 00:00:00 2001 From: John Fallows Date: Tue, 26 Nov 2024 22:55:10 -0800 Subject: [PATCH 5/6] Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fc7025c19..51685b1202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.9.102](https://github.com/aklivity/zilla/tree/0.9.102) (2024-11-13) + +[Full Changelog](https://github.com/aklivity/zilla/compare/0.9.101...0.9.102) + +**Implemented enhancements:** + +- Support `risingwave` `pgsql` message transformations [\#1208](https://github.com/aklivity/zilla/issues/1208) + +**Merged pull requests:** + +- Fix MQTT binding selecting incorrect publish stream [\#1328](https://github.com/aklivity/zilla/pull/1328) ([bmaidics](https://github.com/bmaidics)) +- Support ALTER STREAM and ALTER TABLE transformation [\#1320](https://github.com/aklivity/zilla/pull/1320) ([akrambek](https://github.com/akrambek)) + ## [0.9.101](https://github.com/aklivity/zilla/tree/0.9.101) (2024-11-07) [Full Changelog](https://github.com/aklivity/zilla/compare/0.9.100...0.9.101) From 295a67785c4ae14b5c2b7ae21ccac501e217ec84 Mon Sep 17 00:00:00 2001 From: John Fallows Date: Wed, 27 Nov 2024 10:08:32 -0800 Subject: [PATCH 6/6] Prepare release 0.9.103 --- CHANGELOG.md | 15 +++++++++++++++ build/flyweight-maven-plugin/pom.xml | 2 +- build/pom.xml | 2 +- cloud/docker-image/pom.xml | 2 +- cloud/helm-chart/pom.xml | 2 +- cloud/pom.xml | 2 +- conf/pom.xml | 2 +- incubator/binding-amqp.spec/pom.xml | 2 +- incubator/binding-amqp/pom.xml | 2 +- incubator/binding-pgsql-kafka.spec/pom.xml | 2 +- incubator/binding-pgsql-kafka/pom.xml | 2 +- incubator/binding-pgsql.spec/pom.xml | 2 +- incubator/binding-pgsql/pom.xml | 2 +- incubator/binding-risingwave.spec/pom.xml | 2 +- incubator/binding-risingwave/pom.xml | 2 +- incubator/command-dump/pom.xml | 2 +- incubator/command-log/pom.xml | 2 +- incubator/command-tune/pom.xml | 2 +- incubator/pom.xml | 2 +- manager/pom.xml | 2 +- pom.xml | 2 +- runtime/binding-asyncapi/pom.xml | 2 +- runtime/binding-echo/pom.xml | 2 +- runtime/binding-fan/pom.xml | 2 +- runtime/binding-filesystem/pom.xml | 2 +- runtime/binding-grpc-kafka/pom.xml | 2 +- runtime/binding-grpc/pom.xml | 2 +- runtime/binding-http-filesystem/pom.xml | 2 +- runtime/binding-http-kafka/pom.xml | 2 +- runtime/binding-http/pom.xml | 2 +- runtime/binding-kafka-grpc/pom.xml | 2 +- runtime/binding-kafka/pom.xml | 2 +- runtime/binding-mqtt-kafka/pom.xml | 2 +- runtime/binding-mqtt/pom.xml | 2 +- runtime/binding-openapi-asyncapi/pom.xml | 2 +- runtime/binding-openapi/pom.xml | 2 +- runtime/binding-proxy/pom.xml | 2 +- runtime/binding-sse-kafka/pom.xml | 2 +- runtime/binding-sse/pom.xml | 2 +- runtime/binding-tcp/pom.xml | 2 +- runtime/binding-tls/pom.xml | 2 +- runtime/binding-ws/pom.xml | 2 +- runtime/catalog-apicurio/pom.xml | 2 +- runtime/catalog-filesystem/pom.xml | 2 +- runtime/catalog-inline/pom.xml | 2 +- runtime/catalog-karapace/pom.xml | 2 +- runtime/catalog-schema-registry/pom.xml | 2 +- runtime/command-metrics/pom.xml | 2 +- runtime/command-start/pom.xml | 2 +- runtime/command-stop/pom.xml | 2 +- runtime/command-version/pom.xml | 2 +- runtime/command/pom.xml | 2 +- runtime/common/pom.xml | 2 +- runtime/engine/pom.xml | 2 +- runtime/exporter-otlp/pom.xml | 2 +- runtime/exporter-prometheus/pom.xml | 2 +- runtime/exporter-stdout/pom.xml | 2 +- runtime/filesystem-http/pom.xml | 2 +- runtime/guard-jwt/pom.xml | 2 +- runtime/metrics-grpc/pom.xml | 2 +- runtime/metrics-http/pom.xml | 2 +- runtime/metrics-stream/pom.xml | 2 +- runtime/model-avro/pom.xml | 2 +- runtime/model-core/pom.xml | 2 +- runtime/model-json/pom.xml | 2 +- runtime/model-protobuf/pom.xml | 2 +- runtime/pom.xml | 2 +- runtime/resolver-env/pom.xml | 2 +- runtime/vault-filesystem/pom.xml | 2 +- specs/binding-asyncapi.spec/pom.xml | 2 +- specs/binding-echo.spec/pom.xml | 2 +- specs/binding-fan.spec/pom.xml | 2 +- specs/binding-filesystem.spec/pom.xml | 2 +- specs/binding-grpc-kafka.spec/pom.xml | 2 +- specs/binding-grpc.spec/pom.xml | 2 +- specs/binding-http-filesystem.spec/pom.xml | 2 +- specs/binding-http-kafka.spec/pom.xml | 2 +- specs/binding-http.spec/pom.xml | 2 +- specs/binding-kafka-grpc.spec/pom.xml | 2 +- specs/binding-kafka.spec/pom.xml | 2 +- specs/binding-mqtt-kafka.spec/pom.xml | 2 +- specs/binding-mqtt.spec/pom.xml | 2 +- specs/binding-openapi-asyncapi.spec/pom.xml | 2 +- specs/binding-openapi.spec/pom.xml | 2 +- specs/binding-proxy.spec/pom.xml | 2 +- specs/binding-sse-kafka.spec/pom.xml | 2 +- specs/binding-sse.spec/pom.xml | 2 +- specs/binding-tcp.spec/pom.xml | 2 +- specs/binding-tls.spec/pom.xml | 2 +- specs/binding-ws.spec/pom.xml | 2 +- specs/catalog-apicurio.spec/pom.xml | 2 +- specs/catalog-filesystem.spec/pom.xml | 2 +- specs/catalog-inline.spec/pom.xml | 2 +- specs/catalog-karapace.spec/pom.xml | 2 +- specs/catalog-schema-registry.spec/pom.xml | 2 +- specs/engine.spec/pom.xml | 2 +- specs/exporter-otlp.spec/pom.xml | 2 +- specs/exporter-prometheus.spec/pom.xml | 2 +- specs/exporter-stdout.spec/pom.xml | 2 +- specs/filesystem-http.spec/pom.xml | 2 +- specs/guard-jwt.spec/pom.xml | 2 +- specs/metrics-grpc.spec/pom.xml | 2 +- specs/metrics-http.spec/pom.xml | 2 +- specs/metrics-stream.spec/pom.xml | 2 +- specs/model-avro.spec/pom.xml | 2 +- specs/model-core.spec/pom.xml | 2 +- specs/model-json.spec/pom.xml | 2 +- specs/model-protobuf.spec/pom.xml | 2 +- specs/pom.xml | 2 +- specs/vault-filesystem.spec/pom.xml | 2 +- 110 files changed, 124 insertions(+), 109 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51685b1202..9082ad3370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [Unreleased](https://github.com/aklivity/zilla/tree/HEAD) + +[Full Changelog](https://github.com/aklivity/zilla/compare/0.9.102...HEAD) + +**Fixed bugs:** + +- Mqtt selecting incorrect publish stream [\#1327](https://github.com/aklivity/zilla/issues/1327) + +**Merged pull requests:** + +- resolve nested `$ref` in schema [\#1337](https://github.com/aklivity/zilla/pull/1337) ([ankitk-me](https://github.com/ankitk-me)) +- Enhance test vault and test exporter [\#1333](https://github.com/aklivity/zilla/pull/1333) ([jfallows](https://github.com/jfallows)) +- validate `begin` frame type for `ws` client [\#1332](https://github.com/aklivity/zilla/pull/1332) ([ankitk-me](https://github.com/ankitk-me)) +- Support `directory` syntax & functionality [\#1323](https://github.com/aklivity/zilla/pull/1323) ([ankitk-me](https://github.com/ankitk-me)) + ## [0.9.102](https://github.com/aklivity/zilla/tree/0.9.102) (2024-11-13) [Full Changelog](https://github.com/aklivity/zilla/compare/0.9.101...0.9.102) diff --git a/build/flyweight-maven-plugin/pom.xml b/build/flyweight-maven-plugin/pom.xml index 53d3d0dafe..e5d859f627 100644 --- a/build/flyweight-maven-plugin/pom.xml +++ b/build/flyweight-maven-plugin/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla build - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/build/pom.xml b/build/pom.xml index 99a8e7a8fa..f44d4095e9 100644 --- a/build/pom.xml +++ b/build/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/cloud/docker-image/pom.xml b/cloud/docker-image/pom.xml index 77ee2afb38..1c57e5565c 100644 --- a/cloud/docker-image/pom.xml +++ b/cloud/docker-image/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla cloud - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/cloud/helm-chart/pom.xml b/cloud/helm-chart/pom.xml index 261a9ba6e1..fb2245a45f 100644 --- a/cloud/helm-chart/pom.xml +++ b/cloud/helm-chart/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla cloud - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/cloud/pom.xml b/cloud/pom.xml index eba77430c6..b14e7e5f51 100644 --- a/cloud/pom.xml +++ b/cloud/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/conf/pom.xml b/conf/pom.xml index e7588439ef..61d5a75cb8 100644 --- a/conf/pom.xml +++ b/conf/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-amqp.spec/pom.xml b/incubator/binding-amqp.spec/pom.xml index 1dbfab0cca..312003913e 100644 --- a/incubator/binding-amqp.spec/pom.xml +++ b/incubator/binding-amqp.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-amqp/pom.xml b/incubator/binding-amqp/pom.xml index 6e2783924c..ad2007392e 100644 --- a/incubator/binding-amqp/pom.xml +++ b/incubator/binding-amqp/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-pgsql-kafka.spec/pom.xml b/incubator/binding-pgsql-kafka.spec/pom.xml index 5c1b672147..5836abca24 100644 --- a/incubator/binding-pgsql-kafka.spec/pom.xml +++ b/incubator/binding-pgsql-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-pgsql-kafka/pom.xml b/incubator/binding-pgsql-kafka/pom.xml index 95b25beb5f..9763fa1857 100644 --- a/incubator/binding-pgsql-kafka/pom.xml +++ b/incubator/binding-pgsql-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-pgsql.spec/pom.xml b/incubator/binding-pgsql.spec/pom.xml index 61a77e1923..8056bddce0 100644 --- a/incubator/binding-pgsql.spec/pom.xml +++ b/incubator/binding-pgsql.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-pgsql/pom.xml b/incubator/binding-pgsql/pom.xml index 4c0cd40a3d..39ab5dc6a1 100644 --- a/incubator/binding-pgsql/pom.xml +++ b/incubator/binding-pgsql/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-risingwave.spec/pom.xml b/incubator/binding-risingwave.spec/pom.xml index ca30939968..ac47f61cc5 100644 --- a/incubator/binding-risingwave.spec/pom.xml +++ b/incubator/binding-risingwave.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/binding-risingwave/pom.xml b/incubator/binding-risingwave/pom.xml index a087cd9681..82d739a900 100644 --- a/incubator/binding-risingwave/pom.xml +++ b/incubator/binding-risingwave/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/command-dump/pom.xml b/incubator/command-dump/pom.xml index 55f058f16a..2c40861dd7 100644 --- a/incubator/command-dump/pom.xml +++ b/incubator/command-dump/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/command-log/pom.xml b/incubator/command-log/pom.xml index e437bd5ec6..1c00b98c53 100644 --- a/incubator/command-log/pom.xml +++ b/incubator/command-log/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/command-tune/pom.xml b/incubator/command-tune/pom.xml index 141259687c..a7a4d34bf1 100644 --- a/incubator/command-tune/pom.xml +++ b/incubator/command-tune/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla incubator - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/incubator/pom.xml b/incubator/pom.xml index f45529d387..e308aae128 100644 --- a/incubator/pom.xml +++ b/incubator/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/manager/pom.xml b/manager/pom.xml index 75c5834990..cfe0ca4237 100644 --- a/manager/pom.xml +++ b/manager/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/pom.xml b/pom.xml index 98261cf74f..c7a643e04f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ 4.0.0 io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 pom zilla https://github.com/aklivity/zilla diff --git a/runtime/binding-asyncapi/pom.xml b/runtime/binding-asyncapi/pom.xml index 365555fd39..88ea7f1127 100644 --- a/runtime/binding-asyncapi/pom.xml +++ b/runtime/binding-asyncapi/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-echo/pom.xml b/runtime/binding-echo/pom.xml index 3a47423d5a..d801edbdcb 100644 --- a/runtime/binding-echo/pom.xml +++ b/runtime/binding-echo/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-fan/pom.xml b/runtime/binding-fan/pom.xml index e88d3d6de4..7f9b94577e 100644 --- a/runtime/binding-fan/pom.xml +++ b/runtime/binding-fan/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-filesystem/pom.xml b/runtime/binding-filesystem/pom.xml index 25d4ae97f8..27d9187025 100644 --- a/runtime/binding-filesystem/pom.xml +++ b/runtime/binding-filesystem/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-grpc-kafka/pom.xml b/runtime/binding-grpc-kafka/pom.xml index cebcf678e4..ce4e7fe36f 100644 --- a/runtime/binding-grpc-kafka/pom.xml +++ b/runtime/binding-grpc-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-grpc/pom.xml b/runtime/binding-grpc/pom.xml index a73bf0271e..5f24426d88 100644 --- a/runtime/binding-grpc/pom.xml +++ b/runtime/binding-grpc/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-http-filesystem/pom.xml b/runtime/binding-http-filesystem/pom.xml index 7398a08012..0143b52614 100644 --- a/runtime/binding-http-filesystem/pom.xml +++ b/runtime/binding-http-filesystem/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-http-kafka/pom.xml b/runtime/binding-http-kafka/pom.xml index 904a2a027f..dcc69bb60c 100644 --- a/runtime/binding-http-kafka/pom.xml +++ b/runtime/binding-http-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-http/pom.xml b/runtime/binding-http/pom.xml index 238faec7a1..afa998676c 100644 --- a/runtime/binding-http/pom.xml +++ b/runtime/binding-http/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-kafka-grpc/pom.xml b/runtime/binding-kafka-grpc/pom.xml index 6d2190e68f..889fa4bbc1 100644 --- a/runtime/binding-kafka-grpc/pom.xml +++ b/runtime/binding-kafka-grpc/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-kafka/pom.xml b/runtime/binding-kafka/pom.xml index bee50a51c7..cf0475b181 100644 --- a/runtime/binding-kafka/pom.xml +++ b/runtime/binding-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-mqtt-kafka/pom.xml b/runtime/binding-mqtt-kafka/pom.xml index 5c461f327e..147fba20c4 100644 --- a/runtime/binding-mqtt-kafka/pom.xml +++ b/runtime/binding-mqtt-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-mqtt/pom.xml b/runtime/binding-mqtt/pom.xml index 1ce005dd67..cb52542229 100644 --- a/runtime/binding-mqtt/pom.xml +++ b/runtime/binding-mqtt/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-openapi-asyncapi/pom.xml b/runtime/binding-openapi-asyncapi/pom.xml index ab4e193680..26dd0fb3a9 100644 --- a/runtime/binding-openapi-asyncapi/pom.xml +++ b/runtime/binding-openapi-asyncapi/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-openapi/pom.xml b/runtime/binding-openapi/pom.xml index 9b891fb878..6141986a4f 100644 --- a/runtime/binding-openapi/pom.xml +++ b/runtime/binding-openapi/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-proxy/pom.xml b/runtime/binding-proxy/pom.xml index e55a09fb6a..bc4dc75cd3 100644 --- a/runtime/binding-proxy/pom.xml +++ b/runtime/binding-proxy/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-sse-kafka/pom.xml b/runtime/binding-sse-kafka/pom.xml index dca069639d..957f6a4982 100644 --- a/runtime/binding-sse-kafka/pom.xml +++ b/runtime/binding-sse-kafka/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-sse/pom.xml b/runtime/binding-sse/pom.xml index f66588e0a8..95b30dea99 100644 --- a/runtime/binding-sse/pom.xml +++ b/runtime/binding-sse/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-tcp/pom.xml b/runtime/binding-tcp/pom.xml index f26574a201..ad0d2c04ee 100644 --- a/runtime/binding-tcp/pom.xml +++ b/runtime/binding-tcp/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-tls/pom.xml b/runtime/binding-tls/pom.xml index 602b6ed554..e37a4498fe 100644 --- a/runtime/binding-tls/pom.xml +++ b/runtime/binding-tls/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/binding-ws/pom.xml b/runtime/binding-ws/pom.xml index 0018b956cc..27221c05d8 100644 --- a/runtime/binding-ws/pom.xml +++ b/runtime/binding-ws/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/catalog-apicurio/pom.xml b/runtime/catalog-apicurio/pom.xml index 55d5212fd0..c56ba22341 100644 --- a/runtime/catalog-apicurio/pom.xml +++ b/runtime/catalog-apicurio/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/catalog-filesystem/pom.xml b/runtime/catalog-filesystem/pom.xml index fbe0587393..08137d1526 100644 --- a/runtime/catalog-filesystem/pom.xml +++ b/runtime/catalog-filesystem/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/catalog-inline/pom.xml b/runtime/catalog-inline/pom.xml index 71f8d0daf9..673cf9e860 100644 --- a/runtime/catalog-inline/pom.xml +++ b/runtime/catalog-inline/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/catalog-karapace/pom.xml b/runtime/catalog-karapace/pom.xml index f144b9249b..5d85f1901e 100644 --- a/runtime/catalog-karapace/pom.xml +++ b/runtime/catalog-karapace/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/catalog-schema-registry/pom.xml b/runtime/catalog-schema-registry/pom.xml index 454beeb2c1..1c2469b9d4 100644 --- a/runtime/catalog-schema-registry/pom.xml +++ b/runtime/catalog-schema-registry/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/command-metrics/pom.xml b/runtime/command-metrics/pom.xml index db5bc81d49..53a824194d 100644 --- a/runtime/command-metrics/pom.xml +++ b/runtime/command-metrics/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/command-start/pom.xml b/runtime/command-start/pom.xml index 8ed869e0d7..67d6d80c60 100644 --- a/runtime/command-start/pom.xml +++ b/runtime/command-start/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/command-stop/pom.xml b/runtime/command-stop/pom.xml index 76ba8f778f..9aa4ce839f 100644 --- a/runtime/command-stop/pom.xml +++ b/runtime/command-stop/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/command-version/pom.xml b/runtime/command-version/pom.xml index 36c49192af..0a8708f487 100644 --- a/runtime/command-version/pom.xml +++ b/runtime/command-version/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/command/pom.xml b/runtime/command/pom.xml index 8163d6fa6c..eca9021f20 100644 --- a/runtime/command/pom.xml +++ b/runtime/command/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/common/pom.xml b/runtime/common/pom.xml index 7bcda309e4..1bb2b9c705 100644 --- a/runtime/common/pom.xml +++ b/runtime/common/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/engine/pom.xml b/runtime/engine/pom.xml index bf412f219e..4267e5a3ea 100644 --- a/runtime/engine/pom.xml +++ b/runtime/engine/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/exporter-otlp/pom.xml b/runtime/exporter-otlp/pom.xml index 5bfaac5e8c..6e04209aa4 100644 --- a/runtime/exporter-otlp/pom.xml +++ b/runtime/exporter-otlp/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/exporter-prometheus/pom.xml b/runtime/exporter-prometheus/pom.xml index b3af26bd40..9764b334f3 100644 --- a/runtime/exporter-prometheus/pom.xml +++ b/runtime/exporter-prometheus/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/exporter-stdout/pom.xml b/runtime/exporter-stdout/pom.xml index 6263e5350c..0c4812c83e 100644 --- a/runtime/exporter-stdout/pom.xml +++ b/runtime/exporter-stdout/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/filesystem-http/pom.xml b/runtime/filesystem-http/pom.xml index f944c54a49..a4aca31a63 100644 --- a/runtime/filesystem-http/pom.xml +++ b/runtime/filesystem-http/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/guard-jwt/pom.xml b/runtime/guard-jwt/pom.xml index ebba56e5b5..775f8f6bed 100644 --- a/runtime/guard-jwt/pom.xml +++ b/runtime/guard-jwt/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/metrics-grpc/pom.xml b/runtime/metrics-grpc/pom.xml index 310b473e19..43058e3c34 100644 --- a/runtime/metrics-grpc/pom.xml +++ b/runtime/metrics-grpc/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/metrics-http/pom.xml b/runtime/metrics-http/pom.xml index 4a27ee2483..c2879d0ecb 100644 --- a/runtime/metrics-http/pom.xml +++ b/runtime/metrics-http/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/metrics-stream/pom.xml b/runtime/metrics-stream/pom.xml index 6021c37669..9ff718b232 100644 --- a/runtime/metrics-stream/pom.xml +++ b/runtime/metrics-stream/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/model-avro/pom.xml b/runtime/model-avro/pom.xml index ddfe3781ec..73eea25f62 100644 --- a/runtime/model-avro/pom.xml +++ b/runtime/model-avro/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/model-core/pom.xml b/runtime/model-core/pom.xml index 406a2f987e..28244f625a 100644 --- a/runtime/model-core/pom.xml +++ b/runtime/model-core/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/model-json/pom.xml b/runtime/model-json/pom.xml index 8dd5e143b4..ec80eac1ec 100644 --- a/runtime/model-json/pom.xml +++ b/runtime/model-json/pom.xml @@ -6,7 +6,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/model-protobuf/pom.xml b/runtime/model-protobuf/pom.xml index e96a2f6b94..69b39bce68 100644 --- a/runtime/model-protobuf/pom.xml +++ b/runtime/model-protobuf/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/pom.xml b/runtime/pom.xml index d42e0cc398..6173decc87 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/resolver-env/pom.xml b/runtime/resolver-env/pom.xml index a5c86d1070..ba3bf6bcbf 100644 --- a/runtime/resolver-env/pom.xml +++ b/runtime/resolver-env/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/runtime/vault-filesystem/pom.xml b/runtime/vault-filesystem/pom.xml index a856149b05..582d9fc69f 100644 --- a/runtime/vault-filesystem/pom.xml +++ b/runtime/vault-filesystem/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla runtime - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-asyncapi.spec/pom.xml b/specs/binding-asyncapi.spec/pom.xml index 55fe296472..8613c22d7b 100644 --- a/specs/binding-asyncapi.spec/pom.xml +++ b/specs/binding-asyncapi.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-echo.spec/pom.xml b/specs/binding-echo.spec/pom.xml index 02660f2ad2..ca5935aeb3 100644 --- a/specs/binding-echo.spec/pom.xml +++ b/specs/binding-echo.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-fan.spec/pom.xml b/specs/binding-fan.spec/pom.xml index 0256388967..bd9a0acd83 100644 --- a/specs/binding-fan.spec/pom.xml +++ b/specs/binding-fan.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-filesystem.spec/pom.xml b/specs/binding-filesystem.spec/pom.xml index d95e29fbcc..85a295e3d3 100644 --- a/specs/binding-filesystem.spec/pom.xml +++ b/specs/binding-filesystem.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-grpc-kafka.spec/pom.xml b/specs/binding-grpc-kafka.spec/pom.xml index 3721a7cfad..a7b363cc43 100644 --- a/specs/binding-grpc-kafka.spec/pom.xml +++ b/specs/binding-grpc-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-grpc.spec/pom.xml b/specs/binding-grpc.spec/pom.xml index eaf6d7b1a6..4d9bbd64d5 100644 --- a/specs/binding-grpc.spec/pom.xml +++ b/specs/binding-grpc.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-http-filesystem.spec/pom.xml b/specs/binding-http-filesystem.spec/pom.xml index e8164f7ab4..d7fd7d324a 100644 --- a/specs/binding-http-filesystem.spec/pom.xml +++ b/specs/binding-http-filesystem.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-http-kafka.spec/pom.xml b/specs/binding-http-kafka.spec/pom.xml index be894338f9..ab1c7fbdd9 100644 --- a/specs/binding-http-kafka.spec/pom.xml +++ b/specs/binding-http-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-http.spec/pom.xml b/specs/binding-http.spec/pom.xml index 61282d8951..e72262c790 100644 --- a/specs/binding-http.spec/pom.xml +++ b/specs/binding-http.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-kafka-grpc.spec/pom.xml b/specs/binding-kafka-grpc.spec/pom.xml index c9ec172761..2b17e0f4d9 100644 --- a/specs/binding-kafka-grpc.spec/pom.xml +++ b/specs/binding-kafka-grpc.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-kafka.spec/pom.xml b/specs/binding-kafka.spec/pom.xml index 129341bd51..c161f01600 100644 --- a/specs/binding-kafka.spec/pom.xml +++ b/specs/binding-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-mqtt-kafka.spec/pom.xml b/specs/binding-mqtt-kafka.spec/pom.xml index 2941bcfc83..afc02fc7ce 100644 --- a/specs/binding-mqtt-kafka.spec/pom.xml +++ b/specs/binding-mqtt-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-mqtt.spec/pom.xml b/specs/binding-mqtt.spec/pom.xml index 9f16169b5a..d29ec4dfc5 100644 --- a/specs/binding-mqtt.spec/pom.xml +++ b/specs/binding-mqtt.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-openapi-asyncapi.spec/pom.xml b/specs/binding-openapi-asyncapi.spec/pom.xml index b1913e3065..53d4666104 100644 --- a/specs/binding-openapi-asyncapi.spec/pom.xml +++ b/specs/binding-openapi-asyncapi.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-openapi.spec/pom.xml b/specs/binding-openapi.spec/pom.xml index 7a1c356c94..ed2a268462 100644 --- a/specs/binding-openapi.spec/pom.xml +++ b/specs/binding-openapi.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-proxy.spec/pom.xml b/specs/binding-proxy.spec/pom.xml index 4408d55147..6b035fd326 100644 --- a/specs/binding-proxy.spec/pom.xml +++ b/specs/binding-proxy.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-sse-kafka.spec/pom.xml b/specs/binding-sse-kafka.spec/pom.xml index b72428eb1b..1e3f90c1d4 100644 --- a/specs/binding-sse-kafka.spec/pom.xml +++ b/specs/binding-sse-kafka.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-sse.spec/pom.xml b/specs/binding-sse.spec/pom.xml index 7079f2e1ae..5649be8b1c 100644 --- a/specs/binding-sse.spec/pom.xml +++ b/specs/binding-sse.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-tcp.spec/pom.xml b/specs/binding-tcp.spec/pom.xml index 0c30ded08e..d6cbf851cc 100644 --- a/specs/binding-tcp.spec/pom.xml +++ b/specs/binding-tcp.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-tls.spec/pom.xml b/specs/binding-tls.spec/pom.xml index fdc955ef96..97dfd90923 100644 --- a/specs/binding-tls.spec/pom.xml +++ b/specs/binding-tls.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/binding-ws.spec/pom.xml b/specs/binding-ws.spec/pom.xml index 5dc9b1a9b6..f5b001abe3 100644 --- a/specs/binding-ws.spec/pom.xml +++ b/specs/binding-ws.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/catalog-apicurio.spec/pom.xml b/specs/catalog-apicurio.spec/pom.xml index 444c97efb8..2c460343de 100644 --- a/specs/catalog-apicurio.spec/pom.xml +++ b/specs/catalog-apicurio.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/catalog-filesystem.spec/pom.xml b/specs/catalog-filesystem.spec/pom.xml index 3c39bb0d06..59459e79d3 100644 --- a/specs/catalog-filesystem.spec/pom.xml +++ b/specs/catalog-filesystem.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/catalog-inline.spec/pom.xml b/specs/catalog-inline.spec/pom.xml index 8a90f4e4cb..561e80a501 100644 --- a/specs/catalog-inline.spec/pom.xml +++ b/specs/catalog-inline.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/catalog-karapace.spec/pom.xml b/specs/catalog-karapace.spec/pom.xml index 3e150cf9b4..32fc7bdf08 100644 --- a/specs/catalog-karapace.spec/pom.xml +++ b/specs/catalog-karapace.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/catalog-schema-registry.spec/pom.xml b/specs/catalog-schema-registry.spec/pom.xml index e822b9989c..ddceff2637 100644 --- a/specs/catalog-schema-registry.spec/pom.xml +++ b/specs/catalog-schema-registry.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/engine.spec/pom.xml b/specs/engine.spec/pom.xml index b3b73bb237..9c0b5f9746 100644 --- a/specs/engine.spec/pom.xml +++ b/specs/engine.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/exporter-otlp.spec/pom.xml b/specs/exporter-otlp.spec/pom.xml index 9f5df63979..6d976c5c5b 100644 --- a/specs/exporter-otlp.spec/pom.xml +++ b/specs/exporter-otlp.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/exporter-prometheus.spec/pom.xml b/specs/exporter-prometheus.spec/pom.xml index 935f76f3e0..50b011e580 100644 --- a/specs/exporter-prometheus.spec/pom.xml +++ b/specs/exporter-prometheus.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/exporter-stdout.spec/pom.xml b/specs/exporter-stdout.spec/pom.xml index 359074548d..419983889f 100644 --- a/specs/exporter-stdout.spec/pom.xml +++ b/specs/exporter-stdout.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/filesystem-http.spec/pom.xml b/specs/filesystem-http.spec/pom.xml index 98bf6f77aa..65e9849e2a 100644 --- a/specs/filesystem-http.spec/pom.xml +++ b/specs/filesystem-http.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/guard-jwt.spec/pom.xml b/specs/guard-jwt.spec/pom.xml index 1c9ee70d5a..edf3b4a4e9 100644 --- a/specs/guard-jwt.spec/pom.xml +++ b/specs/guard-jwt.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/metrics-grpc.spec/pom.xml b/specs/metrics-grpc.spec/pom.xml index 72a14cd179..ccba0d91f4 100644 --- a/specs/metrics-grpc.spec/pom.xml +++ b/specs/metrics-grpc.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/metrics-http.spec/pom.xml b/specs/metrics-http.spec/pom.xml index 292e82a329..88f8a0c82e 100644 --- a/specs/metrics-http.spec/pom.xml +++ b/specs/metrics-http.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/metrics-stream.spec/pom.xml b/specs/metrics-stream.spec/pom.xml index bc5ef9c6a0..7d06b28e73 100644 --- a/specs/metrics-stream.spec/pom.xml +++ b/specs/metrics-stream.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/model-avro.spec/pom.xml b/specs/model-avro.spec/pom.xml index 3599ba1aa3..4c3c8bae3f 100644 --- a/specs/model-avro.spec/pom.xml +++ b/specs/model-avro.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/model-core.spec/pom.xml b/specs/model-core.spec/pom.xml index 9b5b0b41ec..3d72cbfb14 100644 --- a/specs/model-core.spec/pom.xml +++ b/specs/model-core.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/model-json.spec/pom.xml b/specs/model-json.spec/pom.xml index c7e0a3ab97..4520f21bcb 100644 --- a/specs/model-json.spec/pom.xml +++ b/specs/model-json.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/model-protobuf.spec/pom.xml b/specs/model-protobuf.spec/pom.xml index f040110f1d..3394609933 100644 --- a/specs/model-protobuf.spec/pom.xml +++ b/specs/model-protobuf.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/pom.xml b/specs/pom.xml index a04ebc5efe..adf7bf7933 100644 --- a/specs/pom.xml +++ b/specs/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla zilla - develop-SNAPSHOT + 0.9.103 ../pom.xml diff --git a/specs/vault-filesystem.spec/pom.xml b/specs/vault-filesystem.spec/pom.xml index fbf4dbaad6..dd1611bdae 100644 --- a/specs/vault-filesystem.spec/pom.xml +++ b/specs/vault-filesystem.spec/pom.xml @@ -8,7 +8,7 @@ io.aklivity.zilla specs - develop-SNAPSHOT + 0.9.103 ../pom.xml