Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import paths not available publicly #1

Open
steveh opened this issue Jun 14, 2021 · 10 comments
Open

Import paths not available publicly #1

steveh opened this issue Jun 14, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@steveh
Copy link

steveh commented Jun 14, 2021

Hi there,

Thanks for publishing the source code. I'd like to integrate the components of session-manager-plugin into my own tooling, but I'm not able to import them, because the paths in the source code refer to github.com/aws/SSMCLI instead of github.com/aws/session-manager-plugin.

go get github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session

go: downloading github.com/aws/session-manager-plugin v0.0.0-20210609234953-e4ad4017df96
go: downloading github.com/aws/aws-sdk-go v1.38.60
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/config: cannot find module providing package github.com/aws/SSMCLI/src/config
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/datachannel: cannot find module providing package github.com/aws/SSMCLI/src/datachannel
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/log: cannot find module providing package github.com/aws/SSMCLI/src/log
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/message: cannot find module providing package github.com/aws/SSMCLI/src/message
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/retry: cannot find module providing package github.com/aws/SSMCLI/src/retry
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/sdkutil: cannot find module providing package github.com/aws/SSMCLI/src/sdkutil
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/sessionmanagerplugin/session/sessionutil: cannot find module providing package github.com/aws/SSMCLI/src/sessionmanagerplugin/session/sessionutil
github.com/aws/session-manager-plugin/src/sessionmanagerplugin/session imports
	github.com/aws/SSMCLI/src/version: cannot find module providing package github.com/aws/SSMCLI/src/version
``
@aidansteele
Copy link

A workaround that lets me use this package in the interim (while we wait for a solution from AWS) is to use a replace directive in our go.mod like this:

module yourpackagenamehere

go 1.16

require (
	github.com/aws/SSMCLI v1.0.0
	github.com/aws/aws-sdk-go v1.38.64 // indirect
	github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
	github.com/fsnotify/fsnotify v1.4.9 // indirect
	github.com/gorilla/websocket v1.4.2 // indirect
	github.com/stretchr/testify v1.7.0 // indirect
	github.com/twinj/uuid v0.0.0-20151029044442-89173bcdda19 // indirect
)

replace github.com/aws/SSMCLI => github.com/aws/session-manager-plugin v0.0.0-20210609234953-e4ad4017df96

@Yangtao-Hua Yangtao-Hua added the enhancement New feature or request label Jun 23, 2021
@Yangtao-Hua
Copy link
Contributor

Thank you for reaching out to us, we will research this issue and come back.

@Ichimikichiki
Copy link

Ichimikichiki commented Jul 31, 2021

github.com/aws/SSMCLI doesn't even exist - not really much to research.

Also, why would you deploy code you hadn't even tried?

Also this isn't an enhancement. This is to actually get your broken code to work. Pretty sloppy effort.

@Yangtao-Hua
Copy link
Contributor

@Ichimikichiki, Sorry for the inconvenience about the import path. Would you like share more on your use case with session-manager-plugin. At the same time, we are working on the update of it, thanks for your patient again before we find a good solution for it.

@rue-nsilverman
Copy link

I also would like to see this resolved by replacing the correct URL throughout the repo. My use case FWIW, is that I have a custom EC2/SSM resolver that I'm writing as a go CLI, rather than have users download the plugin as a dependency, I would include the session-manager session package and call the ValidateInputAndStartSession directly. Then when compiled, its all in one tool rather than two.

I did try @aidansteele 's recommendation and it did function after a bunch of toying around, but I am still getting some runtime segfaults, and I struggled to get the replacement to pull its dependencies properly.

@MatteoGioioso
Copy link

MatteoGioioso commented Sep 21, 2021

@Yangtao-Hua one example use case that we have at the moment is to use SSM in a private network to access an RDS instance through IAM authentication.
We are in the process of automating this by building a small CLI tool and it would be nice to include this plugin as a dependency and work directly with it instead of installing it manually.

I see there is already a PR, do you have any ETA to merge it?

Thanks.

@hoshsadiq
Copy link

@Yangtao-Hua any chance of getting #11 and #33 looked at?

@Yangtao-Hua
Copy link
Contributor

Hi,
We are actively working on fix of this issue, will prioritize it and keep progress posted.

Thanks,
Yangtao

@andymac4182
Copy link

Thanks @Yangtao-Hua 😄

@Yangtao-Hua
Copy link
Contributor

Hi,
Updated the import path in mainline, hope it will be helpful on code build.
We did not move to go-mod in this change, but team already having it tracked in backlog.

Thanks,
Yangtao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants