Skip to content

Conversation

Stretch96
Copy link

@Stretch96 Stretch96 commented Jan 13, 2022

When running aws ecs execute-command, it unnecessarily outputs:

The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.

This is because within the ExecuteCommandCaller Class, check_call(["session-manager-plugin"]) is used

check_call in this case is only used to ensure that the command exists

Changing stddout to devnull, will still exit if the command errors (eg. if session-manager-plugin doesn't exist)

@Stretch96 Stretch96 changed the title Silence ecs execute command session manager plugin check Silence ecs execute-command session manager plugin check Jan 13, 2022
Copy link
Contributor

@justindho justindho left a comment

Choose a reason for hiding this comment

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

@Stretch96 Thanks for the contribution! This seems reasonable to me. Just had a small comment.

# session-manager-plugin is installed
# before execute-command-command is made
check_call(["session-manager-plugin"])
check_call(["session-manager-plugin"], stdout=open(os.devnull, 'wb'))
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about simplifying this to just use subprocess.DEVNULL (and importing DEVNULL from subprocess up at the top)?

Suggested change
check_call(["session-manager-plugin"], stdout=open(os.devnull, 'wb'))
check_call(["session-manager-plugin"], stdout=DEVNULL)

@justindho justindho added feature-request A feature should be added or improved. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. ecs-execute-command implementation community labels Jun 1, 2022
@tim-finnigan
Copy link
Contributor

Checking in - it looks like we haven't heard back in a couple of years here. I'm going to close this PR as inactive, if still interested in these changes please create a new issue/PR for continuing the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ecs-execute-command feature-request A feature should be added or improved. implementation response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
Status: Implementation
Development

Successfully merging this pull request may close these issues.

3 participants