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

Bug: Need to sort target list when prompting user to pick db target #12

Open
mothershipper opened this issue Sep 29, 2021 · 3 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mothershipper
Copy link
Contributor

Describe the bug
Target db names are not sorted in list of options

To Reproduce

Run rds-auth-proxy client twice, list won't be in the same order

Expected behavior

List should be in the same order

@mothershipper mothershipper added bug Something isn't working good first issue Good for newcomers labels Sep 29, 2021
@amoghrajesh
Copy link

amoghrajesh commented Oct 1, 2021

@mothershipper I would like to work on this issue. Let me know how to onboard myself and I can start with it. Also, let me know where I should look for the code to be changed

@mothershipper
Copy link
Contributor Author

@amoghrajesh

These two functions iterate over a map to build a list, which we then display to the end user. Just need to sort the lists before passing it off to the survey library:

https://github.com/mothership/rds-auth-proxy/blob/main/cmd/proxy_client.go#L209
https://github.com/mothership/rds-auth-proxy/blob/main/cmd/proxy_client.go#L177

As far as onboarding for this project, I'd start by taking a look at the docker-compose file. It boots both the client and server proxy -- from there, you can use psql to connect to the client proxy. To test this feature in particular, it would help to build the binary locally make debug, and run the client proxy on your machine: rds-auth-proxy client.

You may need to copy the config file from configs/ into a config dir ~/.config/rds-auth-proxy/config.yaml. You'd probably need to duplicate a few of the entries in the "targets" and "upstream_proxies" block, same data, just different names, and remove the "default" targets if they exist.

@amoghrajesh
Copy link

@mothershipper thanks for the context. Is this repo a part of Hactoberfest 2021? If yes, I would like to give it a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants