You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was missed in unit testing because the tests incorrectly checked the original workflowRequest and not the streamInputRequest after passing through transport. (Note the last 4 lines.)
Fix the unit test to properly test the workflow created from transport. Change lines 163-166 above to:
assertNull(streamInputRequest.validate());
assertFalse(streamInputRequest.isProvision());
// FAILS, `getDefaultParams()` is nullassertTrue(streamInputRequest.getDefaultParams().isEmpty());
// FAILS, `getUseCase()` is nullassertEquals(streamInputRequest.getUseCase(), "cohere-embedding_model_deploy");
What is the expected behavior?
If these fields are required to be part of the WorkflowRequest they should be properly serialized. Note that adding these fields would break compatibility across versions and would require version-checking for the additional fields.
However, these fields are never accessed in the code, other than in the (failing) tests. If they are not needed, they should be removed.
dbwiddis
added
backlog
Good to have functionality not critical for next release
and removed
v2.16.0
Issues targeting release v2.16.0
labels
Jul 26, 2024
dbwiddis
added
v2.18.0
Issues targeting release v2.18.0
and removed
backlog
Good to have functionality not critical for next release
labels
Sep 18, 2024
What is the bug?
The
WorkflowRequest
class doesn't serialize the use case and default parameters over transport.The
writeTo()
only writes the provision parameter and params map:flow-framework/src/main/java/org/opensearch/flowframework/transport/WorkflowRequest.java
Lines 197 to 206 in cf1016f
Similarly, the constructor using
StreamInput
doesn't read themflow-framework/src/main/java/org/opensearch/flowframework/transport/WorkflowRequest.java
Lines 128 to 136 in cf1016f
This was missed in unit testing because the tests incorrectly checked the original
workflowRequest
and not thestreamInputRequest
after passing through transport. (Note the last 4 lines.)flow-framework/src/test/java/org/opensearch/flowframework/transport/WorkflowRequestResponseTests.java
Lines 155 to 166 in cf1016f
How can one reproduce the bug?
Fix the unit test to properly test the workflow created from transport. Change lines 163-166 above to:
What is the expected behavior?
If these fields are required to be part of the
WorkflowRequest
they should be properly serialized. Note that adding these fields would break compatibility across versions and would require version-checking for the additional fields.However, these fields are never accessed in the code, other than in the (failing) tests. If they are not needed, they should be removed.
Do you have any additional context?
The fields were added in #583.
The tests have been fixed in #757, with the failing tests commented out until this issue is resolved.
The text was updated successfully, but these errors were encountered: