Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Extract remote_action code from sender #2123

Merged
merged 1 commit into from
Aug 4, 2020
Merged

Conversation

jgrund
Copy link
Member

@jgrund jgrund commented Jul 31, 2020

Currently, the only way to run a remote_action is to call it through
the action-runner.

This means even if there is code within the action-runner that wants
to call a local action it will need to schedule it via HTTPS / UDS.

As a first step to making this more efficient, move the remote_action
code out to a directly callable fn.

Signed-off-by: Joe Grund jgrund@whamcloud.io


This change is Reviewable

@jgrund jgrund self-assigned this Jul 31, 2020
@jgrund jgrund marked this pull request as ready for review August 1, 2020 13:53
@jgrund jgrund requested a review from a team August 1, 2020 13:53
mkpankov
mkpankov previously approved these changes Aug 3, 2020
Copy link
Contributor

@mkpankov mkpankov left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jgrund)


iml-services/iml-action-runner/src/remote_action.rs, line 76 at r1 (raw file):

    let ch = iml_rabbit::create_channel(&conn).await?;

    drop(conn);

Why do we do this?

@jgrund jgrund requested a review from a team August 3, 2020 12:22
Currently, the only way to run a `remote_action` is to call it through
the `action-runner`.

This means even if there is code within the `action-runner` that wants
to call a local action it will need to schedule it via HTTP / UDS.

As a first step to making this more efficient, move the `remote_action`
code out to a directly callable fn.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
@jgrund
Copy link
Member Author

jgrund commented Aug 3, 2020

Why do we do this?

Connections are closed when there are no more handles to them. This is a precaution to make sure we don't keep the handle open longer than necessary.

@jgrund jgrund requested a review from mkpankov August 3, 2020 12:40
Copy link
Contributor

@mkpankov mkpankov left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@jgrund jgrund requested a review from a team August 4, 2020 02:25
@jgrund jgrund merged commit d965b59 into master Aug 4, 2020
@jgrund jgrund deleted the extract_remote_action branch August 4, 2020 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants