Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
13d20ae
feat: replace static event name with dynamic based on event id
vordimous May 15, 2024
8c44723
update event.name test value
vordimous May 15, 2024
db6c249
Update incubator/catalog-filesystem/src/main/java/io/aklivity/zilla/r…
vordimous May 15, 2024
a9b16cd
Update runtime/exporter-stdout/src/main/java/io/aklivity/zilla/runtim…
vordimous May 15, 2024
db918eb
Update runtime/exporter-otlp/src/main/java/io/aklivity/zilla/runtime/…
vordimous May 15, 2024
5b3b00d
Build event name in Engine context
vordimous May 15, 2024
35f3254
fix build errors
vordimous May 16, 2024
5608829
update tests
vordimous May 16, 2024
34deb18
fix http binding event test
vordimous May 16, 2024
981fed4
move event names out of format
vordimous May 20, 2024
7bff9fe
correct code to pass tests
vordimous May 30, 2024
1ba8a8e
refactor the compact session topic event
vordimous May 30, 2024
30430b8
move the static reason into the event formatter
vordimous Jun 3, 2024
f3ccc93
update model validation event messages
vordimous Jun 3, 2024
c45effe
update jwt guard event message
vordimous Jun 3, 2024
74af1f5
update catalog filesystem event message
vordimous Jun 3, 2024
d11f441
Add generic tls error message
vordimous Jun 3, 2024
0d122ac
update tcp event message
vordimous Jun 3, 2024
7bdd8e3
add context to mqtt client connected message
vordimous Jun 3, 2024
a23579b
update kafka and http message formatting
vordimous Jun 3, 2024
4086ca4
update apicurio artifact fetch messages
vordimous Jun 3, 2024
369e109
update karapace schema registry message formatting
vordimous Jun 3, 2024
6cd31b3
fix test
vordimous Jun 3, 2024
656b19a
Update runtime/binding-tls/src/main/java/io/aklivity/zilla/runtime/bi…
vordimous Jun 3, 2024
187bd0e
Improve jwt message with added reason
vordimous Jun 3, 2024
140f628
rename
vordimous Jun 3, 2024
6377a8a
improve mqtt session topic compated event message
vordimous Jun 3, 2024
0b38f7a
update code coverage for guard-jwt project to 0.97
vordimous Jun 3, 2024
5d6e603
Merge branch 'develop' into feature/1013-use-full-event-id-and-the-ev…
vordimous Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update model validation event messages
  • Loading branch information
vordimous committed Jun 3, 2024
commit f3ccc936e692cf4b085d735a28bb161bf91309e3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public final class AvroModelEventFormatter implements EventFormatterSpi
{
private final EventFW eventRO = new EventFW();
private final AvroModelEventExFW jsonModelEventExFW = new AvroModelEventExFW();
private final AvroModelEventExFW avroModelEventExFW = new AvroModelEventExFW();

AvroModelEventFormatter(
Configuration config)
Expand All @@ -39,15 +39,15 @@ public String format(
int length)
{
final EventFW event = eventRO.wrap(buffer, index, index + length);
final AvroModelEventExFW extension = jsonModelEventExFW
final AvroModelEventExFW extension = avroModelEventExFW
.wrap(event.extension().buffer(), event.extension().offset(), event.extension().limit());
String result = null;
switch (extension.kind())
{
case VALIDATION_FAILED:
{
AvroModelValidationFailedExFW ex = extension.validationFailed();
result = String.format("%s", asString(ex.error()));
result = String.format("A message payload failed validation. %s.", asString(ex.error()));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public String format(
case VALIDATION_FAILED:
{
CoreModelValidationFailedExFW ex = extension.validationFailed();
result = String.format("%s", asString(ex.error()));
result = String.format(
"A message payload failed validation. A field was not the expected type (%s).",
asString(ex.error())
);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String format(
case VALIDATION_FAILED:
{
JsonModelValidationFailedExFW ex = extension.validationFailed();
result = String.format("%s", asString(ex.error()));
result = String.format("A message payload failed validation. %s.", asString(ex.error()));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String format(
case VALIDATION_FAILED:
{
ProtobufModelValidationFailedExFW ex = extension.validationFailed();
result = String.format("%s", asString(ex.error()));
result = String.format("A message payload failed validation. %s.", asString(ex.error()));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ telemetry:
- qname: test.net0
id: model.avro.validation.failed
name: MODEL_AVRO_VALIDATION_FAILED
message: java.io.EOFException
message: A message payload failed validation. java.io.EOFException.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove exception class name from message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"java.io.EOFException" is one of the exception messages returned from the AvroRuntimeException class. The error string passed in the event is set from various exception messages.

I think this is just a bad example of what kind of errors might come through and I don't know how the tests makes this specific exception happen or how to change it to something else.

origional comment here: #1029 (comment)

@vordimous vordimous Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added fixing this as a note in some the follow on modifications that are needed: #1029 (comment)

catalogs:
test0:
type: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ telemetry:
- qname: test.net0
id: model.core.validation.failed
name: MODEL_CORE_VALIDATION_FAILED
message: string
message: A message payload failed validation. A field was not the expected type (string).
bindings:
net0:
kind: server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ telemetry:
- qname: test.net0
id: model.json.validation.failed
name: MODEL_JSON_VALIDATION_FAILED
message: "[1,10][/id] The value must be of string type, but actual type is integer."
message: A message payload failed validation. [1,10][/id] The value must be of string type, but actual type is integer.
catalogs:
test0:
type: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ telemetry:
- qname: test.net0
id: model.protobuf.validation.failed
name: MODEL_PROTOBUF_VALIDATION_FAILED
message: "Cannot find field: date in message example"
message: "A message payload failed validation. Cannot find field: date in message example."
catalogs:
test0:
type: test
Expand Down