tool-suite-X icon indicating copy to clipboard operation
tool-suite-X copied to clipboard

User-configurable stack name in init-odkx-sync-endpoint.py

Open linl33 opened this issue 4 years ago • 16 comments

init-odkx-sync-endpoint.py hard-coded the stack name syncldap. A user-configurable stack name would be useful.

Repository https://github.com/odk-x/sync-endpoint-default-setup

linl33 avatar Mar 05 '21 02:03 linl33

Hey! @linl33 So we need to ask the user for the stack name right? Can I work on this issue?

adityaofficial10 avatar Mar 05 '21 07:03 adityaofficial10

Hi @adityaofficial10!

Yes, you can work on this issue. The idea is that the script should prompt for a stack name but default to syncldap (the current name). The script should also store the chosen stack name to its settings file.

linl33 avatar Mar 05 '21 14:03 linl33

@linl33 Sure, I'll follow this up with a PR shortly.

adityaofficial10 avatar Mar 05 '21 14:03 adityaofficial10

@linl33 I have made the changes as shown below: Screenshot 2021-03-05 at 11 59 35 PM Is this fine? Also, you were talking about the settings file. Which file is that exactly?

adityaofficial10 avatar Mar 05 '21 18:03 adityaofficial10

The function is correct but a few notes on the implementation,

  • Please move the prompt into run_interactive_config, to keep it consistent with the rest of the configuration
  • Please put the default value into [()], e.g. Please enter a name for the Docker Swarm stack [(syncldap)]
  • Please use String interpolation instead of concatenation

For the settings file, see https://github.com/odk-x/sync-endpoint-default-setup/blob/0d97f322b6f3c48f86cdb47c9c1c7acf3f7bfb93/init-odkx-sync-endpoint.py#L134

Let me know if you have questions. Thanks for the work so far!

linl33 avatar Mar 06 '21 04:03 linl33

@linl33 I've made the required changes. I'm sending you a link to the file in my fork. Kindly review and inform if I can improve something. https://github.com/adityaofficial10/sync-endpoint-default-setup/blob/fix/stack-name-added/init-odkx-sync-endpoint.py Can I open a PR?

adityaofficial10 avatar Mar 06 '21 09:03 adityaofficial10

Yes, please send a pull request against the development branch.

linl33 avatar Mar 07 '21 03:03 linl33

@linl33 I've linked the PR.

adityaofficial10 avatar Mar 07 '21 06:03 adityaofficial10

For future reference for someone taking on this issue. Take a look at the previous incomplete PR. https://github.com/odk-x/sync-endpoint-default-setup/pull/26

The comments in the PR give additional direction

wbrunette avatar Mar 27 '22 15:03 wbrunette

Hi team! I am an outreachy applicant. Please can I work on this issue if it is still open?

wsmmxmm avatar Mar 29 '22 12:03 wsmmxmm

@wsmmxmm it is still open. I will assign it to you. Check out the PR I commented about as much of the work has been attempted once, just not fully completed.

wbrunette avatar Mar 29 '22 16:03 wbrunette

@wbrunette @linl33 @elmps2018 Can I finish up with this if its still open? Regards, Noah

Ndacyayisenga-droid avatar Feb 12 '23 21:02 Ndacyayisenga-droid

Hello team,

Can I take this on please, I'm an Outreachy applicant.

Thank you and regards, Maria Angella

MariaAngella avatar Oct 03 '23 01:10 MariaAngella

Hi @MariaAngella! @wsmmxmm is currently assigned but does not look like they worked on it lately. @wbrunette @wsmmxmm is it okay if I reassign?

elmps2018 avatar Oct 03 '23 01:10 elmps2018

You should first ask the question if they want to have a custom stack name. Because if they change it the directions will not match. So really it's two questions.

wbrunette avatar Oct 03 '23 11:10 wbrunette

Thank you for this assignment.

MariaAngella avatar Oct 03 '23 12:10 MariaAngella