Skip to content

Commit

Permalink
Merge branch 'release/0.9.99'
Browse files Browse the repository at this point in the history
  • Loading branch information
jfallows committed Oct 12, 2024
2 parents 057fbb7 + c14943c commit dbad7a5
Show file tree
Hide file tree
Showing 146 changed files with 813 additions and 135 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

## [Unreleased](https://github.com/aklivity/zilla/tree/HEAD)

[Full Changelog](https://github.com/aklivity/zilla/compare/0.9.97...HEAD)
[Full Changelog](https://github.com/aklivity/zilla/compare/0.9.98...HEAD)

**Merged pull requests:**

- Update advertised protocol version in pgsql server binding [\#1294](https://github.com/aklivity/zilla/pull/1294) ([akrambek](https://github.com/akrambek))
- Support cancel request [\#1293](https://github.com/aklivity/zilla/pull/1293) ([akrambek](https://github.com/akrambek))

## [0.9.98](https://github.com/aklivity/zilla/tree/0.9.98) (2024-10-10)

[Full Changelog](https://github.com/aklivity/zilla/compare/0.9.97...0.9.98)

**Fixed bugs:**

Expand Down
2 changes: 1 addition & 1 deletion build/flyweight-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>build</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>zilla</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cloud/docker-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>cloud</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cloud/helm-chart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>cloud</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>zilla</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion conf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>zilla</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion incubator/binding-amqp.spec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>incubator</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion incubator/binding-amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>incubator</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion incubator/binding-pgsql-kafka.spec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>incubator</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion incubator/binding-pgsql-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>incubator</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion incubator/binding-pgsql.spec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.aklivity.zilla</groupId>
<artifactId>incubator</artifactId>
<version>0.9.98</version>
<version>0.9.99</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.aklivity.k3po.runtime.lang.el.Function;
import io.aklivity.k3po.runtime.lang.el.spi.FunctionMapperSpi;
import io.aklivity.zilla.specs.binding.pgsql.internal.types.stream.PgsqlBeginExFW;
import io.aklivity.zilla.specs.binding.pgsql.internal.types.stream.PgsqlCancelRequestFlushExFW;
import io.aklivity.zilla.specs.binding.pgsql.internal.types.stream.PgsqlColumnInfoFW;
import io.aklivity.zilla.specs.binding.pgsql.internal.types.stream.PgsqlCompletedFlushExFW;
import io.aklivity.zilla.specs.binding.pgsql.internal.types.stream.PgsqlDataExFW;
Expand Down Expand Up @@ -223,6 +224,13 @@ public PgsqlErrorFlushExBuilder error()
return new PgsqlErrorFlushExBuilder();
}

public PgsqlCancelRequestFlushExBuilder cancelRequest()
{
flushExRW.kind(PgsqlMessageType.CANCEL_REQUEST.value());

return new PgsqlCancelRequestFlushExBuilder();
}

public PgsqlReadyFlushExBuilder ready()
{
flushExRW.kind(PgsqlMessageType.READY.value());
Expand Down Expand Up @@ -397,6 +405,39 @@ public PgsqlFlushExBuilder build()
}
}

public final class PgsqlCancelRequestFlushExBuilder
{
private final PgsqlCancelRequestFlushExFW.Builder pgsqlCancelREquestFlushExRW =
new PgsqlCancelRequestFlushExFW.Builder();

private PgsqlCancelRequestFlushExBuilder()
{
pgsqlCancelREquestFlushExRW.wrap(writeBuffer, PgsqlFlushExFW.FIELD_OFFSET_TYPE, writeBuffer.capacity());
}

public PgsqlCancelRequestFlushExBuilder pid(
int pid)
{
pgsqlCancelREquestFlushExRW.pid(pid);
return this;
}

public PgsqlCancelRequestFlushExBuilder key(
int key)
{
pgsqlCancelREquestFlushExRW.key(key);
return this;
}

public PgsqlFlushExBuilder build()
{
final PgsqlCancelRequestFlushExFW pgsqlCancelRequestFlushEx =
pgsqlCancelREquestFlushExRW.build();
flushExRO.wrap(writeBuffer, 0, pgsqlCancelRequestFlushEx.limit());
return PgsqlFlushExBuilder.this;
}
}

public final class PgsqlReadyFlushExBuilder
{
private final PgsqlReadyFlushExFW.Builder pgsqlReadyFlushExRW = new PgsqlReadyFlushExFW.Builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ scope pgsql
TYPE (84),
COMPLETION (67),
ERROR (69),
CANCEL_REQUEST (255),
READY (90)
}

Expand All @@ -55,6 +56,7 @@ scope pgsql

union PgsqlFlushEx switch (uint8) extends core::stream::Extension
{
case 255: pgsql::stream::PgsqlCancelRequestFlushEx cancelRequest;
case 84: pgsql::stream::PgsqlTypeFlushEx type;
case 67: pgsql::stream::PgsqlCompletedFlushEx completion;
case 69: pgsql::stream::PgsqlErrorFlushEx error;
Expand Down Expand Up @@ -88,6 +90,12 @@ scope pgsql
string16 tag;
}

struct PgsqlCancelRequestFlushEx
{
int32 pid = 0;
int32 key = 0;
}

struct PgsqlErrorFlushEx
{
string16 severity;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright 2021-2023 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 "duplex"

write zilla:begin.ext ${pgsql:beginEx()
.typeId(zilla:id("pgsql"))
.parameter("user", "root")
.parameter("database", "dev")
.parameter("application_name", "psql")
.parameter("client_encoding", "UTF8")
.build()}

connected

write advise zilla:flush ${pgsql:flushEx()
.typeId(zilla:id("pgsql"))
.cancelRequest()
.pid(123)
.key(678)
.build()
.build()}

read closed
write close
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Copyright 2021-2023 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.
#

property serverAddress "zilla://streams/app0"

accept ${serverAddress}
option zilla:window 8192
option zilla:transmission "duplex"

accepted

read zilla:begin.ext ${pgsql:beginEx()
.typeId(zilla:id("pgsql"))
.parameter("user", "root")
.parameter("database", "dev")
.parameter("application_name", "psql")
.parameter("client_encoding", "UTF8")
.build()}

connected

read advised zilla:flush ${pgsql:flushEx()
.typeId(zilla:id("pgsql"))
.cancelRequest()
.pid(123)
.key(678)
.build()
.build()}

write close
read closed
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#
# Copyright 2021-2023 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.
#

property networkConnectWindow 8192

connect "zilla://streams/net0"
option zilla:window ${networkConnectWindow}
option zilla:transmission "duplex"
option zilla:byteorder "network"

connected

write 8 # length
[0x04 0xd2 0x16 0x2f] # request code

read [0x4e]

write 75 # length
3s # major version
0s # minor version
"user" [0x00] # name
"root" [0x00] # value
"database" [0x00] # name
"dev" [0x00] # value
"application_name" [0x00] # name
"psql" [0x00] # value
"client_encoding" [0x00] # name
"UTF8" [0x00] # value
[0x00] # end of parameters

read [0x52] # type R
8 # length
0 # authentication type

read [0x4b] # type K
12 # length
0 # pid
0 # key

read [0x53] # type S
25 # length
"client_encoding" [0x00] # name
"UTF8" [0x00] # value

read [0x53] # type S
35 # length
"standard_conforming_strings" [0x00] # name
[0x6f 0x6e 0x00] # value

read [0x53] # type S
25 # length
"server_version" [0x00] # name
"9.1.0" [0x00] # value

read [0x53] # type S
27 # length
"application_name" [0x00] # name
"zilla" [0x00] # value

read [0x5a] # type Z
5 # length
[0x49] # status

write 12 # length
80877102 # cancel request code
123 # pid
678 # key

read [0x58] # type X
4 # length

read closed
write close
Loading

0 comments on commit dbad7a5

Please sign in to comment.