Skip to content

Conversation

@ricardomaraschini
Copy link
Contributor

plain prompts do not leverage survey package. survey package does not behave well with stdin redirection so it is quite hard to test an interactive installation. with plain prompts this should be straight forward to integrate with tools like expect.

this commit also adds an end-to-end test that uses plain prompts.

@ricardomaraschini ricardomaraschini marked this pull request as draft August 21, 2023 18:56
@ricardomaraschini ricardomaraschini marked this pull request as ready for review August 21, 2023 19:10
@ricardomaraschini ricardomaraschini force-pushed the add-plain-prompts branch 5 times, most recently from 3f9072a to bcb6dc5 Compare August 23, 2023 11:07
for port == 0 {
str := prompts.Input("SSH port:", strconv.Itoa(host.Port), true)
if port, err = strconv.Atoi(str); err != nil {
logrus.Warnf("Invalid port number")
Copy link
Member

Choose a reason for hiding this comment

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

just curious why this is a warning and doesnt return an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We allow users to type the value again if they by mistake entered a string there.

ricardomaraschini and others added 3 commits August 25, 2023 10:17
plain prompts do not leverage survey package. survey package does not
behave well with stdin redirection so it is quite hard to test an
interactive installation. with plain prompts this should be straight
forward to integrate with tools like `expect`.

this commit also adds an end-to-end test that uses plain prompts.
Co-authored-by: Ethan Mosbaugh <ethan@replicated.com>
@ricardomaraschini ricardomaraschini merged commit 52be561 into main Aug 25, 2023
@ricardomaraschini ricardomaraschini deleted the add-plain-prompts branch August 25, 2023 13:30
emosbaugh pushed a commit that referenced this pull request Aug 26, 2024
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
emosbaugh pushed a commit that referenced this pull request Aug 30, 2024
…-field

rename high availability field in installation spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants