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

fix: duplicate prompt messages #585

Merged
merged 7 commits into from
Oct 10, 2022
Merged

Conversation

roel4ez
Copy link
Collaborator

@roel4ez roel4ez commented Jul 5, 2022

Checklist

This checklist is used to make sure that common guidelines for a pull request are followed.

  • Versions update reflected in all places (both init.py files, CHANGELOG, setup.py, setup.cfg)
  • Unit tests pass locally
  • Quickstart steps locally validated
  • Passes unit tests in CICD pipeline (green on Github pipeline)
  • Pypi RC version passes Edge CICD pipeline validation for cross-tool validation
  • Pull request includes test coverage for the included changes
  • Documentation is updated for the included changes

General guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR.

Description

Fixes #558

hi @marianan - This PR includes a commit to showcase the removal of the duplicate prompt message (only for subscription list right now). Let me know if you are ok with using this approach, and then I will work out the rest of the duplicate prompts.

Additional information

The problem seems to be that the method that sets the defaults is the one printing messages and when the prompt option is also set for the parameter, the default function gets called twice (see code).

The solution used here is to prompt the user in the default method instead of using the prompt click option.

Thanks @beandrad for the help

@marianan
Copy link
Collaborator

marianan commented Oct 3, 2022

@roel4ez thanks for the PR and apologies for the late reply. I am ok with the approach, feel free to apply to the rest of the commands.

@roel4ez
Copy link
Collaborator Author

roel4ez commented Oct 4, 2022

@roel4ez thanks for the PR and apologies for the late reply. I am ok with the approach, feel free to apply to the rest of the commands.

@marianan updated and applied to all arguments.

iotedgedev/cli.py Outdated Show resolved Hide resolved
iotedgedev/cli.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@marianan marianan left a comment

Choose a reason for hiding this comment

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

🕐

Copy link
Collaborator

@marianan marianan left a comment

Choose a reason for hiding this comment

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

:shipit:

@marianan marianan merged commit 4e7764b into Azure:main Oct 10, 2022
@roel4ez roel4ez deleted the bugfix/558-fix-dupe-logs branch October 10, 2022 16:42
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.

Remove dupe log messages in iotedgedev init
2 participants