Skip to content

Conversation

@IridiumOxide
Copy link
Contributor

@IridiumOxide IridiumOxide commented Oct 6, 2022

This change is Reviewable

@IridiumOxide IridiumOxide marked this pull request as draft October 6, 2022 13:40
try {
res = unwrap().execute(ctx, req);
flow.end(FlowStatus.OK);
} catch (InterruptedException | ApertureSDKException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is InterruptedException?
When does ApertureSDKException happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what was the reasoning behind InterruptedException, removed it for now;
ApertureSDKException in this case can happen when trying to end a flow that was already ended.

return res;
} else {
try {
flow.end(FlowStatus.Error);
Copy link
Contributor

Choose a reason for hiding this comment

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

The argument to flow.end is supposed to represent errors in feature execution. Can leave it unset in the scenario where flow is not accepted by Aperture I.E. Feature/Server handler did not run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the FlowStatus accepted as argument is an enum, so one of the possible values has to be passed; Shall we add a third value, other than "OK" and "Error"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, call it Unset

} catch (ApertureSDKException e) {
e.printStackTrace();
}
return HttpResponse.of(HttpStatus.BAD_REQUEST);
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to set response code based on CheckResponse.RejectReason

429 Too many requests in case of REJECT_REASON_RATE_LIMITED
503 Service unavailable in case of REJECT_REASON_CONCURRENCY_LIMITED

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we also use http codes for RPC responses?

Copy link
Contributor

Choose a reason for hiding this comment

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

@IridiumOxide IridiumOxide force-pushed the armeria-support branch 2 times, most recently from f41b4fd to 36980e6 Compare October 11, 2022 03:57
@IridiumOxide IridiumOxide marked this pull request as ready for review October 12, 2022 02:36
@IridiumOxide IridiumOxide changed the title WIP Add armeria decorators Add armeria decorators Oct 12, 2022
@kwapik kwapik requested a review from tanveergill October 12, 2022 09:18
Copy link
Contributor

@kwapik kwapik left a comment

Choose a reason for hiding this comment

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

Reviewed 14 of 14 files at r2, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @IridiumOxide and @tanveergill)

@IridiumOxide IridiumOxide merged commit 6c7a411 into main Oct 12, 2022
@IridiumOxide IridiumOxide deleted the armeria-support branch October 12, 2022 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants